15 Commits

Author SHA1 Message Date
Joey Perrott 31e3eb20f9 build: migrate to use web test runner rules (#62294)
Migrate karma tests throughout the repo to use the new web test runner based rule instead

PR Close #62294
2025-06-26 17:20:49 +00:00
Joey Perrott 4e26ef996b build: migrate to using new jasmine_test (#62132)
Migrate additional targets to jasmine_test

PR Close #62132
2025-06-19 10:04:46 +02:00
Joey Perrott f201df9b83 build: migrate to using new jasmine_test (#62106)
Use the new jasmine_test based on rules_js instead of jasmine_node_test from rules_nodejs

PR Close #62106
2025-06-18 17:59:50 +02:00
Paul Gschwendtner d16c1cf462 build: migrate packages/core/test to new jasmine_test rule (#61902)
Migrates `packages/core/test` to the new `jasmine_test` rule. As part of
this, we are also removing an unnecessary/unused test fixture.

PR Close #61902
2025-06-12 10:00:10 +02:00
Paul Gschwendtner 7c43fa6932 build: update node loader to support zone.js (#61902)
Temporarily updates the new Node loader to work with `zone.js` `.mjs`
files that are still ending up at runtime due to this package using
`ts_library`.

PR Close #61902
2025-06-12 10:00:10 +02:00
Paul Gschwendtner a696ce2267 build: add jasmine_test macro for replacing jasmine_node_test legacy rule (#61902)
This commit introduces the new `jasmine_test` macro that can be an
"almost" drop-in replacement for `jasmine_test`.

PR Close #61902
2025-06-12 10:00:10 +02:00
Paul Gschwendtner ff3d2278f6 build: add small comment for ng_package_link_interop.bzl (#61902)
This should make the intent a little more clearer if someone
just looks at this file.

PR Close #61902
2025-06-12 10:00:10 +02:00
Paul Gschwendtner 23e3c6a7c9 build: introduce NodeJS loader for rules_js Node execution (#61895)
For the `rules_js` migration, we are facing the problem where
our current Angular code is shipped as ESM, but we aren't fully
there yet with fully compliant strict ESM during development.

That is because we lack explicit import extensions, and it's also a
different story how this would work in Google3, if we were to add them.

In addition, we cross-import from our packages using npm module names.
This works well for TS, for ESBuild because those can respect path
mappings— but at runtime, when executing native `jasmine_test`'s— such
mappings aren't respected. The options here are:

- avoid module imports in the repo (impossible; undesired)
- use pre-bundling of all NodeJS execution involving npm package code
  (slower, extra build action cost)
- wire up a simple NodeJS loader (supported via official APIs) to simply
  account for our cases (preferred and similar to what we experimented
  with for the last year(s); and worked well)

This commit implements the last option and allows for an easy migration
to `rules_js`, and also is pretty reasonable. Long-term we can resolve
the extension problem if we e.g. migrate to real explicit extensions + a
proper TS module resolution like e.g. `nodenext`.

PR Close #61895
2025-06-05 13:33:52 +02:00
Paul Gschwendtner 8564cf48d8 build: replace all ng_package with new rule from rules_angular (#61862)
Replaces all `ng_package` rule with the new rule from `rules_angular`.

PR Close #61862
2025-06-05 07:34:50 +00:00
Paul Gschwendtner a24fb53a73 build: remove packages/bazel (#61862)
Removes the `@angular/bazel` package as we no longer need it. Yay!

It's replaced by `rules_angular`.

PR Close #61862
2025-06-05 07:34:50 +00:00
Paul Gschwendtner 7a3039c093 build: add modified version of tsec that can work with interop (#61335)
As we roll out more PRs that migrate to `ts_project`, we need to make
sure that we don't break existing `tsec` targets. This PR copies the
original `tsec` Starlark code and adjusts it to work with the interop.

Note that we don't patch as this would unnecessarily complicate this
file that only exists during migration. Long-term, after migration, we
either need to consider switching to the new ESLint plugin that is being
worked on (I'm in contact with the team), or we send a CL to update the
Tsec Starlark code to keep our changes minimal and avoid scope increase.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 116550f680 build: fix ts_project interop to properly create linker mappings (#61335)
This commit fixes that the interop targets weren't properly creating
linker mappings in some cases. This could break spec bundling.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 5c1d2eb262 build: support new ng_project rule (#61335)
Supports the `ng_project` rule with the local compiler-cli version
from HEAD.

PR Close #61335
2025-05-14 08:35:14 -07:00
Paul Gschwendtner 2bd9edf0b2 build: migrate symbol-extractor to ts_project (#61197)
Migrates the symbol-extractor code to `ts_project`.

PR Close #61197
2025-05-08 09:24:30 -07:00
Joey Perrott 1c610a57de build: set up ts_project interop for rules_js migration (#61087)
The `ts_project` interop rule that we've built was also used in the
Angular CLI migration, and it allows us to mix `ts_project` and
`ts_library` targets; enabling an incremental migration. Additionally
set up the `ng_project` to replace `ng_module`.

PR Close #61087
2025-05-02 09:12:23 -07:00