Team development workflows and pain mitigation with npm
@linclark
You're always dealing with a team...
even when you're “one” person
$ npm install
$ npm update
$ npm start
foo.bar;
^
ReferenceError: foo is not defined
at Object.<anonymous> (/Users/your_user/Repos/foo/cli.js:10:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
{
"name": ...,
"version": ...,
"scripts": {
"test": "mocha",
"prepublish": "npm ls && npm test"
}
}
{
"name": "your-pkg",
"version": ...,
"dependencies": {
"foo": "2.x"
}
}
{
"name": "their-pkg",
"version": ...,
"dependencies": {
"foo": "1.x"
}
}
// npm-shrinkwrap.json
{
"name": "...",
"version": "...",
"dependencies": {
"github": {
"version": "0.2.3",
"from": "github@*",
"resolved": "https://registry.npmjs.org/github/-/github-0.2.3.tgz"
},
"js-yaml": {
"version": "3.2.5",
"from": "js-yaml@*",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.2.5.tgz",
"dependencies": {
"argparse": {
"version": "0.1.16",
$ npm shrinkwrap
wrote npm-shrinkwrap.json
@linclark