Skip to content

Conversation

devversion
Copy link
Member

@devversion devversion commented Jan 15, 2025

"rc" port of #29349

This is necessary as `rules_js` requires this "common name" when dealing
with Yarn workspaces, linking first party dependencies automatically.

In the future, we may be able to send a PR to `rules_js` to support a
custom name somehow.
This is necessary as with the new compilation, leveraging pnpm-linked
first party dependencies, there are cases **during migration** where
multiple locations of the same package exist. e.g.

- `@angular_devkit/architect/node_modules/@angular-devkit/core` (pnpm package output)
- `@angular_devkit/core` (plain js sources)

This is fine, and there is no risk of wrong types, and this should only
occur during migration anyway, but it causes a few type issues as
TypeScript is unable to emit proper types for inference. This is okay,
as we'd likely even want to make use of `isolatedDeclarations` at some
point, but we just add explicit types right now.

(also making `Builder` type more type safe, checking assignability
properly).
…les_js`

Instead of using `rules_nodejs` interop and the linker at runtime, the
test target is migrated to the new `jasmine_test` rule, leveraging the
pnpm workspace for first-party dependencies.

Note that in the future we may be able to rename the local node modules
to something more clear. e.g. `:local_modules/@angular-devkit/core`, but
for now this is not possible :(

This commit shows how similar packages can be migrated in the future.
@devversion devversion requested a review from clydin January 15, 2025 18:23
@devversion devversion added the target: rc This PR is targeted for the next release-candidate label Jan 15, 2025
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Jan 15, 2025
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer and removed area: build & ci Related the build and CI infrastructure of the project labels Jan 15, 2025
@devversion devversion marked this pull request as ready for review January 15, 2025 18:24
@devversion devversion changed the title [19.1.x] build: migrate @angular-devkit/architect jasmine test to native rules_js [19.1.x] build: migrate @angular-devkit/architect jasmine test to native rules_js Jan 15, 2025
@devversion devversion added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 15, 2025
@devversion devversion merged commit a092dfd into angular:19.1.x Jan 15, 2025
35 checks passed
@devversion devversion deleted the patch-port-jasmine branch January 15, 2025 18:57
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants