Skip to content

refactor(@angular/cli): convert npm-package-arg usage from require to import #21429

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 1 commit into from
Jul 27, 2021

Conversation

clydin
Copy link
Member

@clydin clydin commented Jul 27, 2021

The typings package was already present for npm-package-arg and the removal of require usage supports the eventual shift to an ESM output for the CLI package.

…to import

The typings package was already present for `npm-package-arg` and the removal of require usage supports the eventual shift to an ESM output for the CLI package.
@clydin clydin added the target: minor This PR is targeted for the next minor release label Jul 27, 2021
@google-cla google-cla bot added the cla: yes label Jul 27, 2021
@@ -235,6 +231,28 @@ export class AddCommand extends SchematicCommand<AddCommandSchema> {
return this.executeSchematic(collectionName, options['--']);
}

private async isProjectVersionValid(packageIdentifier: npa.Result): Promise<boolean> {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was refactored into a separate method to avoid the 200 line limit for the run method.

@clydin clydin requested a review from alan-agius4 July 27, 2021 16:14
@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Jul 27, 2021
@clydin clydin merged commit 9a828a4 into angular:master Jul 27, 2021
@clydin clydin deleted the esm/npa-to-import branch July 27, 2021 16:52
@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 Aug 27, 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.

2 participants