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
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..."