Bug 1456085 - Increase ESLint's minimum node & npm requirements to 8.9.1 & 5.5.1 respectively. r?ahal draft
authorMark Banner <standard8@mozilla.com>
Tue, 08 May 2018 09:49:25 +0100
changeset 792362 946cdc828d12395ac69f8588c0bcb6cf43d6c9d7
parent 792270 59005ba3cd3e7b3f9e8804bea881bf4c3a755d7c
child 792481 c34f62409b45791f5a7e073ba50c27d7a13fac3c
push id109090
push userbmo:standard8@mozilla.com
push dateTue, 08 May 2018 08:56:03 +0000
reviewersahal
bugs1456085
milestone62.0a1
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
npm-shrinkwrap.json
package-lock.json
tools/lint/eslint/setup_helper.py
tools/lint/eslint/update.sh
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
 sys.path.append(os.path.join(
     os.path.dirname(__file__), "..", "..", "..", "third_party", "python", "which"))
 import which
 
-NODE_MIN_VERSION = "6.9.1"
-NPM_MIN_VERSION = "3.10.8"
+NODE_MIN_VERSION = "8.9.1"
+NPM_MIN_VERSION = "5.5.1"
 
 NODE_MACHING_VERSION_NOT_FOUND_MESSAGE = """
 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.
 """.strip()
 
 NPM_MACHING_VERSION_NOT_FOUND_MESSAGE = """
 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
 esac
 
 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..."