GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: use bundled npm in update scripts · nodejs/node@bd62771

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools
    • update-babel-eslint.sh
    • update-eslint.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/update-babel-eslint.sh‎

Copy file name to clipboardExpand all lines: tools/update-babel-eslint.sh
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,27 @@
22

33
# Shell script to update babel-eslint in the source tree to the latest release.
44

5-
# Depends on npm, npx, and node being in $PATH.
6-
75
# This script must be be in the tools directory when it runs because it uses
86
# $0 to determine directories to work in.
97

108
cd "$( dirname "${0}" )" || exit
119
rm -rf node_modules/@babel
1210
mkdir babel-eslint-tmp
1311
cd babel-eslint-tmp || exit
14-
npm init --yes
1512

16-
npm install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-top-level-await@latest
13+
ROOT="$PWD/../.."
14+
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
15+
[ -x "$NODE" ] || NODE=`command -v node`
16+
NPM="$ROOT/deps/npm"
17+
18+
"$NODE" "$NPM" init --yes
19+
"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock @babel/core @babel/eslint-parser@latest @babel/plugin-syntax-class-properties@latest @babel/plugin-syntax-top-level-await@latest
1720

1821
# Use dmn to remove some unneeded files.
19-
npx [email protected] -f clean
22+
"$NODE" "$NPM" exec -- [email protected] -f clean
2023
# Use removeNPMAbsolutePaths to remove unused data in package.json.
2124
# This avoids churn as absolute paths can change from one dev to another.
22-
npx [email protected] .
25+
"$NODE" "$NPM" exec -- [email protected] .
2326

2427
cd ..
2528
mv babel-eslint-tmp/node_modules/@babel node_modules/@babel
Collapse file

‎tools/update-eslint.sh‎

Copy file name to clipboardExpand all lines: tools/update-eslint.sh
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# Shell script to update ESLint in the source tree to the latest release.
44

5-
# Depends on npm, npx, and node being in $PATH.
6-
75
# This script must be in the tools directory when it runs because it uses the
86
# script source file path to determine directories to work in.
97

@@ -12,16 +10,22 @@ rm -rf node_modules/eslint node_modules/eslint-plugin-markdown
1210
(
1311
mkdir eslint-tmp
1412
cd eslint-tmp || exit
15-
npm init --yes
1613

17-
npm install --global-style --no-bin-links --production --no-package-lock eslint@latest
18-
npm install --global-style --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest
14+
ROOT="$PWD/../.."
15+
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node"
16+
[ -x "$NODE" ] || NODE=`command -v node`
17+
NPM="$ROOT/deps/npm"
18+
19+
"$NODE" "$NPM" init --yes
20+
21+
"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock eslint@latest
22+
"$NODE" "$NPM" install --global-style --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest
1923

2024
# Use dmn to remove some unneeded files.
21-
npx [email protected] -f clean
25+
"$NODE" "$NPM" exec -- [email protected] -f clean
2226
# Use removeNPMAbsolutePaths to remove unused data in package.json.
2327
# This avoids churn as absolute paths can change from one dev to another.
24-
npx [email protected] .
28+
"$NODE" "$NPM" exec -- [email protected] .
2529
)
2630

2731
mv eslint-tmp/node_modules/eslint node_modules/eslint

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.