Skip to content

fix(@angular/cli): add schema.json options to parsed command, also when a version is passed to ng add <package>@<version> #27767

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
Jun 4, 2024

Conversation

Platonn
Copy link
Contributor

@Platonn Platonn commented Jun 3, 2024

This commit fixes the method AddCommandModule.getCollectionName(), so it now returns only the package name, but remove the specified version (if present).

Previously, a @<version> specified in the const collectionName was causing a (silenced) error during the invocation of workflow.engine.createCollection(collectionName), which lead to skipping eventually the invocation of the method this.addSchemaOptionsToCommand() in the try/catch block.

fixes #27766

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #27766

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Platonn Platonn force-pushed the bugfix/GH-27766 branch from e3708b6 to 3216802 Compare June 3, 2024 14:13
@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Jun 3, 2024
@Platonn Platonn force-pushed the bugfix/GH-27766 branch from 3216802 to 8192276 Compare June 3, 2024 23:13
…when a version is passed to `ng add <package>@<version>`

This commit fixes the method `AddCommandModule.getCollectionName()`, so it now returns only the package name, but remove the specified version (if present).

Previously, a `@<version>` specified in the const `collectionName` was causing a (silenced) error during the invocation of `workflow.engine.createCollection(collectionName)`, which lead to skipping eventually the invocation of the method `this.addSchemaOptionsToCommand()` in the try/catch block.

fixes angular#27766
@Platonn Platonn force-pushed the bugfix/GH-27766 branch from 8192276 to ae6e6a1 Compare June 4, 2024 13:01
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Jun 4, 2024
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@dgp1130 dgp1130 merged commit ce8b5a3 into angular:main Jun 4, 2024
31 checks passed
@dgp1130
Copy link
Collaborator

dgp1130 commented Jun 4, 2024

The changes were merged into the following branches: main, 18.0.x

@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 Jul 5, 2024
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: patch This PR is targeted for the next patch release
Projects
None yet
3 participants