Skip to content

Instantly share code, notes, and snippets.

@shinout
Last active July 20, 2016 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinout/e3340d8b958823d6c7e741307c9bca99 to your computer and use it in GitHub Desktop.
Save shinout/e3340d8b958823d6c7e741307c9bca99 to your computer and use it in GitHub Desktop.
npm-v2-shrinkwrap-bug

状況

  • using npm v2.15.5
  • このpackageはnode-fetchに依存
  • このpackageはis-streamにdevDependenciesとして依存
  • node-fetchencodingis-streamに依存

期待される結果

npm-shrinkwrap.jsonnode-fetch, encodingおよびis-streamを含む。

実際の結果

is-streamが含まれない。 npm-shrinkwrap.jsonを参照のこと。

situation

  • using npm v2.15.5
  • this package depends on node-fetch
  • this package also depends on is-stream as devDependencies.
  • node-fetch depends on encoding and is-stream.

expected result

npm-shrinkwrap.json contains node-fetch, encoding and is-stream as production.

result

is-stream is missing. See npm-shrinkwrap.json.

sample@1.0.0 /Users/shinout/tmp/shrinkwrap-sample
├── is-stream@1.1.0
└─┬ node-fetch@1.5.3
└─┬ encoding@0.1.12
└── iconv-lite@0.4.13
{
"name": "sample",
"version": "1.0.0",
"dependencies": {
"node-fetch": {
"version": "1.5.3",
"from": "node-fetch@>=1.5.3 <2.0.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.5.3.tgz",
"dependencies": {
"encoding": {
"version": "0.1.12",
"from": "encoding@>=0.1.11 <0.2.0",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
"dependencies": {
"iconv-lite": {
"version": "0.4.13",
"from": "iconv-lite@>=0.4.13 <0.5.0",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz"
}
}
}
}
}
}
}
{
"name": "sample",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"node-fetch": "^1.5.3"
},
"devDependencies": {
"is-stream": "^1.1.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment