Skip to content

Commit

Permalink
fix: upgrade acorn and babel parser
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 14, 2021
1 parent 3aaf83a commit 048cc92
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 92 deletions.
5 changes: 1 addition & 4 deletions packages/SwingSet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,9 @@
"anylogger": "^0.21.0",
"esm": "^3.2.5",
"re2": "^1.10.5",
"rollup": "^1.23.1",
"rollup-plugin-node-resolve": "^5.2.0",
"semver": "^6.3.0",
"ses": "^0.12.7",
"tmp": "^0.2.1",
"yargs": "^14.2.0"
"tmp": "^0.2.1"
},
"files": [
"bin/vat",
Expand Down
9 changes: 4 additions & 5 deletions packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@
"nyc": "^15.1.0"
},
"dependencies": {
"@agoric/acorn-eventual-send": "^2.1.9",
"@babel/parser": "^7.6.4",
"@agoric/compartment-mapper": "^0.2.4",
"@babel/generator": "^7.6.4",
"@babel/traverse": "^7.8.3",
"@endo/base64": "^0.1.0",
"@rollup/plugin-commonjs": "~11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"acorn": "^7.1.0",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"acorn": "^8.2.4",
"esm": "^3.2.5",
"rollup": "^1.32.0",
"rollup": "^2.47.0",
"ses": "^0.12.6",
"source-map": "^0.7.3"
},
Expand Down
1 change: 0 additions & 1 deletion packages/bundle-source/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ async function transformSource(
// Parse the rolled-up chunk with Babel.
// We are prepared for different module systems.
const ast = (babelParser.parse || babelParser)(code, {
plugins: ['bigInt'],
sourceType,
});

Expand Down
3 changes: 1 addition & 2 deletions packages/eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"@agoric/swingset-vat": "^0.17.2",
"ava": "^3.12.1",
"esm": "^3.2.7",
"nyc": "^15.1.0",
"rollup": "^1.2.2"
"nyc": "^15.1.0"
},
"keywords": [
"eventual send",
Expand Down
4 changes: 1 addition & 3 deletions packages/transform-metering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"@agoric/install-ses": "^0.5.13",
"ava": "^3.12.1",
"esm": "^3.2.5",
"nyc": "^15.1.0",
"rollup": "^1.16.6",
"rollup-plugin-node-resolve": "^5.2.0"
"nyc": "^15.1.0"
},
"dependencies": {
"@agoric/nat": "^4.0.0",
Expand Down
7 changes: 3 additions & 4 deletions packages/transform-metering/src/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export function makeMeteringTransformer(
) {
const parser = overrideParser
? overrideParser.parse || overrideParser
: (source, opts) => babelCore.parseSync(source, { parserOpts: opts });
: (source, opts = undefined) =>
babelCore.parseSync(source, { parserOpts: opts });
const meterId = overrideMeterId;
const replaceGlobalMeterId = overrideSetMeterId;
const regexpIdPrefix = overrideRegExpIdPrefix;
Expand Down Expand Up @@ -180,9 +181,7 @@ const ${reid}=RegExp(${JSON.stringify(pattern)},${JSON.stringify(flags)});`);
meter && meter[c.METER_COMPUTE](source.length);

// Do the actual transform.
const ast = parser(source, {
plugins: ['bigInt'],
});
const ast = parser(source);
const regexpList = [];
const output = babelCore.transformFromAstSync(ast, source, {
generatorOpts: {
Expand Down
4 changes: 2 additions & 2 deletions patches/acorn+7.1.1.patch → patches/acorn+7.4.1.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js
index e2b3317..bc1c4d3 100644
index 0523f0e..3230daf 100644
--- a/node_modules/acorn/dist/acorn.js
+++ b/node_modules/acorn/dist/acorn.js
@@ -1811,7 +1811,7 @@
@@ -1835,7 +1835,7 @@
if (checkClashes) {
if (has(checkClashes, expr.name))
{ this.raiseRecoverable(expr.start, "Argument name clash"); }
Expand Down
135 changes: 64 additions & 71 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
jsesc "^2.5.1"
source-map "^0.5.0"

"@babel/generator@^7.5.0", "@babel/generator@^7.6.4":
"@babel/generator@^7.6.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.4.tgz#db651e2840ca9aa66f327dcec1dc5f5fa9611369"
integrity sha512-m5qo2WgdOJeyYngKImbkyQrnUN1mPceaG5BV+G0E3gWsa4l/jCSryWJdM2x8OuGAOyh+3d5pVYfZWCiNFtynxg==
Expand Down Expand Up @@ -2581,16 +2581,30 @@
magic-string "^0.25.2"
resolve "^1.11.0"

"@rollup/plugin-commonjs@~11.0.2":
version "11.0.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz#837cc6950752327cb90177b608f0928a4e60b582"
integrity sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g==
"@rollup/plugin-commonjs@^19.0.0":
version "19.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.0.tgz#8c3e71f9a66908e60d70cc1be205834ef3e45f71"
integrity sha512-adTpD6ATGbehdaQoZQ6ipDFhdjqsTgpOAhFiPwl+dzre4pPshsecptDPyEFb61JMJ1+mGljktaC4jI8ARMSNyw==
dependencies:
"@rollup/pluginutils" "^3.0.0"
estree-walker "^1.0.1"
is-reference "^1.1.2"
magic-string "^0.25.2"
resolve "^1.11.0"
"@rollup/pluginutils" "^3.1.0"
commondir "^1.0.1"
estree-walker "^2.0.1"
glob "^7.1.6"
is-reference "^1.2.1"
magic-string "^0.25.7"
resolve "^1.17.0"

"@rollup/plugin-node-resolve@^13.0.0":
version "13.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.0.tgz#352f07e430ff377809ec8ec8a6fd636547162dc4"
integrity sha512-41X411HJ3oikIDivT5OKe9EZ6ud6DXudtfNrGbC4nniaxx2esiWjkLOzgnZsWq1IM8YIeL2rzRGLZLBjlhnZtQ==
dependencies:
"@rollup/pluginutils" "^3.1.0"
"@types/resolve" "1.17.1"
builtin-modules "^3.1.0"
deepmerge "^4.2.2"
is-module "^1.0.0"
resolve "^1.19.0"

"@rollup/plugin-node-resolve@^6.1.0":
version "6.1.0"
Expand All @@ -2603,17 +2617,6 @@
is-module "^1.0.0"
resolve "^1.11.1"

"@rollup/plugin-node-resolve@^7.1.1":
version "7.1.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.1.tgz#8c6e59c4b28baf9d223028d0e450e06a485bb2b7"
integrity sha512-14ddhD7TnemeHE97a4rLOhobfYvUVcaYuqTnL8Ti7Jxi9V9Jr5LY7Gko4HZ5k4h4vqQM0gBQt6tsp9xXW94WPA==
dependencies:
"@rollup/pluginutils" "^3.0.6"
"@types/resolve" "0.0.8"
builtin-modules "^3.1.0"
is-module "^1.0.0"
resolve "^1.14.2"

"@rollup/plugin-node-resolve@^8.0.0":
version "8.4.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz#261d79a680e9dc3d86761c14462f24126ba83575"
Expand All @@ -2635,7 +2638,7 @@
"@rollup/pluginutils" "^3.1.0"
magic-string "^0.25.7"

"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.6":
"@rollup/pluginutils@^3.0.0":
version "3.0.8"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde"
integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==
Expand Down Expand Up @@ -2668,7 +2671,12 @@
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==

"@types/estree@*", "@types/estree@0.0.39":
"@types/estree@*":
version "0.0.47"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.47.tgz#d7a51db20f0650efec24cd04994f523d93172ed4"
integrity sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==

"@types/estree@0.0.39":
version "0.0.39"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
Expand Down Expand Up @@ -2913,11 +2921,6 @@ acorn@^7.0.0:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c"
integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==

acorn@^7.1.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==

acorn@^7.4.0:
version "7.4.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
Expand All @@ -2933,10 +2936,10 @@ acorn@^8.0.4:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.1.0.tgz#52311fd7037ae119cbb134309e901aa46295b3fe"
integrity sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==

acorn@^8.0.5:
version "8.0.5"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.0.5.tgz#a3bfb872a74a6a7f661bc81b9849d9cac12601b7"
integrity sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg==
acorn@^8.2.4:
version "8.2.4"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0"
integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==

agent-base@4, agent-base@^4.3.0:
version "4.3.0"
Expand Down Expand Up @@ -6022,6 +6025,11 @@ estree-walker@^1.0.1:
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==

estree-walker@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==

esutils@^2.0.2, esutils@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
Expand Down Expand Up @@ -7661,6 +7669,13 @@ is-reference@^1.1.2:
dependencies:
"@types/estree" "0.0.39"

is-reference@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==
dependencies:
"@types/estree" "*"

is-regex@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
Expand Down Expand Up @@ -11241,21 +11256,21 @@ resolve@^1.18.1:
is-core-module "^2.1.0"
path-parse "^1.0.6"

resolve@^1.3.2:
version "1.15.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
dependencies:
path-parse "^1.0.6"

resolve@^1.8.1:
resolve@^1.19.0, resolve@^1.8.1:
version "1.20.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
dependencies:
is-core-module "^2.2.0"
path-parse "^1.0.6"

resolve@^1.3.2:
version "1.15.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
dependencies:
path-parse "^1.0.6"

responselike@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
Expand Down Expand Up @@ -11332,17 +11347,6 @@ rollup-plugin-livereload@^1.0.0:
dependencies:
livereload "^0.9.1"

rollup-plugin-node-resolve@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523"
integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==
dependencies:
"@types/resolve" "0.0.8"
builtin-modules "^3.1.0"
is-module "^1.0.0"
resolve "^1.11.1"
rollup-pluginutils "^2.8.1"

rollup-plugin-postcss@^2.0.3:
version "2.9.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-2.9.0.tgz#e6ea0a1b8fdc4a49fc0385da58804e332750c282"
Expand Down Expand Up @@ -11393,38 +11397,27 @@ rollup-plugin-terser@^6.1.0:
serialize-javascript "^3.0.0"
terser "^4.7.0"

rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
rollup-pluginutils@^2.8.2:
version "2.8.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
dependencies:
estree-walker "^0.6.1"

rollup@^1.16.6, rollup@^1.16.7, rollup@^1.2.2, rollup@^1.23.1:
version "1.27.5"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.27.5.tgz#d100fb0ffd8353575cb2057152547b9abfddfe59"
integrity sha512-8rfVdzuTg2kt8ObD9LNJpEwUN7B6lsl3sHc5fddtgICpLjpYeSf4m2+RftBzcCaBTMi1iYX3Ez8zFT4Gj2nJjg==
dependencies:
"@types/estree" "*"
"@types/node" "*"
acorn "^7.1.0"

rollup@^1.32.0:
version "1.32.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.32.0.tgz#c65ce134850aca1ce595fcac07d1dc5d53bf227c"
integrity sha512-ab2tF5pdDqm2zuI8j02ceyrJSScl9V2C24FgWQ1v1kTFTu1UrG5H0hpP++mDZlEFyZX4k0chtGEHU2i+pAzBgA==
dependencies:
"@types/estree" "*"
"@types/node" "*"
acorn "^7.1.0"

rollup@^2.3.4:
version "2.23.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.23.0.tgz#b7ab1fee0c0e60132fd0553c4df1e9cdacfada9d"
integrity sha512-vLNmZFUGVwrnqNAJ/BvuLk1MtWzu4IuoqsH9UWK5AIdO3rt8/CSiJNvPvCIvfzrbNsqKbNzPAG1V2O4eTe2XZg==
optionalDependencies:
fsevents "~2.1.2"

rollup@^2.47.0:
version "2.47.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.47.0.tgz#9d958aeb2c0f6a383cacc0401dff02b6e252664d"
integrity sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==
optionalDependencies:
fsevents "~2.3.1"

rst-selector-parser@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91"
Expand Down Expand Up @@ -13682,7 +13675,7 @@ yargs@^14.0.0:
y18n "^4.0.0"
yargs-parser "^15.0.1"

yargs@^14.2.0, yargs@^14.2.2:
yargs@^14.2.2:
version "14.2.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5"
integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA==
Expand Down

0 comments on commit 048cc92

Please sign in to comment.