Skip to content
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

test(pkgJson): make expectations work for npm 5 to 7 #865

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

raphinesse
Copy link
Contributor

@raphinesse raphinesse commented Dec 16, 2020

Motivation and Context

In some cases, npm 7 causes the package.json to look slightly different than with npm 6. This PR changes our tests so that they work with both flavors.

Description

This PR addresses the following differences:

Saved GitHub URL format in package.json:

  • npm 6: git+https://github.com/apache/cordova-android.git#4.1.x
  • npm 7: github:apache/cordova-android#4.1.x

Empty devDependencies format in package.json:

  • npm 6: {}
  • npm 7: undefined

Testing

This addresses the following changes in behavior.

Saved GitHub URL format in package.json:
- npm 6: git+https://github.com/apache/cordova-android.git#4.1.x
- npm 7: github:apache/cordova-android#4.1.x

Empty devDependencies format in package.json:
- npm 6: `{}`
- npm 7: `undefined`
@raphinesse raphinesse added the bug label Dec 16, 2020
@raphinesse raphinesse added this to the 10.0.1 milestone Dec 16, 2020
Copy link
Contributor

@breautek breautek left a comment

Choose a reason for hiding this comment

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

lgtm.

Tested and observed that one error as mentioned. Hopefully a future NPM release will resolve that error without any additional changes required on our end.

@raphinesse raphinesse merged commit ef18688 into apache:master Dec 16, 2020
@raphinesse raphinesse deleted the npm7 branch December 16, 2020 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants