@@ -12,7 +12,9 @@ http_archive(
12
12
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.4/rules_nodejs-5.8.4.tar.gz" ],
13
13
)
14
14
15
- # Add skylib which contains common Bazel utilities.
15
+ # Add skylib which contains common Bazel utilities. Note that `rules_nodejs` would also
16
+ # bring in the skylib repository but with an older version that does not support shorthands
17
+ # for declaring Bazel build setting flags.
16
18
http_archive (
17
19
name = "bazel_skylib" ,
18
20
sha256 = "a9c5d3a22461ed7063aa7b088f9c96fa0aaaa8b6984b601f84d705adc47d8a58" ,
@@ -54,6 +56,8 @@ load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
54
56
55
57
rules_js_dependencies ()
56
58
59
+ load ("@rules_nodejs//nodejs:repositories.bzl" , "nodejs_register_toolchains" )
60
+
57
61
NODE_VERSION = "22.0.0"
58
62
59
63
NODE_REPOSITORIES = {
@@ -66,17 +70,39 @@ NODE_REPOSITORIES = {
66
70
"22.0.0-windows_amd64" : ("node-v22.0.0-win-x64.zip" , "node-v22.0.0-win-x64" , "32d639b47d4c0a651ff8f8d7d41a454168a3d4045be37985f9a810cf8cef6174" ),
67
71
}
68
72
73
+ nodejs_register_toolchains (
74
+ name = "nodejs" ,
75
+ node_repositories = NODE_REPOSITORIES ,
76
+ node_version = NODE_VERSION ,
77
+ )
78
+
69
79
load ("@aspect_rules_js//js:toolchains.bzl" , "rules_js_register_toolchains" )
70
80
71
81
rules_js_register_toolchains (
72
82
node_repositories = NODE_REPOSITORIES ,
73
83
node_version = NODE_VERSION ,
74
84
)
75
85
86
+ load ("@build_bazel_rules_nodejs//:index.bzl" , "yarn_install" )
87
+
88
+ # TODO(devversion): Remove this once `ng_package` is ported over to `rules_js`.
89
+ yarn_install (
90
+ name = "npm" ,
91
+ data = [
92
+ "//tools/bazel/legacy-rnjs:.yarn/patches/@angular-bazel-https-c46f484fb8.patch" ,
93
+ "//tools/bazel/legacy-rnjs:.yarn/releases/yarn-4.5.0.cjs" ,
94
+ "//tools/bazel/legacy-rnjs:.yarnrc.yml" ,
95
+ ],
96
+ exports_directories_only = False ,
97
+ package_json = "//tools/bazel/legacy-rnjs:package.json" ,
98
+ yarn = "//tools/bazel/legacy-rnjs:.yarn/releases/yarn-4.5.0.cjs" ,
99
+ yarn_lock = "//tools/bazel/legacy-rnjs:yarn.lock" ,
100
+ )
101
+
76
102
load ("@aspect_rules_js//npm:repositories.bzl" , "npm_translate_lock" )
77
103
78
104
npm_translate_lock (
79
- name = "npm " ,
105
+ name = "npm2 " ,
80
106
custom_postinstalls = {
81
107
"@angular/animations" : "node ../../@nginfra/angular-linking/index.mjs" ,
82
108
"@angular/common" : "node ../../@nginfra/angular-linking/index.mjs" ,
@@ -149,7 +175,7 @@ npm_translate_lock(
149
175
verify_node_modules_ignored = "//:.bazelignore" ,
150
176
)
151
177
152
- load ("@npm //:repositories.bzl" , "npm_repositories" )
178
+ load ("@npm2 //:repositories.bzl" , "npm_repositories" )
153
179
154
180
npm_repositories ()
155
181
@@ -204,7 +230,7 @@ setup_dependencies_2()
204
230
205
231
git_repository (
206
232
name = "rules_angular" ,
207
- commit = "005c80615934c891d729d5efc1ae661f9e3210c4 " ,
233
+ commit = "514eda9ec00a6745dc11b2a62d7be2634199171e " ,
208
234
remote = "https://github.com/devversion/rules_angular.git" ,
209
235
)
210
236
0 commit comments