Skip to content

Commit 80cf4a0

Browse files
authored
Update Closure Compiler (#26205)
I need it for #26187. We need to specify specifically the output mode `ECMASCRIPT5_STRICT` to remove `const` from the Fizz runtime.
1 parent 2cc54b5 commit 80cf4a0

File tree

4 files changed

+46
-40
lines changed

4 files changed

+46
-40
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"flow-remove-types": "^2.198.2",
7070
"glob": "^7.1.6",
7171
"glob-stream": "^6.1.0",
72-
"google-closure-compiler": "^20200517.0.0",
72+
"google-closure-compiler": "^20230206.0.0",
7373
"gzip-size": "^5.1.1",
7474
"hermes-eslint": "^0.9.0",
7575
"hermes-parser": "^0.9.0",

scripts/rollup/build.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,15 @@ function getPlugins(
388388
bundleType !== NODE_ESM &&
389389
closure({
390390
compilation_level: 'SIMPLE',
391-
language_in: 'ECMASCRIPT_2018',
391+
language_in: 'ECMASCRIPT_2020',
392392
language_out:
393393
bundleType === NODE_ES2015
394-
? 'ECMASCRIPT_2018'
394+
? 'ECMASCRIPT_2020'
395395
: bundleType === BROWSER_SCRIPT
396396
? 'ECMASCRIPT5'
397397
: 'ECMASCRIPT5_STRICT',
398+
emit_use_strict:
399+
bundleType !== BROWSER_SCRIPT && bundleType !== NODE_ESM,
398400
env: 'CUSTOM',
399401
warning_level: 'QUIET',
400402
apply_input_source_maps: false,

scripts/rollup/generate-inline-fizz-runtime.js

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ async function main() {
4545
instructionDir + '/ReactDOMFizzInstructionSetShared.js',
4646
],
4747
compilation_level: 'ADVANCED',
48+
language_in: 'ECMASCRIPT_2020',
49+
language_out: 'ECMASCRIPT5_STRICT',
4850
module_resolution: 'NODE',
4951
// This is necessary to prevent Closure from inlining a Promise polyfill
5052
rewrite_polyfills: false,

yarn.lock

+39-37
Original file line numberDiff line numberDiff line change
@@ -5146,7 +5146,7 @@ caw@^2.0.0, caw@^2.0.1:
51465146
tunnel-agent "^0.6.0"
51475147
url-to-options "^1.0.1"
51485148

5149-
chalk@2.4.2, chalk@2.x, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2:
5149+
chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2:
51505150
version "2.4.2"
51515151
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
51525152
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -5163,6 +5163,14 @@ chalk@4.1.0, chalk@^4.0.0:
51635163
ansi-styles "^4.1.0"
51645164
supports-color "^7.1.0"
51655165

5166+
chalk@4.x:
5167+
version "4.1.2"
5168+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
5169+
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
5170+
dependencies:
5171+
ansi-styles "^4.1.0"
5172+
supports-color "^7.1.0"
5173+
51665174
chalk@^1.0.0, chalk@^1.1.3:
51675175
version "1.1.3"
51685176
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
@@ -8678,46 +8686,40 @@ globby@^6.1.0:
86788686
pify "^2.0.0"
86798687
pinkie-promise "^2.0.0"
86808688

8681-
google-closure-compiler-java@^20200517.0.0:
8682-
version "20200517.0.0"
8683-
resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20200517.0.0.tgz#778370c22273c9085f4cf959ce063f8f112c02ac"
8684-
integrity sha512-JVZBiyyXwcYi6Yc3lO6dF2hMLJA4OzPm4/mgsem/tF1vk2HsWTnL3GTaBsPB2ENVZp0hoqsd4KgpPiG9ssNWxw==
8685-
8686-
google-closure-compiler-js@^20200517.0.0:
8687-
version "20200517.0.0"
8688-
resolved "https://registry.yarnpkg.com/google-closure-compiler-js/-/google-closure-compiler-js-20200517.0.0.tgz#9cb0861f764073d1c4d3b7453b74073ccb1ecfb1"
8689-
integrity sha512-dz6dOUHx5nhdIqMRXacAYS8aJfLvw4IKxGg28Hq/zeeDPHlX3P3iBK20NgFDfT8zdushThymtMqChSy7C5eyfA==
8690-
8691-
google-closure-compiler-linux@^20200517.0.0:
8692-
version "20200517.0.0"
8693-
resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20200517.0.0.tgz#2b9ecb634130060174aff5c52329a694ea4be68b"
8694-
integrity sha512-S5xPh6TtP+ESzZrmQLcDDqtZAsCVTbdI4VS98wQlN6IMZTd94nAnOCg9mrxQNAgop2t4sdsv/KuH0BGPUWEZ+w==
8695-
8696-
google-closure-compiler-osx@^20200517.0.0:
8697-
version "20200517.0.0"
8698-
resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20200517.0.0.tgz#9394e9a2fd97e3729fc3bd2abcffff6aab2cfcaa"
8699-
integrity sha512-FWIcsKqLllLjdOBZd7azijVaObydgRd0obVNi63eUfC5MX6T4qxKumGCyor2UCNY6by2ESz+PlGqCFzFhZ6b2g==
8700-
8701-
google-closure-compiler-windows@^20200517.0.0:
8702-
version "20200517.0.0"
8703-
resolved "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20200517.0.0.tgz#c5cdde438c29458666a83358567b12072924ed6c"
8704-
integrity sha512-UXhjRGwS8deTkRla/riyVq3psscgMuw78lepEPtq5NgbumgJzY2+IQP9q+4MVOfJW58Rv0JUWKAFOnBBSZWcAQ==
8705-
8706-
google-closure-compiler@^20200517.0.0:
8707-
version "20200517.0.0"
8708-
resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20200517.0.0.tgz#6c47f99fc1be59bd4f9e23c5a8f2e66d64b54143"
8709-
integrity sha512-80W9zBS9Ajk1T5InWCfsoPohDmo5T1AAyw1rHh5+dgb/jPgwC65KhY+oJozTncf+/7tyQHJXozTARwhSlBUcMg==
8710-
dependencies:
8711-
chalk "2.x"
8712-
google-closure-compiler-java "^20200517.0.0"
8713-
google-closure-compiler-js "^20200517.0.0"
8689+
google-closure-compiler-java@^20230206.0.0:
8690+
version "20230206.0.0"
8691+
resolved "https://registry.yarnpkg.com/google-closure-compiler-java/-/google-closure-compiler-java-20230206.0.0.tgz#e615c1f17901b7f7906d891f132e2867e8a21019"
8692+
integrity sha512-OcnDf29yx4JNU13HpptADI2ckl9hEchktSHs2XSLQ/xStUAJQGQOl96to5IYh2VuFgn3Ssaw6M3c6At2pJr7wQ==
8693+
8694+
google-closure-compiler-linux@^20230206.0.0:
8695+
version "20230206.0.0"
8696+
resolved "https://registry.yarnpkg.com/google-closure-compiler-linux/-/google-closure-compiler-linux-20230206.0.0.tgz#085f3782e6640f38aeb10512ff8e8f226c61dbc3"
8697+
integrity sha512-06N6w2elsnZMMA4Gf/vN2A3XzWvu+gUTrBczaw0KQL48GgdLq6OgAXrcopbGdi/K8Gz1WAcG0qf2ccG8dSqYNg==
8698+
8699+
google-closure-compiler-osx@^20230206.0.0:
8700+
version "20230206.0.0"
8701+
resolved "https://registry.yarnpkg.com/google-closure-compiler-osx/-/google-closure-compiler-osx-20230206.0.0.tgz#62536d49652567c86efb44bbacc1c29111dd3442"
8702+
integrity sha512-lJ/Y4HTk+KdL6PhLmmalP/3DdzGK0mS0+htuFP6y4t9+QXiUKnpHWx/VDQ3Fwm2fWEzqDxfhX3R+wC9lBvFiAg==
8703+
8704+
google-closure-compiler-windows@^20230206.0.0:
8705+
version "20230206.0.0"
8706+
resolved "https://registry.yarnpkg.com/google-closure-compiler-windows/-/google-closure-compiler-windows-20230206.0.0.tgz#7c3458f03ea940321a7c1a008da14f20b68ef4ef"
8707+
integrity sha512-4KPr7XPiOs8g4Ao3T+70egf14avCEne26XF4Mur4Fg5511ym1uEN+NlEyjBOAmfUFfaA7BYDsA8iBzDIetKrnw==
8708+
8709+
google-closure-compiler@^20230206.0.0:
8710+
version "20230206.0.0"
8711+
resolved "https://registry.yarnpkg.com/google-closure-compiler/-/google-closure-compiler-20230206.0.0.tgz#8de9fdf36f33edb96d48473167aa18098ed49845"
8712+
integrity sha512-gGscQOcO/75AlHyw78v87u0nGKJHWqOrQ224Ks91HH1iISgF+xZ8GYosU/8s5VD66x3VD0tJKXM2rIoGOA1ycA==
8713+
dependencies:
8714+
chalk "4.x"
8715+
google-closure-compiler-java "^20230206.0.0"
87148716
minimist "1.x"
87158717
vinyl "2.x"
87168718
vinyl-sourcemaps-apply "^0.2.0"
87178719
optionalDependencies:
8718-
google-closure-compiler-linux "^20200517.0.0"
8719-
google-closure-compiler-osx "^20200517.0.0"
8720-
google-closure-compiler-windows "^20200517.0.0"
8720+
google-closure-compiler-linux "^20230206.0.0"
8721+
google-closure-compiler-osx "^20230206.0.0"
8722+
google-closure-compiler-windows "^20230206.0.0"
87218723

87228724
got@^11.1.4:
87238725
version "11.8.6"

0 commit comments

Comments
 (0)