Skip to content
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

[19.2.x]: Second iteration of rules_js migration #30660

Merged
merged 4 commits into from
Mar 19, 2025

Conversation

devversion
Copy link
Member

No description provided.

For linking of Angular packages we are using something more clever than
what we are doing with `rules_nodejs`. Instead of maintaing complexity
where we pre-link FESM bundles and somehow inject them into other Bazel
bundling steps (with complex linker mappings), we pre-link as part of
individual package postinstall steps, exposing the linked bundles via a
NodeJS exports condition.

This is possible vis this package/script:
https://github.com/devversion/angular-linking

Clearly this is not at a good location, but it's necessary right now to
ship this code via npm because `rules_js` struggles to use pnpm
extensions onto workspace 1st-party packages. Long-term we can either
decide to keep it that way, move it into e.g. dev-infra repository, or
we can explore shipping pre-linked bundles via APF. TBD.
Migrates all `ts_library` targets in `tools/` to use the `rules_js`
`ts_project` rule.
Improves the `ts_project` interop to work with Esbuild bundling. Right
now we can end up with multiple copies of the same source file.

e.g. input might import from `@angular/cdk/testing` and end up with
the version of `rules_nodejs` linker, while other imports to the native
`ts_library` targets end up being mapped to their actual sources in the
`bazel-bin`, and not inside `node_modules`
Migrates more `ts_library` targets to `rules_js`
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Mar 19, 2025
@devversion devversion marked this pull request as ready for review March 19, 2025 16:47
@devversion devversion requested review from a team as code owners March 19, 2025 16:47
@devversion devversion requested review from crisbeto and mmalerba and removed request for a team March 19, 2025 16:47
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Mar 19, 2025
@devversion devversion merged commit f1ed784 into angular:19.2.x Mar 19, 2025
22 of 23 checks passed
@devversion devversion deleted the rjs-2-patch branch March 19, 2025 17:35
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants