Add check to ensure we actually get our commit #439
+30
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In npm/rfcs#525 about ignoring
integrityvalues in lockfiles it was stated:This is only true for resolutions from non-commits to commits.
A dependency like
git://...#4b559c4c663a23f988f6be5094c9a45faf6231bcwill be stored using the same "reference" inresolvedeven when it cloned a branch or a tag that resolved to a different sha.The update is only done if it hasn't been resolved yet, which is already the case if a full "commit" was specified:
pacote/lib/git.js
Lines 263 to 265 in 4b559c4
This also applies to
npm ciafter readingpackage-lock.jsonas it will use the same resolution.This will compare the newly returned commit-hash with a previously set
resolvedShaand prevent that from happening.