Closed elliottsj closed 9 years ago
Well, that's quite annoying - I wish we had tests for this now.
What does the normal shrinkwrap look like for that? Can you tell the difference between that and a normal dependency from the shrinkwrap?
Yep, here's a snippet from a normal shrinkwrap using jsdoc:
"strip-json-comments": {
"version": "1.0.4",
"from": "strip-json-comments@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz"
},
"taffydb": {
"version": "2.6.2",
"from": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e",
"resolved": "https://github.com/hegemonic/taffydb/tarball/7d100bcee0e997ee4977e273cdce60bd8933050e"
},
In the case of taffydb, it looks like shrinkwrap just copies the URL exactly from package.json to the "from"
and "resolved"
fields.
Cool, I reckon the fix is to retain "resolved" if it is equal to "from".
Will accept a pull request, or if not I'll fix myself soonish.
Released as 1.2.0
Awesome, thanks!
For example, jsdoc depends on a URL for taffydb:
However the resulting npm-shrinkwrap.json omits the URL:
And since v2.6.2 is not available on npm, this error occurs: