Skip to content

fix(@angular/cli): direct Angular schematic dependency requests to known versions #19857

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
merged 2 commits into from
Jan 28, 2021

Conversation

clydin
Copy link
Member

@clydin clydin commented Jan 23, 2021

This change adds logic to redirect module resolution requests for Angular schematics to ensure that the correct versions of core schematic related packages are used. This also ensures that the runtime version of the schematics package matches the version used inside the schematic and that object instances passed into the schematic are compatible.
The current set of core schematic related packages are @angular-devkit/* and @schematics/angular. Only first-party Angular schematics are currently affected by this change.
This change also solves issues such as #16392 which were caused by the package manager not hoisting the core schematic packages to a location the update migrations could access.

@google-cla google-cla bot added the cla: yes label Jan 23, 2021
@clydin clydin force-pushed the schematics-rewire-deps branch 2 times, most recently from b30210e to 15a92ab Compare January 24, 2021 00:48
@clydin clydin force-pushed the schematics-rewire-deps branch 3 times, most recently from 2113c81 to 451cc8a Compare January 26, 2021 00:47
…kflow engine host

This adds an option to the NodeWorkflow to allow a custom NodeModulesEngineHost to be used with the workflow.
…known versions

This change adds logic to redirect module resolution requests for Angular schematics to ensure that the correct versions of core schematic related packages are used.  This also ensures that the runtime version of the schematics package matches the version used inside the schematic and that object instances passed into the schematic are compatible.
The current set of core schematic related packages are `@angular-devkit/*` and `@schematics/angular`.  Only first-party Angular schematics are currently affected by this change.
@clydin clydin force-pushed the schematics-rewire-deps branch from 451cc8a to a2caf64 Compare January 26, 2021 16:46
@clydin clydin requested a review from alan-agius4 January 26, 2021 17:05
/**
* Minimal shim modules for legacy deep imports of `@schematics/angular`
*/
const legacyModules: Record<string, unknown> = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call to add a shim

@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jan 28, 2021
@alan-agius4 alan-agius4 linked an issue Jan 28, 2021 that may be closed by this pull request
15 tasks
@clydin clydin added the target: minor This PR is targeted for the next minor release label Jan 28, 2021
@alan-agius4 alan-agius4 merged commit 86d69e2 into angular:master Jan 28, 2021
@clydin clydin deleted the schematics-rewire-deps branch January 28, 2021 12:19
@Splaktar
Copy link
Contributor

Thank you!

@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 Mar 1, 2021
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: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update migration to remove solution style tsconfig is not run
3 participants