Skip to content

Commit 49eb83b

Browse files
committed
[npm] Add the semver caret to package.json deps
The caret is standard for `npm --save` and makes it easier to get bugfixes from package maintainers. As I understand it, Facebook pins the versions since the packages are manually downloaded. One issue with this is that the dependencies of dependencies aren't pinned so what probably makes the most sense for Facebook is to use `npm shrinkwrap` which recursively pins the versions of all dependencies. How this works is: 1. Someone at Facebook manually downloads the latest version of an npm package they want to use 2. They add the entry to package.json using the caret, ex: `"babel": "^5.6.5"` 3. They run `npm shrinkwrap` to generate npm-shrinkwrap.json so the exact versions of the packages are recorded and if you were to run `npm install` then it would know to get those specific versions (example npm-shrinkwrap.json: https://gist.github.com/ide/a2f6e6818802e39978d5) 4. package.json is synced out to GitHub but npm-shrinkwrap.json is not 5. External users run `npm install` and get the latest compatible versions of all packages Test Plan: Ran UIExplorer and tested the Chrome debugger.
1 parent f744485 commit 49eb83b

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,35 +45,35 @@
4545
"react-native-start": "packager/packager.sh"
4646
},
4747
"dependencies": {
48-
"absolute-path": "0.0.0",
49-
"babel": "5.4.3",
48+
"absolute-path": "^0.0.0",
49+
"babel": "^5.4.3",
5050
"bluebird": "^2.9.21",
5151
"chalk": "^1.0.0",
52-
"connect": "2.8.3",
53-
"debug": "~2.1.0",
52+
"connect": "^2.8.3",
53+
"debug": "^2.1.0",
5454
"graceful-fs": "^3.0.6",
55-
"image-size": "0.3.5",
56-
"joi": "~5.1.0",
57-
"jstransform": "11.0.1",
58-
"module-deps": "3.5.6",
59-
"optimist": "0.6.1",
55+
"image-size": "^0.3.5",
56+
"joi": "^5.1.0",
57+
"jstransform": "^11.0.1",
58+
"module-deps": "^3.5.6",
59+
"optimist": "^0.6.1",
6060
"promise": "^7.0.0",
6161
"react-timer-mixin": "^0.13.1",
62-
"react-tools": "0.13.2",
62+
"react-tools": "^0.13.2",
6363
"rebound": "^0.0.12",
6464
"sane": "^1.1.2",
65-
"source-map": "0.1.31",
65+
"source-map": "^0.1.31",
6666
"stacktrace-parser": "frantic/stacktrace-parser#493c5e5638",
67-
"uglify-js": "~2.4.16",
68-
"underscore": "1.7.0",
67+
"uglify-js": "^2.4.16",
68+
"underscore": "^1.7.0",
6969
"worker-farm": "^1.3.1",
70-
"ws": "0.4.31",
71-
"yargs": "1.3.2"
70+
"ws": "^0.4.31",
71+
"yargs": "^1.3.2"
7272
},
7373
"devDependencies": {
74-
"jest-cli": "0.4.5",
75-
"babel-eslint": "3.1.5",
76-
"eslint": "0.21.2",
77-
"eslint-plugin-react": "2.3.0"
74+
"jest-cli": "^0.4.5",
75+
"babel-eslint": "^3.1.5",
76+
"eslint": "^0.21.2",
77+
"eslint-plugin-react": "^2.3.0"
7878
}
7979
}

0 commit comments

Comments
 (0)