Bug 1456085 - Increase ESLint's minimum node & npm requirements to 8.9.1 & 5.5.1 respectively. r=ahal
authorMark Banner <standard8@mozilla.com>
Tue, 08 May 2018 09:49:25 +0100
changeset 462335 7048b011cc74d49e4db88b273892d6cb5cc3de04
parent 462334 22f9c6b26ccc77667e64c8f6b10716c1aa94f088
child 462336 7c83ceac4be6d055bebd870a82b78b76de14b9d7
child 462402 b0396db0229ca6122aee18398e41e229cfaa8eba
push id166
push userfmarier@mozilla.com
push dateThu, 10 May 2018 00:43:18 +0000
Bug 1456085 - Increase ESLint's minimum node & npm requirements to 8.9.1 & 5.5.1 respectively. r=ahal Also use package-lock.json rather than npm-shrinkwrap.json as we no longer need to support the latter. MozReview-Commit-ID: 4yaFcElvhF7
rename from npm-shrinkwrap.json
rename to package-lock.json
--- a/tools/lint/eslint/setup_helper.py
+++ b/tools/lint/eslint/setup_helper.py
@@ -12,18 +12,18 @@ import re
 from mozfile.mozfile import remove as mozfileremove
 import subprocess
 import sys
 from distutils.version import LooseVersion
     os.path.dirname(__file__), "..", "..", "..", "third_party", "python", "which"))
 import which
-NPM_MIN_VERSION = "3.10.8"
+NPM_MIN_VERSION = "5.5.1"
 nodejs is out of date. You currently have node v%s but v%s is required.
 Please update nodejs from https://nodejs.org and try again.
 npm is out of date. You currently have npm v%s but v%s is required.
--- a/tools/lint/eslint/update.sh
+++ b/tools/lint/eslint/update.sh
@@ -36,29 +36,26 @@ case "$choice" in
 echo ""
 echo "Removing node_modules and npm_shrinkwrap.json..."
 # Move to the top-level directory.
 cd ../../../
 rm -rf node_modules/
 rm -rf tools/lint/eslint/eslint-plugin-mozilla/node_modules
-rm npm-shrinkwrap.json
+rm package-lock.json
 echo "Installing eslint and external plugins..."
 # ESLint and all _external_ plugins are listed in this directory's package.json,
 # so a regular `npm install` will install them at the specified versions.
 # The in-tree eslint-plugin-mozilla is kept out of this tooltool archive on
 # purpose so that it can be changed by any developer without requiring tooltool
 # access to make changes.
 npm install
-echo "Creating npm shrinkwrap..."
-mv package-lock.json npm-shrinkwrap.json
 echo "Creating eslint.tar.gz..."
 tar cvz --exclude=eslint-plugin-mozilla --exclude=eslint-plugin-spidermonkey-js -f eslint.tar.gz node_modules
 echo "Adding eslint.tar.gz to tooltool..."
 rm tools/lint/eslint/manifest.tt
 ./python/mozbuild/mozbuild/action/tooltool.py add --visibility public --unpack eslint.tar.gz --url="https://api.pub.build.mozilla.org/tooltool/"
 echo "Uploading eslint.tar.gz to tooltool..."