-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: add automation for updating acorn dependency
Add a Github Action that checks for new versions of the `acorn` and `acorn-walk` dependencies, and creates PRs to update them if newer versions than the ones present in the repo are found. Refs: nodejs/security-wg#828 PR-URL: #45357 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
- Loading branch information
1 parent
cc1f41a
commit 2ca30ca
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
# Shell script to update acorn-walk in the source tree to the latest release. | ||
|
||
# This script must be in the tools directory when it runs because it uses the | ||
# script source file path to determine directories to work in. | ||
|
||
set -ex | ||
|
||
cd "$( dirname "$0" )/.." || exit | ||
rm -rf deps/acorn/acorn-walk | ||
|
||
( | ||
rm -rf acorn-walk-tmp | ||
mkdir acorn-walk-tmp | ||
cd acorn-walk-tmp || exit | ||
|
||
ROOT="$PWD/.." | ||
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node" | ||
[ -x "$NODE" ] || NODE=$(command -v node) | ||
NPM="$ROOT/deps/npm/bin/npm-cli.js" | ||
|
||
"$NODE" "$NPM" init --yes | ||
|
||
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts acorn-walk | ||
) | ||
|
||
mv acorn-walk-tmp/node_modules/acorn-walk deps/acorn | ||
|
||
rm -rf acorn-walk-tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
# Shell script to update acorn in the source tree to the latest release. | ||
|
||
# This script must be in the tools directory when it runs because it uses the | ||
# script source file path to determine directories to work in. | ||
|
||
set -ex | ||
|
||
cd "$( dirname "$0" )/.." || exit | ||
rm -rf deps/acorn/acorn | ||
|
||
( | ||
rm -rf acorn-tmp | ||
mkdir acorn-tmp | ||
cd acorn-tmp || exit | ||
|
||
ROOT="$PWD/.." | ||
[ -z "$NODE" ] && NODE="$ROOT/out/Release/node" | ||
[ -x "$NODE" ] || NODE=$(command -v node) | ||
NPM="$ROOT/deps/npm/bin/npm-cli.js" | ||
|
||
"$NODE" "$NPM" init --yes | ||
|
||
"$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts acorn | ||
) | ||
|
||
mv acorn-tmp/node_modules/acorn deps/acorn | ||
|
||
rm -rf acorn-tmp/ |