-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Migrate more tests to rules_js
#29423
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a small correction.
…ia test runner in pnpm workspaces Currently when operating within a pnpm workspace and leveraging the schematic test runner, there are situations where e.g. `@schematics/angular` cannot be resolved. Consider this pnpm node modules structure: ``` packages/ pwa/ node_modules/@schematics/angular --> .pnpm-store/@schematics/angular/... node_modules/@angular-devkit/schematics --> .pnpm-store/@angular-devkit/schematics/... index_spec.js // trying to call external schematic `@schematics/angular` ``` This above setup will fail because `@schematics/angular` is attempted to be resolved from within the devkit schematics code, which doesn't have access, or a dependency on `@schematics/angular`. We can use the specified collection of the test runner to determine a good "resolution lookup site", similiar to how it happens with the real `ng update` command.
This commit changes the execution of `@angular/pwa` tests to `rules_js` native `jasmine_test`. This requires setting it up in the pnpm workspace for first-party linked dependencies. Notably it turns out the peer dependency placeholder was incorrect, so we are fixing it here and nicely avoid a problem where pnpm would otherwise not find a local, or external suitable version. As we originally tried to work without the fix for the peer dependency range, there was supported added for extra substitutions. We are keeping that logic as it will likely be useful in the future.
Migrates the `@angular-devkit/build-webpack` jasmine tests to `rules_js`. This requires wiring up in the pnpm workspace. Additionally `typescript` is added as it was missing as a "peer dependency" at runtime for `@ngtools/webpack`. This is expected, and we're already adding other peer deps before this change.
d636ce2
to
ad247d1
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
See individual commits