-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[20.0.x]: Patch port of elements and compiler rules_js
migration PR
#61769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migrates `packages/compiler` to `ts_project`.
Compiler now would have `.js` files. Those aren't picked up as ESM, unless we install the `package.json` with `type: module`. Sounds great on paper, but doesn't work in reality because the way the compiler packages are available to `api-gen/` is via the old `rules_nodejs` linker, so the `packages/package.json` wouldn't work; nor do the `package.json`s of the e.g. compiler-cli package work- because those already contain the `exports` of the built npm package. We fix this in a much more reasonable way, and the whole module resolution problem by leveraging the pnpm linking here. This works as expected.
Migrates `packages/elements` to `ng_project`.
See associated pull request for more information.
This is necessary to support later versions of e.g. `rules_ts`.
…er-cli Currently when linking the `@angular/compiler-cli` package, the peer dependency to `compiler` is not resolved and we are trying to make the compiler dependency available via `data`. This is unidiomatic and brittle. This commit fixes this.
The `app_bundle` rule does not work after the migration of `packages/compiler` to `ts_project` because the `.mjs` extensions are now missing in the non npm-package output. This causes runtime errors as `.js` is not recognized as ESM. Switching to the real npm package for usage, fixes this issue.
Since we are going to replace our `app_bundle` rule (custom ESBuild + Terser pipeline) with the real Angular CLI where shared/lazy/common chunks may exist, we need to update the symbol extractor to support multiple files. We could have just merged all symbols, but this commit tries to do better by detecting what symbols are loaded eagerly vs. lazily. This will be very useful for e.g. defer tests or other lazy features we are introducing in the feature.
Instead of dev-infra maintaining a custom ESBuild + Terser pipeline that tries to emulate the Angular CLI, we are switching the bundling core tests to a new rule that really leverages the Angular CLI. This involves some file renames and small adjustments. In addition, we leverage the updated symbol tracking rule to output new goldens that can work with multiple bundle files (as generated by the Angular CLI; especially with defer and its "lazy" chunks).
…on rule We are dropping the custom ESBuild and Terser pipeline from dev-infra and instead leverage the Angular CLI directly. This commit adjusts the benchmarks to use this new rule.
These are also excluded on CI, and shouldn't run locally either as they are "manual debug" targets.
crisbeto
approved these changes
May 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: merge
The PR is ready for merge by the caretaker
area: build & ci
Related the build and CI infrastructure of the project
PullApprove: disable
target: patch
This PR is targeted for the next patch release
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Patch port of #61566