aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml6
-rwxr-xr-xtest/release/acorn.sh2
-rwxr-xr-xtest/release/buble.sh2
-rwxr-xr-xtest/release/butternut.sh2
-rwxr-xr-xtest/release/mathjs.sh2
-rwxr-xr-xtest/release/rollup-es.sh2
-rwxr-xr-xtest/release/rollup-ts.sh2
-rwxr-xr-xtest/release/sucrase.sh2
-rwxr-xr-xtest/release/web-tooling-benchmark.sh47
9 files changed, 58 insertions, 9 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 10cef9d6..5522cd30 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,8 +8,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- options: [ '-mb braces', '-mc', '--toplevel -mc passes=10,pure_getters,unsafe' ]
- script: [ acorn.sh, buble.sh, butternut.sh, mathjs.sh, rollup-es.sh, rollup-ts.sh, sucrase.sh ]
+ options: [ '-mb braces', '--ie8 -c', '-mc', '--toplevel -mc passes=3,pure_getters,unsafe' ]
+ script: [ acorn.sh, buble.sh, butternut.sh, mathjs.sh, rollup-es.sh, rollup-ts.sh, sucrase.sh, web-tooling-benchmark.sh ]
include:
- node: '14'
script: acorn.sh
@@ -25,6 +25,8 @@ jobs:
script: rollup-ts.sh
- node: '14'
script: sucrase.sh
+ - node: '14'
+ script: web-tooling-benchmark.sh
name: ${{ matrix.script }} ${{ matrix.options }}
runs-on: ubuntu-latest
env:
diff --git a/test/release/acorn.sh b/test/release/acorn.sh
index 0ebfc9ec..1adaa9c1 100755
--- a/test/release/acorn.sh
+++ b/test/release/acorn.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS=$@
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/buble.sh b/test/release/buble.sh
index 30455441..4bcec662 100755
--- a/test/release/buble.sh
+++ b/test/release/buble.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS=$@
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/butternut.sh b/test/release/butternut.sh
index fa5500b1..8e1ef71b 100755
--- a/test/release/butternut.sh
+++ b/test/release/butternut.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS=$@
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/mathjs.sh b/test/release/mathjs.sh
index 8969d551..f281df60 100755
--- a/test/release/mathjs.sh
+++ b/test/release/mathjs.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS="--annotations $@"
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/rollup-es.sh b/test/release/rollup-es.sh
index e19c88d9..3ff8b702 100755
--- a/test/release/rollup-es.sh
+++ b/test/release/rollup-es.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS=$@
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/rollup-ts.sh b/test/release/rollup-ts.sh
index 422e1ea1..5f6a17f8 100755
--- a/test/release/rollup-ts.sh
+++ b/test/release/rollup-ts.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS=$@
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/sucrase.sh b/test/release/sucrase.sh
index dfefb140..0576c167 100755
--- a/test/release/sucrase.sh
+++ b/test/release/sucrase.sh
@@ -4,7 +4,7 @@ alias uglify-js=$PWD/bin/uglifyjs
UGLIFY_OPTIONS=$@
minify_in_situ() {
- ARGS="$UGLIFY_OPTIONS --in-situ"
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
DIRS="$1"
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
for i in `find $DIRS -name '*.js'`
diff --git a/test/release/web-tooling-benchmark.sh b/test/release/web-tooling-benchmark.sh
new file mode 100755
index 00000000..cf089dbc
--- /dev/null
+++ b/test/release/web-tooling-benchmark.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+alias uglify-js="node --max-old-space-size=4096 $PWD/bin/uglifyjs"
+UGLIFY_OPTIONS=$@
+
+minify_in_situ() {
+ ARGS="$UGLIFY_OPTIONS --validate --in-situ"
+ DIRS="$1"
+ echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
+ for i in `find $DIRS -name '*.js'`
+ do
+ ARGS="$ARGS $i"
+ done
+ uglify-js $ARGS
+}
+
+rm -rf tmp/web-tooling-benchmark \
+&& git clone --depth 1 --branch v0.5.3 https://github.com/v8/web-tooling-benchmark.git tmp/web-tooling-benchmark \
+&& cd tmp/web-tooling-benchmark \
+&& rm -rf .git/hooks \
+&& patch -l -p1 <<EOF
+--- a/package.json
++++ b/package.json
+@@ -12 +11,0 @@
+- "postinstall": "npm run build:terser-bundled && npm run build:uglify-js-bundled && npm run build",
+--- a/src/cli-flags-helper.js
++++ b/src/cli-flags-helper.js
+@@ -7 +6,0 @@ const targetList = new Set([
+- "chai",
+--- a/src/cli.js
++++ b/src/cli.js
+@@ -18,0 +19 @@ suite.on("error", event => {
++ global.process.exitCode = 42;
+EOF
+ERR=$?; if [ "$ERR" != "0" ]; then echo "Error: $ERR"; exit $ERR; fi
+minify_in_situ "src" \
+&& minify_in_situ "third_party" \
+&& rm -rf node_modules \
+&& npm ci \
+&& rm -rf build/* \
+&& npm run build:terser-bundled \
+&& npm run build:uglify-js-bundled \
+&& minify_in_situ "build" \
+&& rm -rf dist \
+&& npm run build \
+&& minify_in_situ "dist" \
+&& node dist/cli.js