From 975dba27aaaf5ba5ade490ab12b66a7b1cec0684 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 7 Mar 2020 10:47:07 +0100 Subject: [PATCH] Replace no longer maintained uglify-es with terser See https://github.com/mishoo/UglifyJS2/issues/3156#issuecomment-392943058 --- package-lock.json | 59 ++++++++++++++++++++++++++++------------------- package.json | 8 +++---- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4eaa2d3c..58fbb26a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1063,6 +1063,12 @@ "electron-to-chromium": "^1.3.47" } }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -7306,6 +7312,35 @@ "uuid": "^3.3.2" } }, + "terser": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.6.tgz", + "integrity": "sha512-4lYPyeNmstjIIESr/ysHg2vUPRGf2tzF9z2yYwnowXVuVzLEamPN1Gfrz7f8I9uEPuHcbFlW4PLIAsJoxXyJ1g==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -7464,30 +7499,6 @@ "prelude-ls": "~1.1.2" } }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", diff --git a/package.json b/package.json index 41c88b65..d336c8b4 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "do-test": "mkdir -p http:; ln -nsf .. http://dummyhost; $TESTRUNNER 'test/**/*-test.js'", "report": "nyc report --reporter=lcov", "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", - "prepublishOnly": "env NODE_ENV=production npm run build && uglifyjs build/d3-graphviz.js -c -m -o build/d3-graphviz.min.js", - "prepublishOnlyOriginal": "env NODE_ENV=production npm run build && TESTRUNNER='tape' npm run do-test && uglifyjs build/d3-graphviz.js -c -m -o build/d3-graphviz.min.js", + "prepublishOnly": "env NODE_ENV=production npm run build && terser build/d3-graphviz.js -c -m -o build/d3-graphviz.min.js", + "prepublishOnlyOriginal": "env NODE_ENV=production npm run build && TESTRUNNER='tape' npm run do-test && terser build/d3-graphviz.js -c -m -o build/d3-graphviz.min.js", "publicbuild": "env NODE_ENV=production npm run build", "postpublish": "zip -j build/d3-graphviz.zip -- LICENSE README.md build/d3-graphviz.js build/d3-graphviz.min.js" }, @@ -57,8 +57,8 @@ "rollup": "0.46.0", "rollup-plugin-babel": "^3.0.3", "tape": "^4.9.0", - "tiny-worker": "^2.1.2", - "uglify-es": "^3.0.27" + "terser": "^4.6.6", + "tiny-worker": "^2.1.2" }, "dependencies": { "@hpcc-js/wasm": "^0.3.8",