Skip to content

fix(ng-update): do not throw if project does not have dependencies #18470

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

devversion
Copy link
Member

The v9 hammerjs migration in some cases tries to remove hammerjs
from the workspace package.json. It always assumes that there is
a dependencies property. This is not always guaranteed because a
project doesn't need to define this property. This change guards against
this case and avoids a runtime migration exception.

Fixes #18469.

The v9 hammerjs migration in some cases tries to remove `hammerjs`
from the workspace `package.json`. It always assumes that there is
a `dependencies` property. This is not always guaranteed because a
project doesn't need to define this property.

This change guards against this case and avoids a runtime migration
exception.

Fixes angular#18469.
@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Feb 12, 2020
@devversion devversion requested a review from jelbourn as a code owner February 12, 2020 10:42
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 12, 2020
@devversion
Copy link
Member Author

Note: I did not add a unit test for this change (had one initially) because it's an edge-case that a CLI project does not have any dependencies 😄

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Feb 12, 2020
@andrewseguin andrewseguin merged commit 01e4fba into angular:master Feb 20, 2020
andrewseguin pushed a commit that referenced this pull request Feb 20, 2020
…18470)

The v9 hammerjs migration in some cases tries to remove `hammerjs`
from the workspace `package.json`. It always assumes that there is
a `dependencies` property. This is not always guaranteed because a
project doesn't need to define this property.

This change guards against this case and avoids a runtime migration
exception.

Fixes #18469.

(cherry picked from commit 01e4fba)
@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 22, 2020
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 cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V9 hammerjs migration fails if project does not have dependencies in package.json
4 participants