11workspace (
22 name = "devinfra" ,
3- managed_directories = {"@npm" : ["node_modules" ]},
43)
54
65load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" , "http_file" )
76
7+ NODE_VERSION = "18.20.0"
8+
89# The PKG rules are needed to build tar packages for integration tests. The builtin
910# rule in `@bazel_tools` is not Windows compatible and outdated.
1011http_archive (
@@ -50,16 +51,34 @@ nodejs_register_toolchains(
5051 "18.20.0-windows_amd64" : ("node-v18.20.0-win-x64.zip" , "node-v18.20.0-win-x64" , "1c0aab05cc6836a8f5148cca345b92ebc948a4a2013f18d117b7ade6ff05aca6" ),
5152 },
5253 # We need at least Node 18.17 due to some transitive dependencies.
53- node_version = "18.20.0" ,
54+ node_version = NODE_VERSION ,
5455)
5556
57+ http_archive (
58+ name = "aspect_rules_js" ,
59+ sha256 = "875b8d01af629dbf626eddc5cf239c9f0da20330f4d99ad956afc961096448dd" ,
60+ strip_prefix = "rules_js-2.1.3" ,
61+ url = "https://github.com/aspect-build/rules_js/releases/download/v2.1.3/rules_js-v2.1.3.tar.gz" ,
62+ )
63+
64+ load ("@aspect_rules_js//js:repositories.bzl" , "rules_js_dependencies" )
65+
66+ rules_js_dependencies ()
67+
68+ load ("@aspect_rules_js//js:toolchains.bzl" , "rules_js_register_toolchains" )
69+
70+ rules_js_register_toolchains ()
71+
5672load ("@build_bazel_rules_nodejs//:index.bzl" , "yarn_install" )
5773
5874yarn_install (
5975 name = "npm" ,
6076 # Yarn Berry/v2+ expects `--immutable` instead of `--frozen-lockfile`.
6177 args = ["--immutable" ],
6278 data = [
79+ "//:.yarn/patches/@angular-bazel-npm.patch" ,
80+ "//:.yarn/patches/@bazel-jasmine-npm.patch" ,
81+ "//:.yarn/patches/@octokit-graphql-schema-npm-15.3.0-4046a59648.patch" ,
6382 "//:.yarn/releases/yarn-4.6.0.cjs" ,
6483 "//:.yarnrc.yml" ,
6584 ],
@@ -68,9 +87,6 @@ yarn_install(
6887 # 2. Incompatibilites with the `ts_library` rule.
6988 exports_directories_only = False ,
7089 package_json = "//:package.json" ,
71- # We prefer to symlink the `node_modules` to only maintain a single install.
72- # See https://github.com/angular/dev-infra/pull/446#issuecomment-1059820287 for details.
73- symlink_node_modules = True ,
7490 yarn = "//:.yarn/releases/yarn-4.6.0.cjs" ,
7591 yarn_lock = "//:yarn.lock" ,
7692)
@@ -128,3 +144,25 @@ http_file(
128144 sha256 = "61ce1dc62fdcfd6d68624a403e0f04c5fd5136d933b681467aad1ad2d00dbb03" ,
129145 urls = ["https://raw.githubusercontent.com/bazelbuild/bazel/5.0.0/src/main/protobuf/test_status.proto" ],
130146)
147+
148+ http_archive (
149+ name = "aspect_rules_ts" ,
150+ sha256 = "013a10b2b457add73b081780e604778eb50a141709f9194298f97761acdcc169" ,
151+ strip_prefix = "rules_ts-3.4.0" ,
152+ url = "https://github.com/aspect-build/rules_ts/releases/download/v3.4.0/rules_ts-v3.4.0.tar.gz" ,
153+ )
154+
155+ load ("@aspect_rules_ts//ts:repositories.bzl" , "rules_ts_dependencies" )
156+
157+ rules_ts_dependencies (
158+ ts_integrity = "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==" ,
159+ ts_version_from = "//bazel:package.json" ,
160+ )
161+
162+ load ("//bazel:setup_dependencies_1.bzl" , "setup_dependencies_1" )
163+
164+ setup_dependencies_1 ()
165+
166+ load ("//bazel:setup_dependencies_2.bzl" , "setup_dependencies_2" )
167+
168+ setup_dependencies_2 ()
0 commit comments