From 85e375022a56c36c4ec95376cbfff56525676640 Mon Sep 17 00:00:00 2001 From: Kristofer Baxter Date: Tue, 10 Aug 2021 17:14:29 -0500 Subject: [PATCH] Update to latest closure compiler (#435) --- package.json | 4 +- .../fixtures/class.esm.advanced.js | 2 +- .../fixtures/named-class.esm.advanced.js | 2 +- .../fixtures/multiple.esm.advanced.js | 2 +- .../fixtures/named-constant.esm.es5.js | 17 ++--- .../fixtures/named-function.esm.es5.js | 17 ++--- .../fixtures/class.esm.advanced.js | 2 +- .../iife-wrapped-safely.iife.advanced.js | 2 +- .../iife-wrapped-safely.iife.default.js | 2 +- .../fixtures/iife-wrapped-safely.iife.es5.js | 2 +- .../iife-wrapped-safely.iife.pretty.js | 4 +- test/import/fixtures/dynamic.esm.advanced.js | 2 +- test/import/fixtures/star.esm.advanced.js | 2 +- .../fixtures/class.esm.advanced.js | 2 +- yarn.lock | 62 +++++++++---------- 15 files changed, 60 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index 13260c07..bef9a5f9 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "acorn": "7.3.1", "acorn-walk": "7.1.1", "estree-walker": "2.0.1", - "google-closure-compiler": "20200517.0.0", + "google-closure-compiler": "20210808.0.0", "magic-string": "0.25.7", "uuid": "8.1.0" }, @@ -90,7 +90,7 @@ "singleQuote": true }, "volta": { - "node": "14.4.0", + "node": "16.6.1", "yarn": "1.22.4" }, "publishConfig": { diff --git a/test/export-default/fixtures/class.esm.advanced.js b/test/export-default/fixtures/class.esm.advanced.js index fa69ff65..dadb7200 100644 --- a/test/export-default/fixtures/class.esm.advanced.js +++ b/test/export-default/fixtures/class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export default a +class a{constructor(b){this.g=b}console(){console.log(this.g)}}export default a diff --git a/test/export-default/fixtures/named-class.esm.advanced.js b/test/export-default/fixtures/named-class.esm.advanced.js index fa69ff65..dadb7200 100644 --- a/test/export-default/fixtures/named-class.esm.advanced.js +++ b/test/export-default/fixtures/named-class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export default a +class a{constructor(b){this.g=b}console(){console.log(this.g)}}export default a diff --git a/test/export-named/fixtures/multiple.esm.advanced.js b/test/export-named/fixtures/multiple.esm.advanced.js index 03835c11..6e5bc110 100644 --- a/test/export-named/fixtures/multiple.esm.advanced.js +++ b/test/export-named/fixtures/multiple.esm.advanced.js @@ -1 +1 @@ -class b{constructor(a){this.a=a}console(){console.log(this.a)}}function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{b as ExportedClass,bar,baz,foo} +class b{constructor(a){this.g=a}console(){console.log(this.g)}}function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{b as ExportedClass,bar,baz,foo} diff --git a/test/export-transpilation/fixtures/named-constant.esm.es5.js b/test/export-transpilation/fixtures/named-constant.esm.es5.js index e50816a4..90d741b1 100644 --- a/test/export-transpilation/fixtures/named-constant.esm.es5.js +++ b/test/export-transpilation/fixtures/named-constant.esm.es5.js @@ -1,8 +1,9 @@ -var b=b||{};b.scope={};b.arrayIteratorImpl=function(a){var c=0;return function(){return c>>0,a.propertyToPolyfillSymbol[d]=a.IS_SYMBOL_NATIVE?a.global.Symbol(d):a.POLYFILL_PREFIX+b+"$"+ +d),a.defineProperty(f,a.propertyToPolyfillSymbol[d],{configurable:!0,writable:!0,value:c})))};a.initSymbol=function(){}; +a.polyfill("Symbol",function(b){function c(g){if(this instanceof c)throw new TypeError("Symbol is not a constructor");return new e(d+(g||"")+"_"+f++,g)}function e(g,h){this.$jscomp$symbol$id_=g;a.defineProperty(this,"description",{configurable:!0,writable:!0,value:h})}if(b)return b;e.prototype.toString=function(){return this.$jscomp$symbol$id_};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",f=0;return c},"es6","es3"); +a.polyfill("Symbol.iterator",function(b){if(b)return b;b=Symbol("Symbol.iterator");for(var c="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),e=0;e>>0,a.propertyToPolyfillSymbol[d]=a.IS_SYMBOL_NATIVE?a.global.Symbol(d):a.POLYFILL_PREFIX+b+"$"+ +d),a.defineProperty(f,a.propertyToPolyfillSymbol[d],{configurable:!0,writable:!0,value:c})))};a.initSymbol=function(){}; +a.polyfill("Symbol",function(b){function c(g){if(this instanceof c)throw new TypeError("Symbol is not a constructor");return new e(d+(g||"")+"_"+f++,g)}function e(g,h){this.$jscomp$symbol$id_=g;a.defineProperty(this,"description",{configurable:!0,writable:!0,value:h})}if(b)return b;e.prototype.toString=function(){return this.$jscomp$symbol$id_};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",f=0;return c},"es6","es3"); +a.polyfill("Symbol.iterator",function(b){if(b)return b;b=Symbol("Symbol.iterator");for(var c="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),e=0;ea.a())} +export function exported(){import("./dynamic-imported-67216f69.js").then(a=>a.g())} diff --git a/test/import/fixtures/star.esm.advanced.js b/test/import/fixtures/star.esm.advanced.js index 1f265551..0ed30e8f 100644 --- a/test/import/fixtures/star.esm.advanced.js +++ b/test/import/fixtures/star.esm.advanced.js @@ -1 +1 @@ -var a=Object.freeze({__proto__:null,c:1,a:2,b:()=>console.log("foo")});console.log(...a) +var a=Object.freeze({__proto__:null,i:1,g:2,h:()=>console.log("foo")});console.log(...a) diff --git a/test/provided-externs/fixtures/class.esm.advanced.js b/test/provided-externs/fixtures/class.esm.advanced.js index eced490c..50c9f84c 100644 --- a/test/provided-externs/fixtures/class.esm.advanced.js +++ b/test/provided-externs/fixtures/class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var ExportThis=a +class a{constructor(b){this.g=b}console(){console.log(this.g)}}export var ExportThis=a diff --git a/yarn.lock b/yarn.lock index 25156f1d..bf52f3c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1809,46 +1809,40 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -google-closure-compiler-java@^20200517.0.0: - version "20200517.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20200517.0.0.tgz#778370c22273c9085f4cf959ce063f8f112c02ac" - integrity sha512-JVZBiyyXwcYi6Yc3lO6dF2hMLJA4OzPm4/mgsem/tF1vk2HsWTnL3GTaBsPB2ENVZp0hoqsd4KgpPiG9ssNWxw== - -google-closure-compiler-js@^20200517.0.0: - version "20200517.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-js/-/google-closure-compiler-js-20200517.0.0.tgz#9cb0861f764073d1c4d3b7453b74073ccb1ecfb1" - integrity sha512-dz6dOUHx5nhdIqMRXacAYS8aJfLvw4IKxGg28Hq/zeeDPHlX3P3iBK20NgFDfT8zdushThymtMqChSy7C5eyfA== - -google-closure-compiler-linux@^20200517.0.0: - version "20200517.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20200517.0.0.tgz#2b9ecb634130060174aff5c52329a694ea4be68b" - integrity sha512-S5xPh6TtP+ESzZrmQLcDDqtZAsCVTbdI4VS98wQlN6IMZTd94nAnOCg9mrxQNAgop2t4sdsv/KuH0BGPUWEZ+w== - -google-closure-compiler-osx@^20200517.0.0: - version "20200517.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20200517.0.0.tgz#9394e9a2fd97e3729fc3bd2abcffff6aab2cfcaa" - integrity sha512-FWIcsKqLllLjdOBZd7azijVaObydgRd0obVNi63eUfC5MX6T4qxKumGCyor2UCNY6by2ESz+PlGqCFzFhZ6b2g== - -google-closure-compiler-windows@^20200517.0.0: - version "20200517.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20200517.0.0.tgz#c5cdde438c29458666a83358567b12072924ed6c" - integrity sha512-UXhjRGwS8deTkRla/riyVq3psscgMuw78lepEPtq5NgbumgJzY2+IQP9q+4MVOfJW58Rv0JUWKAFOnBBSZWcAQ== - -google-closure-compiler@20200517.0.0: - version "20200517.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20200517.0.0.tgz#6c47f99fc1be59bd4f9e23c5a8f2e66d64b54143" - integrity sha512-80W9zBS9Ajk1T5InWCfsoPohDmo5T1AAyw1rHh5+dgb/jPgwC65KhY+oJozTncf+/7tyQHJXozTARwhSlBUcMg== +google-closure-compiler-java@^20210808.0.0: + version "20210808.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20210808.0.0.tgz#9722073e2ace0ed1a9934423e6277c9994418e84" + integrity sha512-7dEQfBzOdwdjwa/Pq8VAypNBKyWRrOcKjnNYOO9gEg2hjh8XVMeQzTqw4uANfVvvANGdE/JjD+HF6zHVgLRwjg== + +google-closure-compiler-linux@^20210808.0.0: + version "20210808.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20210808.0.0.tgz#42b844cef30cce6570d21f5d75c71f1af36fc070" + integrity sha512-byKi5ITUiWRvEIcQo76i1siVnOwrTmG+GNcBG4cJ7x8IE6+4ki9rG5pUe4+DOYHkfk52XU6XHt9aAAgCcFDKpg== + +google-closure-compiler-osx@^20210808.0.0: + version "20210808.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20210808.0.0.tgz#6fe601c80d19a998d2703de6bb5a8c4d41f75e24" + integrity sha512-iwyAY6dGj1FrrBdmfwKXkjtTGJnqe8F+9WZbfXxiBjkWLtIsJt2dD1+q7g/sw3w8mdHrGQAdxtDZP/usMwj/Rg== + +google-closure-compiler-windows@^20210808.0.0: + version "20210808.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20210808.0.0.tgz#f907fa046d8a25d820485cb4482fbd5bada9cf03" + integrity sha512-VI+UUYwtGWDYwpiixrWRD8EklHgl6PMbiEaHxQSrQbH8PDXytwaOKqmsaH2lWYd5Y/BOZie2MzjY7F5JI69q1w== + +google-closure-compiler@20210808.0.0: + version "20210808.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20210808.0.0.tgz#0638e71f1073f71682277200db71d0ea05b3de1d" + integrity sha512-+R2+P1tT1lEnDDGk8b+WXfyVZgWjcCK9n1mmZe8pMEzPaPWxqK7GMetLVWnqfTDJ5Q+LRspOiFBv3Is+0yuhCA== dependencies: chalk "2.x" - google-closure-compiler-java "^20200517.0.0" - google-closure-compiler-js "^20200517.0.0" + google-closure-compiler-java "^20210808.0.0" minimist "1.x" vinyl "2.x" vinyl-sourcemaps-apply "^0.2.0" optionalDependencies: - google-closure-compiler-linux "^20200517.0.0" - google-closure-compiler-osx "^20200517.0.0" - google-closure-compiler-windows "^20200517.0.0" + google-closure-compiler-linux "^20210808.0.0" + google-closure-compiler-osx "^20210808.0.0" + google-closure-compiler-windows "^20210808.0.0" got@^9.6.0: version "9.6.0"