Skip to content

Commit

Permalink
Prefer node 4.x, npm 2.x in development
Browse files Browse the repository at this point in the history
At the moment, our test suite won't run properly under npm 3.x, so let's
specify our requirement in the package.json.

Once npm 3.x goes "final" we'll make sure that we support both. In the
meantime, this will prevent developers running the tests from seeing
spurious failures like the ones reported here when using npm 3:

#396

Tested by installing npm 3, then running `npm install`, and seeing the
expected error from the `check-dev-engines.js` script:

    AssertionError: Current npm version is not supported for
    development, expected "3.0.0" to satisfy "2.x".
  • Loading branch information
wincent committed Oct 20, 2015
1 parent 537ccaa commit ae02584
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"repository": "facebook/relay",
"scripts": {
"build": "gulp",
"postinstall": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json",
"prepublish": "npm run build",
"test": "f() { EXIT=0; npm run typecheck || EXIT=$?; NODE_ENV=test jest $@ || EXIT=$?; exit $EXIT; }; f",
"typecheck": "flow check src/",
Expand Down Expand Up @@ -61,6 +62,10 @@
"webpack": "1.11.0",
"webpack-stream": "^2.1.0"
},
"devEngines": {
"node": "4.x",
"npm": "2.x"
},
"jest": {
"rootDir": "",
"scriptPreprocessor": "scripts/jest/preprocessor.js",
Expand Down

0 comments on commit ae02584

Please sign in to comment.