|
5 | 5 | ) |
6 | 6 |
|
7 | 7 | bazel_dep(name = "yq.bzl", version = "0.3.1") |
8 | | -bazel_dep(name = "rules_nodejs", version = "6.5.2") |
| 8 | +bazel_dep(name = "rules_nodejs", version = "6.6.0") |
9 | 9 | bazel_dep(name = "aspect_rules_js", version = "2.6.2") |
10 | 10 | bazel_dep(name = "aspect_rules_ts", version = "3.7.0") |
11 | 11 | bazel_dep(name = "rules_pkg", version = "0.8.1") |
@@ -51,75 +51,49 @@ git_override( |
51 | 51 | remote = "https://github.com/devversion/rules_browsers.git", |
52 | 52 | ) |
53 | 53 |
|
54 | | -# The below is needed until https://github.com/bazel-contrib/rules_nodejs/pull/3853 is merged and released. |
55 | | -NODE_24_VERSION = "24.0.0" |
56 | | - |
57 | | -NODE_24_REPO = { |
58 | | - "24.0.0-darwin_arm64": ("node-v24.0.0-darwin-arm64.tar.gz", "node-v24.0.0-darwin-arm64", "194e2f3dd3ec8c2adcaa713ed40f44c5ca38467880e160974ceac1659be60121"), |
59 | | - "24.0.0-darwin_amd64": ("node-v24.0.0-darwin-x64.tar.gz", "node-v24.0.0-darwin-x64", "f716b3ce14a7e37a6cbf97c9de10d444d7da07ef833cd8da81dd944d111e6a4a"), |
60 | | - "24.0.0-linux_arm64": ("node-v24.0.0-linux-arm64.tar.xz", "node-v24.0.0-linux-arm64", "d40ec7ffe0b82b02dce94208c84351424099bd70fa3a42b65c46d95322305040"), |
61 | | - "24.0.0-linux_ppc64le": ("node-v24.0.0-linux-ppc64le.tar.xz", "node-v24.0.0-linux-ppc64le", "cfa0e8d51a2f9a446f1bfb81cdf4c7e95336ad622e2aa230e3fa1d093c63d77d"), |
62 | | - "24.0.0-linux_s390x": ("node-v24.0.0-linux-s390x.tar.xz", "node-v24.0.0-linux-s390x", "e37a04c7ee05416ec1234fd3255e05b6b81287eb0424a57441c8b69f0a155021"), |
63 | | - "24.0.0-linux_amd64": ("node-v24.0.0-linux-x64.tar.xz", "node-v24.0.0-linux-x64", "59b8af617dccd7f9f68cc8451b2aee1e86d6bd5cb92cd51dd6216a31b707efd7"), |
64 | | - "24.0.0-windows_amd64": ("node-v24.0.0-win-x64.zip", "node-v24.0.0-win-x64", "3d0fff80c87bb9a8d7f49f2f27832aa34a1477d137af46f5b14df5498be81304"), |
65 | | -} |
66 | | - |
67 | | -node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") |
| 54 | +node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True) |
| 55 | +node.toolchain(node_version = "24.0.0") |
68 | 56 | node.toolchain( |
69 | | - name = "nodejs", |
70 | | - node_repositories = NODE_24_REPO, |
71 | | - node_version = NODE_24_VERSION, |
72 | | -) |
73 | | -use_repo(node, "nodejs_toolchains") |
74 | | -use_repo(node, "nodejs_darwin_amd64") |
75 | | -use_repo(node, "nodejs_darwin_arm64") |
76 | | -use_repo(node, "nodejs_linux_amd64") |
77 | | -use_repo(node, "nodejs_linux_arm64") |
78 | | -use_repo(node, "nodejs_linux_ppc64le") |
79 | | -use_repo(node, "nodejs_linux_s390x") |
80 | | -use_repo(node, "nodejs_windows_amd64") |
81 | | - |
82 | | -node_dev = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True) |
83 | | - |
84 | | -# Node.js 20 |
85 | | -node_dev.toolchain( |
86 | 57 | name = "node20", |
87 | 58 | node_version = "20.19.0", |
88 | 59 | ) |
89 | | -use_repo(node_dev, "node20_darwin_arm64") |
90 | | -use_repo(node_dev, "node20_darwin_amd64") |
91 | | -use_repo(node_dev, "node20_linux_amd64") |
92 | | -use_repo(node_dev, "node20_linux_arm64") |
93 | | -use_repo(node_dev, "node20_linux_s390x") |
94 | | -use_repo(node_dev, "node20_linux_ppc64le") |
95 | | -use_repo(node_dev, "node20_windows_amd64") |
96 | | - |
97 | | -# Node.js 22 |
98 | | -node_dev.toolchain( |
| 60 | +node.toolchain( |
99 | 61 | name = "node22", |
100 | 62 | node_version = "22.12.0", |
101 | 63 | ) |
102 | | -use_repo(node_dev, "node22_darwin_arm64") |
103 | | -use_repo(node_dev, "node22_darwin_amd64") |
104 | | -use_repo(node_dev, "node22_linux_amd64") |
105 | | -use_repo(node_dev, "node22_linux_arm64") |
106 | | -use_repo(node_dev, "node22_linux_s390x") |
107 | | -use_repo(node_dev, "node22_linux_ppc64le") |
108 | | -use_repo(node_dev, "node22_windows_amd64") |
109 | | - |
110 | | -# Node.js 24 |
111 | | -node_dev.toolchain( |
| 64 | +node.toolchain( |
112 | 65 | name = "node24", |
113 | | - node_repositories = NODE_24_REPO, |
114 | | - node_version = NODE_24_VERSION, |
| 66 | + node_version = "24.0.0", |
| 67 | +) |
| 68 | + |
| 69 | +# FIXME(6.0): a repo rule with name=foo should create a repo named @foo, not @foo_toolchains |
| 70 | +use_repo( |
| 71 | + node, |
| 72 | + "node20_darwin_amd64", |
| 73 | + "node20_darwin_arm64", |
| 74 | + "node20_linux_amd64", |
| 75 | + "node20_linux_arm64", |
| 76 | + "node20_toolchains", |
| 77 | + "node20_windows_amd64", |
| 78 | + "node22_darwin_amd64", |
| 79 | + "node22_darwin_arm64", |
| 80 | + "node22_linux_amd64", |
| 81 | + "node22_linux_arm64", |
| 82 | + "node22_toolchains", |
| 83 | + "node22_windows_amd64", |
| 84 | + "node24_darwin_amd64", |
| 85 | + "node24_darwin_arm64", |
| 86 | + "node24_linux_amd64", |
| 87 | + "node24_linux_arm64", |
| 88 | + "node24_toolchains", |
| 89 | + "node24_windows_amd64", |
| 90 | + "nodejs_darwin_amd64", |
| 91 | + "nodejs_darwin_arm64", |
| 92 | + "nodejs_linux_amd64", |
| 93 | + "nodejs_linux_arm64", |
| 94 | + "nodejs_toolchains", |
| 95 | + "nodejs_windows_amd64", |
115 | 96 | ) |
116 | | -use_repo(node_dev, "node24_darwin_arm64") |
117 | | -use_repo(node_dev, "node24_darwin_amd64") |
118 | | -use_repo(node_dev, "node24_linux_amd64") |
119 | | -use_repo(node_dev, "node24_linux_arm64") |
120 | | -use_repo(node_dev, "node24_linux_s390x") |
121 | | -use_repo(node_dev, "node24_linux_ppc64le") |
122 | | -use_repo(node_dev, "node24_windows_amd64") |
123 | 97 |
|
124 | 98 | npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") |
125 | 99 | npm.npm_translate_lock( |
|
0 commit comments