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

[BUG] Git tag handling regression in 6.14.5 #1528

Closed
KevinCathcart opened this issue Jul 16, 2020 · 1 comment
Closed

[BUG] Git tag handling regression in 6.14.5 #1528

KevinCathcart opened this issue Jul 16, 2020 · 1 comment
Assignees
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release

Comments

@KevinCathcart
Copy link

What / Why

NPM 6.14.5 and 6.15.6 have a regression in handling of git tags.

How

Current Behavior

Under 6.14.4 if you add a package from a specific git tag, run install, then change the tag in package.json,
and run install again, the package gets updated.

Under 6.15.5

Steps to Reproduce

The following example use pacote, not because it is realistic, since all its tags are published versions,
but because I know it is publicly accessible, and it can still show off the problem.

Notice that the package and lock file were not updated if using 6.14.5 or 6.14.6.

Expected Behavior

Same as 6.14.4: Package and package-lock.json are updated, the same as if I changed the a normal version number to something incompatible with the version specified in package-lock.json.

References

I suspect the cause is a side effect of the change to the childDependencySpecifier call in PR #758:
33ec41f#diff-5081bd1aabac431eccfb75bfa08bde1bL573

If I recall correctly, the _from value was used to determine if the git branch specified in the package-lock.json actually matches what is specified in package.json. Not passing in that information breaks this check.

@darcyclarke darcyclarke added Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release labels Jul 17, 2020
@claudiahdz
Copy link
Contributor

Hi! Thank you for reporting this bug. It has been taken care of and the fix will likely be included in the next patch release of the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests

3 participants