From c1296105f356cf9208b0dea88fc3fe0302e6976e Mon Sep 17 00:00:00 2001 From: SUZUKI Sosuke Date: Sat, 27 May 2023 22:06:34 +0900 Subject: [PATCH] Update `@babel/parser` to 7.22.0 (#14861) * Update `@babel/parser` and `@babel/types` * Update error message snapshots * Run `yarn dedupe` * Update `@babel/generator` * Install new `@babel/parser` --- package.json | 6 ++-- .../js/__snapshots__/jsfmt.spec.js.snap | 4 +-- .../__snapshots__/jsfmt.spec.js.snap | 8 ++--- .../json/__snapshots__/jsfmt.spec.js.snap | 4 +-- yarn.lock | 32 +++++++++---------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 5f1c156f4..010e8d142 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "dependencies": { "@angular/compiler": "16.0.2", "@babel/code-frame": "7.21.4", - "@babel/parser": "7.21.8", - "@babel/types": "7.21.5", + "@babel/parser": "7.22.3", + "@babel/types": "7.22.0", "@glimmer/syntax": "0.84.3", "@iarna/toml": "2.2.5", "@prettier/is-es5-identifier-name": "0.1.0", @@ -106,7 +106,7 @@ "yaml-unist-parser": "2.0.1" }, "devDependencies": { - "@babel/generator": "7.21.5", + "@babel/generator": "7.22.0", "@esbuild-plugins/node-modules-polyfill": "0.2.2", "@glimmer/reference": "0.84.3", "@types/estree": "1.0.1", diff --git a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap index 9b8d3c1a8..b516876a8 100644 --- a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap @@ -19,7 +19,7 @@ exports[`import-assertions-for-export-without-from.js [babel] format 1`] = ` `; exports[`import-assertions-with-parens.js [babel] format 1`] = ` -"Unexpected token (1:19) +"Unexpected token, expected "{" (1:19) > 1 | import "x" assert ({type: 'json'}); | ^ 2 |" @@ -41,7 +41,7 @@ exports[`invalid-escape-in-identifier-2.js [babel] format 1`] = ` `; exports[`module-attributes.js [babel] format 1`] = ` -"Unexpected token, expected "(" (1:33) +"Unexpected token, expected "{" (1:33) > 1 | import foo from "foo.json" with type: "json"; | ^ 2 |" diff --git a/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap index f04860634..67a088742 100644 --- a/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/import-assertions/__snapshots__/jsfmt.spec.js.snap @@ -36,16 +36,16 @@ exports[`invalid-flow-type-import-2.mjs [babel] format 1`] = ` `; exports[`invalid-flow-typeof-import-1.mjs [babel] format 1`] = ` -"Unexpected token, expected "{" (1:8) +"Unexpected token, expected "from" (1:15) > 1 | import typeof module foo from "./module.wasm"; - | ^ + | ^ 2 |" `; exports[`invalid-flow-typeof-import-2.mjs [babel] format 1`] = ` -"Unexpected token, expected "{" (1:15) +"Unexpected token, expected "from" (1:22) > 1 | import module typeof foo from "./module.wasm"; - | ^ + | ^ 2 |" `; diff --git a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap index 67d31e5fb..79877c22b 100644 --- a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap @@ -367,9 +367,9 @@ exports[`snippet: #15 [json] format 1`] = ` `; exports[`snippet: #15 [json] format 2`] = ` -"Unexpected token (1:6) +"'RegExpLiteral' is not allowed in JSON. (1:2) > 1 | [/a/v] - | ^" + | ^^^^" `; exports[`snippet: #15 [json-stringify] format 1`] = ` diff --git a/yarn.lock b/yarn.lock index c5f58c890..d9b722154 100644 --- a/yarn.lock +++ b/yarn.lock @@ -84,15 +84,15 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:7.21.5, @babel/generator@npm:^7.21.5, @babel/generator@npm:^7.7.2": - version: 7.21.5 - resolution: "@babel/generator@npm:7.21.5" +"@babel/generator@npm:7.22.0, @babel/generator@npm:^7.21.5, @babel/generator@npm:^7.7.2": + version: 7.22.0 + resolution: "@babel/generator@npm:7.22.0" dependencies: - "@babel/types": ^7.21.5 + "@babel/types": ^7.22.0 "@jridgewell/gen-mapping": ^0.3.2 "@jridgewell/trace-mapping": ^0.3.17 jsesc: ^2.5.1 - checksum: 78af737b9dd701d4c657f9731880430fa1c177767b562f4e8a330a7fe72a4abe857e3d24de4e6d9dafc1f6a11f894162d27e523d7e5948ff9e3925a0ce9867c4 + checksum: 48b96cb24d1ac90d5629324123f35fc241386359d39822d80e6db89f83d1444e802142d4e8b81b49ab4095362d71a7af648d3ee3735707e9b38ee69676712c12 languageName: node linkType: hard @@ -230,12 +230,12 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:7.21.8, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.5, @babel/parser@npm:^7.21.8": - version: 7.21.8 - resolution: "@babel/parser@npm:7.21.8" +"@babel/parser@npm:7.22.3, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.21.5, @babel/parser@npm:^7.21.8": + version: 7.22.3 + resolution: "@babel/parser@npm:7.22.3" bin: parser: ./bin/babel-parser.js - checksum: 1b9a820fedfb6ef179e6ffa1dbc080808882949dec68340a616da2aa354af66ea2886bd68e61bd444d270aa0b24ad6273e3cfaf17d6878c34bf2521becacb353 + checksum: 016f2960212fd86817e15d90b9b3450d2b51af189b1c17a20ade5735d9ec69e76e29def317e09188ecd5fa6eab4f9ab72d88b8b829c1b2994400a6a2c2dc1958 languageName: node linkType: hard @@ -422,14 +422,14 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:7.21.5, @babel/types@npm:^7.0.0, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.4, @babel/types@npm:^7.21.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": - version: 7.21.5 - resolution: "@babel/types@npm:7.21.5" +"@babel/types@npm:7.22.0, @babel/types@npm:^7.0.0, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.0, @babel/types@npm:^7.21.4, @babel/types@npm:^7.21.5, @babel/types@npm:^7.22.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": + version: 7.22.0 + resolution: "@babel/types@npm:7.22.0" dependencies: "@babel/helper-string-parser": ^7.21.5 "@babel/helper-validator-identifier": ^7.19.1 to-fast-properties: ^2.0.0 - checksum: 43242a99c612d13285ee4af46cc0f1066bcb6ffd38307daef7a76e8c70f36cfc3255eb9e75c8e768b40e761176c313aec4d5c0b9d97a21e494d49d5fd123a9f7 + checksum: 6ba43536f362170d1be58aa8f975210fc042729128e9db286c7a107a1ca3e096994ad741e1cda85b2ae10d02e363d189f826ceee6178a884cc638935c99e2003 languageName: node linkType: hard @@ -6783,9 +6783,9 @@ __metadata: dependencies: "@angular/compiler": 16.0.2 "@babel/code-frame": 7.21.4 - "@babel/generator": 7.21.5 - "@babel/parser": 7.21.8 - "@babel/types": 7.21.5 + "@babel/generator": 7.22.0 + "@babel/parser": 7.22.3 + "@babel/types": 7.22.0 "@esbuild-plugins/node-modules-polyfill": 0.2.2 "@glimmer/reference": 0.84.3 "@glimmer/syntax": 0.84.3