Skip to content

[BUG] Git tag handling regression in 6.14.5 #1528

Closed
@KevinCathcart

Description

@KevinCathcart

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.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingRelease 6.xwork is associated with a specific npm 6 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions