From 3fd64b4f30e32b88a2396a02b1f65ed27cec4dbb Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 7 Apr 2022 09:37:30 +0800 Subject: [PATCH 01/49] Format `.importmap` file with `json-stringify` parser (#12603) --- changelog_unreleased/cli/12603.md | 3 +++ src/language-js/index.js | 2 +- .../__snapshots__/jsfmt.spec.js.snap | 23 +++++++++++++++++++ .../misc/parser-inference/test.importmap | 5 ++++ .../__snapshots__/support-info.js.snap | 2 +- 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 changelog_unreleased/cli/12603.md create mode 100644 tests/format/misc/parser-inference/test.importmap diff --git a/changelog_unreleased/cli/12603.md b/changelog_unreleased/cli/12603.md new file mode 100644 index 000000000..4316858da --- /dev/null +++ b/changelog_unreleased/cli/12603.md @@ -0,0 +1,3 @@ +#### Infer parser for `.importmap` files (#12603 by @fisker) + +Format [`.importmap`](https://github.com/WICG/import-maps#import-map-processing) files as a JSON files. diff --git a/src/language-js/index.js b/src/language-js/index.js index d19c29033..c20b8788c 100644 --- a/src/language-js/index.js +++ b/src/language-js/index.js @@ -87,7 +87,7 @@ const languages = [ since: "1.13.0", parsers: ["json-stringify"], vscodeLanguageIds: ["json"], - extensions: [], // .json file defaults to json instead of json-stringify + extensions: [".importmap"], // .json file defaults to json instead of json-stringify filenames: ["package.json", "package-lock.json", "composer.json"], })), createLanguage(require("linguist-languages/data/JSON.json"), (data) => ({ diff --git a/tests/format/misc/parser-inference/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/parser-inference/__snapshots__/jsfmt.spec.js.snap index bf65bfdd2..25e74a2cf 100644 --- a/tests/format/misc/parser-inference/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/parser-inference/__snapshots__/jsfmt.spec.js.snap @@ -117,6 +117,29 @@ printWidth: 80 ================================================================================ `; +exports[`test.importmap format 1`] = ` +====================================options===================================== +parsers: [] +printWidth: 80 + | printWidth +=====================================input====================================== +{"imports": { + "prettier": "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs", + "prettier/": "https://unpkg.com/prettier@2.6.2/" + } +} + +=====================================output===================================== +{ + "imports": { + "prettier": "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs", + "prettier/": "https://unpkg.com/prettier@2.6.2/" + } +} + +================================================================================ +`; + exports[`test.js format 1`] = ` ====================================options===================================== parsers: [] diff --git a/tests/format/misc/parser-inference/test.importmap b/tests/format/misc/parser-inference/test.importmap new file mode 100644 index 000000000..cd267a3b7 --- /dev/null +++ b/tests/format/misc/parser-inference/test.importmap @@ -0,0 +1,5 @@ +{"imports": { + "prettier": "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs", + "prettier/": "https://unpkg.com/prettier@2.6.2/" + } +} diff --git a/tests/integration/__tests__/__snapshots__/support-info.js.snap b/tests/integration/__tests__/__snapshots__/support-info.js.snap index abf30a7b9..dbf1347b3 100644 --- a/tests/integration/__tests__/__snapshots__/support-info.js.snap +++ b/tests/integration/__tests__/__snapshots__/support-info.js.snap @@ -429,7 +429,7 @@ exports[`CLI --support-info (stdout) 1`] = ` \\"aceMode\\": \\"json\\", \\"codemirrorMimeType\\": \\"application/json\\", \\"codemirrorMode\\": \\"javascript\\", - \\"extensions\\": [], + \\"extensions\\": [\\".importmap\\"], \\"filenames\\": [\\"package.json\\", \\"package-lock.json\\", \\"composer.json\\"], \\"linguistLanguageId\\": 174, \\"name\\": \\"JSON.stringify\\", From f98c197b66db7491021f5d1cb65d137aa5d7ac68 Mon Sep 17 00:00:00 2001 From: Harry Hopkinson <63599884+Harry-Hopkinson@users.noreply.github.com> Date: Thu, 7 Apr 2022 02:47:13 +0100 Subject: [PATCH 02/49] Print the number of files that need formatting. (#12561) Co-authored-by: fisker Cheung --- changelog_unreleased/cli/12561.md | 21 +++++++++++++++++++ docs/cli.md | 2 +- src/cli/format.js | 14 +++++++++++-- .../__tests__/__snapshots__/check.js.snap | 18 ++++++++++++++-- .../__snapshots__/ignore-unknown.js.snap | 2 +- .../__snapshots__/infer-parser.js.snap | 4 ++-- .../__snapshots__/piped-output.js.snap | 4 ++-- tests/integration/__tests__/check.js | 8 +++++++ tests/integration/cli/write/unformatted2.js | 1 + website/versioned_docs/version-stable/cli.md | 2 +- 10 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 changelog_unreleased/cli/12561.md create mode 100644 tests/integration/cli/write/unformatted2.js diff --git a/changelog_unreleased/cli/12561.md b/changelog_unreleased/cli/12561.md new file mode 100644 index 000000000..625656768 --- /dev/null +++ b/changelog_unreleased/cli/12561.md @@ -0,0 +1,21 @@ +#### Print the number of files need change (#12561 by @Harry-Hopkinson) + +```console +# Prettier stable +$ prettier src --check +Checking formatting... +[warn] src/fileA.js +[warn] Code style issues found in the above file(s). Forgot to run Prettier? + +# Prettier main +$ prettier src --check +Checking formatting... +[warn] src/fileA.js +[warn] src/fileB.js +[warn] Code style issues found in 2 files. Forgot to run Prettier? + +$ prettier src --check +Checking formatting... +[warn] src/fileA.js +[warn] Code style issues found in the above file. Forgot to run Prettier? +``` diff --git a/docs/cli.md b/docs/cli.md index 49535d52a..f72895ebd 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -69,7 +69,7 @@ Console output if some of the files require re-formatting: Checking formatting... [warn] src/fileA.js [warn] src/fileB.js -[warn] Code style issues found in the above file(s). Forgot to run Prettier? +[warn] Code style issues found in 2 files. Forgot to run Prettier? ``` The command will return exit code `1` in the second case, which is helpful inside the CI pipelines. diff --git a/src/cli/format.js b/src/cli/format.js index bfff5e2cd..5e25bd4ca 100644 --- a/src/cli/format.js +++ b/src/cli/format.js @@ -417,11 +417,21 @@ async function formatFiles(context) { if (context.argv.check) { if (numberOfUnformattedFilesFound === 0) { context.logger.log("All matched files use Prettier code style!"); + } else if (numberOfUnformattedFilesFound === 1) { + context.logger.warn( + context.argv.write + ? "Code style issues fixed in the above file." + : "Code style issues found in the above file. Forgot to run Prettier?" + ); } else { context.logger.warn( context.argv.write - ? "Code style issues fixed in the above file(s)." - : "Code style issues found in the above file(s). Forgot to run Prettier?" + ? "Code style issues found in " + + numberOfUnformattedFilesFound + + " files." + : "Code style issues found in " + + numberOfUnformattedFilesFound + + " files. Forgot to run Prettier?" ); } } diff --git a/tests/integration/__tests__/__snapshots__/check.js.snap b/tests/integration/__tests__/__snapshots__/check.js.snap index f8d19510b..b5c69122a 100644 --- a/tests/integration/__tests__/__snapshots__/check.js.snap +++ b/tests/integration/__tests__/__snapshots__/check.js.snap @@ -1,14 +1,28 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`--checks should print the number of files that need formatting (stderr) 1`] = ` +"[warn] unformatted.js +[warn] unformatted2.js +[warn] Code style issues found in 2 files. Forgot to run Prettier? +" +`; + +exports[`--checks should print the number of files that need formatting (stdout) 1`] = ` +"Checking formatting... +" +`; + +exports[`--checks should print the number of files that need formatting (write) 1`] = `Array []`; + exports[`--checks works in CI just as in a non-TTY mode (stderr) 1`] = ` "[warn] unformatted.js -[warn] Code style issues found in the above file(s). Forgot to run Prettier? +[warn] Code style issues found in the above file. Forgot to run Prettier? " `; exports[`--checks works in CI just as in a non-TTY mode (stderr) 2`] = ` "[warn] unformatted.js -[warn] Code style issues found in the above file(s). Forgot to run Prettier? +[warn] Code style issues found in the above file. Forgot to run Prettier? " `; diff --git a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap index 3d563676b..7fe86de9f 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap @@ -31,7 +31,7 @@ exports[`ignore-unknown alias (stdout) 1`] = ` exports[`ignore-unknown check (stderr) 1`] = ` "[warn] javascript.js -[warn] Code style issues found in the above file(s). Forgot to run Prettier? +[warn] Code style issues found in the above file. Forgot to run Prettier? " `; diff --git a/tests/integration/__tests__/__snapshots__/infer-parser.js.snap b/tests/integration/__tests__/__snapshots__/infer-parser.js.snap index 75e8fc1f6..21c86bbf1 100644 --- a/tests/integration/__tests__/__snapshots__/infer-parser.js.snap +++ b/tests/integration/__tests__/__snapshots__/infer-parser.js.snap @@ -3,7 +3,7 @@ exports[`--check with unknown path and no parser multiple files (stderr) 1`] = ` "[error] No parser could be inferred for file: FOO [warn] foo.js -[warn] Code style issues found in the above file(s). Forgot to run Prettier? +[warn] Code style issues found in the above file. Forgot to run Prettier? " `; @@ -36,7 +36,7 @@ exports[`--list-different with unknown path and no parser specific file (stderr) exports[`--write and --check with unknown path and no parser multiple files (stderr) 1`] = ` "[error] No parser could be inferred for file: FOO [warn] foo.js -[warn] Code style issues fixed in the above file(s). +[warn] Code style issues fixed in the above file. " `; diff --git a/tests/integration/__tests__/__snapshots__/piped-output.js.snap b/tests/integration/__tests__/__snapshots__/piped-output.js.snap index abeed4482..5ac545abd 100644 --- a/tests/integration/__tests__/__snapshots__/piped-output.js.snap +++ b/tests/integration/__tests__/__snapshots__/piped-output.js.snap @@ -34,13 +34,13 @@ exports[`no file diffs with --list-different + formatted file (write) 2`] = `Arr exports[`output with --check + unformatted differs when piped (stderr) 1`] = ` "[warn] unformatted.js -[warn] Code style issues fixed in the above file(s). +[warn] Code style issues fixed in the above file. " `; exports[`output with --check + unformatted differs when piped (stderr) 2`] = ` "[warn] unformatted.js -[warn] Code style issues fixed in the above file(s). +[warn] Code style issues fixed in the above file. " `; diff --git a/tests/integration/__tests__/check.js b/tests/integration/__tests__/check.js index 76b4acab5..183c48e8e 100644 --- a/tests/integration/__tests__/check.js +++ b/tests/integration/__tests__/check.js @@ -48,3 +48,11 @@ describe("--checks works in CI just as in a non-TTY mode", () => { expect(await result0.stdout).toEqual(await result1.stdout); }); }); + +describe("--checks should print the number of files that need formatting", () => { + runPrettier("cli/write", ["--check", "unformatted.js", "unformatted2.js"], { + input: "0", + }).test({ + status: 1, + }); +}); diff --git a/tests/integration/cli/write/unformatted2.js b/tests/integration/cli/write/unformatted2.js new file mode 100644 index 000000000..e0b797789 --- /dev/null +++ b/tests/integration/cli/write/unformatted2.js @@ -0,0 +1 @@ +var x = 1; diff --git a/website/versioned_docs/version-stable/cli.md b/website/versioned_docs/version-stable/cli.md index 9b92b425e..4c37ec8e3 100644 --- a/website/versioned_docs/version-stable/cli.md +++ b/website/versioned_docs/version-stable/cli.md @@ -70,7 +70,7 @@ Console output if some of the files require re-formatting: Checking formatting... [warn] src/fileA.js [warn] src/fileB.js -[warn] Code style issues found in the above file(s). Forgot to run Prettier? +[warn] Code style issues found in 2 files. Forgot to run Prettier? ``` The command will return exit code `1` in the second case, which is helpful inside the CI pipelines. From 033ac94f25e2e5fc56e9d4eeb61e76dccb059020 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 8 Apr 2022 02:59:17 +0200 Subject: [PATCH 03/49] chore: disable string escaping in snapshots (#12612) --- jest.config.js | 3 + .../__snapshots__/jsfmt.spec.js.snap | 38 +- .../invalid/__snapshots__/jsfmt.spec.js.snap | 10 +- .../__snapshots__/jsfmt.spec.js.snap | 2 +- .../__snapshots__/jsfmt.spec.js.snap | 32 +- .../__snapshots__/jsfmt.spec.js.snap | 12 +- .../js/do/__snapshots__/jsfmt.spec.js.snap | 12 +- .../__snapshots__/jsfmt.spec.js.snap | 8 +- .../escaped/__snapshots__/jsfmt.spec.js.snap | 14 +- .../__snapshots__/jsfmt.spec.js.snap | 4 +- .../exports/__snapshots__/jsfmt.spec.js.snap | 18 +- .../__snapshots__/jsfmt.spec.js.snap | 72 +- .../__snapshots__/jsfmt.spec.js.snap | 24 +- .../__snapshots__/jsfmt.spec.js.snap | 12 +- .../__snapshots__/jsfmt.spec.js.snap | 14 +- .../__snapshots__/jsfmt.spec.js.snap | 46 +- .../record/__snapshots__/jsfmt.spec.js.snap | 30 +- .../strings/__snapshots__/jsfmt.spec.js.snap | 24 +- .../__snapshots__/jsfmt.spec.js.snap | 12 +- .../__snapshots__/jsfmt.spec.js.snap | 6 +- .../babel-ts/__snapshots__/jsfmt.spec.js.snap | 2 +- .../__snapshots__/jsfmt.spec.js.snap | 2 +- .../flow/__snapshots__/jsfmt.spec.js.snap | 6 +- .../graphql/__snapshots__/jsfmt.spec.js.snap | 2 +- .../invalid/__snapshots__/jsfmt.spec.js.snap | 6 +- .../js/__snapshots__/jsfmt.spec.js.snap | 20 +- .../__snapshots__/jsfmt.spec.js.snap | 2 +- .../for-of/__snapshots__/jsfmt.spec.js.snap | 6 +- .../__snapshots__/jsfmt.spec.js.snap | 4 +- .../json/__snapshots__/jsfmt.spec.js.snap | 42 +- .../__snapshots__/jsfmt.spec.js.snap | 6 +- .../less/__snapshots__/jsfmt.spec.js.snap | 2 +- .../__snapshots__/jsfmt.spec.js.snap | 12 +- .../vue/__snapshots__/jsfmt.spec.js.snap | 10 +- .../class/__snapshots__/jsfmt.spec.js.snap | 4 +- .../compiler/__snapshots__/jsfmt.spec.js.snap | 2 +- .../__snapshots__/jsfmt.spec.js.snap | 6 +- .../keywords/__snapshots__/jsfmt.spec.js.snap | 4 +- .../__snapshots__/arg-parsing.js.snap | 10 +- .../__snapshots__/config-invalid.js.snap | 10 +- .../__snapshots__/config-resolution.js.snap | 66 +- .../__snapshots__/cursor-offset.js.snap | 22 +- .../__tests__/__snapshots__/debug-api.js.snap | 8 +- .../__snapshots__/debug-print-ast.js.snap | 2 +- .../debug-print-comments.js.snap | 66 +- .../__snapshots__/early-exit.js.snap | 4 +- .../error-on-unmatched-pattern.js.snap | 14 +- .../__tests__/__snapshots__/file-info.js.snap | 30 +- .../__snapshots__/format-ast.js.snap | 4 +- .../__tests__/__snapshots__/format.js.snap | 6 +- .../__snapshots__/help-options.js.snap | 6 +- .../__snapshots__/ignore-unknown.js.snap | 6 +- .../__snapshots__/infer-parser.js.snap | 2 +- .../__tests__/__snapshots__/load-toml.js.snap | 2 +- .../__tests__/__snapshots__/loglevel.js.snap | 2 +- .../__snapshots__/patterns-dirs.js.snap | 6 +- .../__tests__/__snapshots__/patterns.js.snap | 6 +- .../__tests__/__snapshots__/schema.js.snap | 6 +- .../__snapshots__/stdin-filepath.js.snap | 10 +- .../__snapshots__/support-info.js.snap | 1384 ++++++++--------- .../__snapshots__/third-party.js.snap | 2 +- .../with-config-precedence.js.snap | 72 +- .../with-parser-inference.js.snap | 2 +- .../__snapshots__/with-shebang.js.snap | 2 +- tests/integration/__tests__/format.js | 4 +- yarn.lock | 6 +- 66 files changed, 1146 insertions(+), 1145 deletions(-) diff --git a/jest.config.js b/jest.config.js index cef136fd3..4916c5915 100644 --- a/jest.config.js +++ b/jest.config.js @@ -58,6 +58,9 @@ module.exports = { "jest-snapshot-serializer-raw", "jest-snapshot-serializer-ansi", ], + snapshotFormat: { + escapeString: false, + }, testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$", testPathIgnorePatterns, collectCoverage: ENABLE_CODE_COVERAGE, diff --git a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap index c7d338bb5..2e11f5dbf 100644 --- a/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap @@ -1017,9 +1017,9 @@ exports[`function-sent.js [acorn] format 1`] = ` "Unexpected token (4:33) 2 | 3 | function* generator() { -> 4 | console.log(\\"Sent\\", function.sent); +> 4 | console.log("Sent", function.sent); | ^ - 5 | console.log(\\"Yield\\", yield); + 5 | console.log("Yield", yield); 6 | } 7 |" `; @@ -1028,9 +1028,9 @@ exports[`function-sent.js [espree] format 1`] = ` "Unexpected token . (4:33) 2 | 3 | function* generator() { -> 4 | console.log(\\"Sent\\", function.sent); +> 4 | console.log("Sent", function.sent); | ^ - 5 | console.log(\\"Yield\\", yield); + 5 | console.log("Yield", yield); 6 | } 7 |" `; @@ -1039,9 +1039,9 @@ exports[`function-sent.js [meriyah] format 1`] = ` "Expected '(' (4:33) 2 | 3 | function* generator() { -> 4 | console.log(\\"Sent\\", function.sent); +> 4 | console.log("Sent", function.sent); | ^ - 5 | console.log(\\"Yield\\", yield); + 5 | console.log("Yield", yield); 6 | } 7 |" `; @@ -1080,21 +1080,21 @@ iterator.next(2); // Logs "Yield 2" exports[`import-assertions-dynamic.js [acorn] format 1`] = ` "Unexpected token (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`import-assertions-dynamic.js [espree] format 1`] = ` "Unexpected token , (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`import-assertions-dynamic.js [meriyah] format 1`] = ` "Expected ')' (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; @@ -1115,21 +1115,21 @@ import("./foo.json", { assert: { type: "json" } }); exports[`import-assertions-static.js [acorn] format 1`] = ` "Unexpected token (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`import-assertions-static.js [espree] format 1`] = ` "Unexpected token assert (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`import-assertions-static.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; @@ -1297,9 +1297,9 @@ let m = module { exports[`module-string-names.js [meriyah] format 1`] = ` "Expected '}' (1:13) -> 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\"; +> 1 | import { "😄" as smile } from "./emojis.js"; | ^ - 2 | export { smile as \\"😄\\" } from \\"./emojis.js\\"; + 2 | export { smile as "😄" } from "./emojis.js"; 3 |" `; @@ -1884,9 +1884,9 @@ return list |> take(prefix.length, %) |> equals(%, prefix); exports[`pipeline-operator-minimal.js [acorn] format 1`] = ` "Identifier 'result' has already been declared (7:5) - 5 | result //=> \\"Hello, hello!\\" + 5 | result //=> "Hello, hello!" 6 | -> 7 | let result = \\"hello\\" +> 7 | let result = "hello" | ^ 8 | |> doubleSay 9 | |> capitalize @@ -1895,9 +1895,9 @@ exports[`pipeline-operator-minimal.js [acorn] format 1`] = ` exports[`pipeline-operator-minimal.js [espree] format 1`] = ` "Identifier 'result' has already been declared (7:5) - 5 | result //=> \\"Hello, hello!\\" + 5 | result //=> "Hello, hello!" 6 | -> 7 | let result = \\"hello\\" +> 7 | let result = "hello" | ^ 8 | |> doubleSay 9 | |> capitalize @@ -1907,7 +1907,7 @@ exports[`pipeline-operator-minimal.js [espree] format 1`] = ` exports[`pipeline-operator-minimal.js [meriyah] format 1`] = ` "Unexpected token: '>' (8:4) 6 | - 7 | let result = \\"hello\\" + 7 | let result = "hello" > 8 | |> doubleSay | ^ 9 | |> capitalize diff --git a/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap index 2c2ef6537..44dad6613 100644 --- a/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/call/invalid/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,7 @@ exports[`null-arguments-item.js [__babel_estree] format 1`] = ` > 1 | foor('a', , 'b'); | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", + 3 | foo("a", 4 | //1" `; @@ -14,7 +14,7 @@ exports[`null-arguments-item.js [acorn] format 1`] = ` > 1 | foor('a', , 'b'); | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", + 3 | foo("a", 4 | //1" `; @@ -23,7 +23,7 @@ exports[`null-arguments-item.js [babel] format 1`] = ` > 1 | foor('a', , 'b'); | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", + 3 | foo("a", 4 | //1" `; @@ -32,7 +32,7 @@ exports[`null-arguments-item.js [espree] format 1`] = ` > 1 | foor('a', , 'b'); | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", + 3 | foo("a", 4 | //1" `; @@ -41,6 +41,6 @@ exports[`null-arguments-item.js [meriyah] format 1`] = ` > 1 | foor('a', , 'b'); | ^ 2 | foo('looooooooooooooooooooooooooooooooooooooooooooooong', , 'looooooooooooooooooooooooooooooooooooooooooooooong'); - 3 | foo(\\"a\\", + 3 | foo("a", 4 | //1" `; diff --git a/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap index 2900df233..37af8ce7c 100644 --- a/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/classes/top-level-super/__snapshots__/jsfmt.spec.js.snap @@ -15,7 +15,7 @@ exports[`example.js [espree] format 1`] = ` `; exports[`example.js [meriyah] format 1`] = ` -"Calls to super must be in the \\"constructor\\" method of a class expression or class declaration that has a superclass (1:6) +"Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass (1:6) > 1 | super(); | ^ 2 |" diff --git a/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap index 128e914c1..c8cbc76bb 100644 --- a/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap @@ -76,7 +76,7 @@ class Foo { exports[`computed.js [acorn] format 1`] = ` "Unexpected token (2:12) 1 | class Foo { -> 2 | accessor [\\"bar\\"]; +> 2 | accessor ["bar"]; | ^ 3 | } 4 |" @@ -85,7 +85,7 @@ exports[`computed.js [acorn] format 1`] = ` exports[`computed.js [espree] format 1`] = ` "Unexpected token [ (2:12) 1 | class Foo { -> 2 | accessor [\\"bar\\"]; +> 2 | accessor ["bar"]; | ^ 3 | } 4 |" @@ -94,7 +94,7 @@ exports[`computed.js [espree] format 1`] = ` exports[`computed.js - {"semi":false} [acorn] format 1`] = ` "Unexpected token (2:12) 1 | class Foo { -> 2 | accessor [\\"bar\\"]; +> 2 | accessor ["bar"]; | ^ 3 | } 4 |" @@ -103,7 +103,7 @@ exports[`computed.js - {"semi":false} [acorn] format 1`] = ` exports[`computed.js - {"semi":false} [espree] format 1`] = ` "Unexpected token [ (2:12) 1 | class Foo { -> 2 | accessor [\\"bar\\"]; +> 2 | accessor ["bar"]; | ^ 3 | } 4 |" @@ -410,7 +410,7 @@ class Foo { exports[`static-computed.js [acorn] format 1`] = ` "Unexpected token (2:19) 1 | class Foo { -> 2 | static accessor [\\"bar\\"]; +> 2 | static accessor ["bar"]; | ^ 3 | } 4 |" @@ -419,7 +419,7 @@ exports[`static-computed.js [acorn] format 1`] = ` exports[`static-computed.js [espree] format 1`] = ` "Unexpected token [ (2:19) 1 | class Foo { -> 2 | static accessor [\\"bar\\"]; +> 2 | static accessor ["bar"]; | ^ 3 | } 4 |" @@ -428,7 +428,7 @@ exports[`static-computed.js [espree] format 1`] = ` exports[`static-computed.js - {"semi":false} [acorn] format 1`] = ` "Unexpected token (2:19) 1 | class Foo { -> 2 | static accessor [\\"bar\\"]; +> 2 | static accessor ["bar"]; | ^ 3 | } 4 |" @@ -437,7 +437,7 @@ exports[`static-computed.js - {"semi":false} [acorn] format 1`] = ` exports[`static-computed.js - {"semi":false} [espree] format 1`] = ` "Unexpected token [ (2:19) 1 | class Foo { -> 2 | static accessor [\\"bar\\"]; +> 2 | static accessor ["bar"]; | ^ 3 | } 4 |" @@ -638,7 +638,7 @@ class Foo { exports[`with-semicolon-1.js [acorn] format 1`] = ` "Unexpected token (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | [foo]() {} 4 | } @@ -648,7 +648,7 @@ exports[`with-semicolon-1.js [acorn] format 1`] = ` exports[`with-semicolon-1.js [espree] format 1`] = ` "Unexpected token clicked (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | [foo]() {} 4 | } @@ -658,7 +658,7 @@ exports[`with-semicolon-1.js [espree] format 1`] = ` exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = ` "Unexpected token (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | [foo]() {} 4 | } @@ -668,7 +668,7 @@ exports[`with-semicolon-1.js - {"semi":false} [acorn] format 1`] = ` exports[`with-semicolon-1.js - {"semi":false} [espree] format 1`] = ` "Unexpected token clicked (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | [foo]() {} 4 | } @@ -719,7 +719,7 @@ class C { exports[`with-semicolon-2.js [acorn] format 1`] = ` "Unexpected token (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | *foo() {} 4 | } @@ -729,7 +729,7 @@ exports[`with-semicolon-2.js [acorn] format 1`] = ` exports[`with-semicolon-2.js [espree] format 1`] = ` "Unexpected token clicked (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | *foo() {} 4 | } @@ -739,7 +739,7 @@ exports[`with-semicolon-2.js [espree] format 1`] = ` exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = ` "Unexpected token (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | *foo() {} 4 | } @@ -749,7 +749,7 @@ exports[`with-semicolon-2.js - {"semi":false} [acorn] format 1`] = ` exports[`with-semicolon-2.js - {"semi":false} [espree] format 1`] = ` "Unexpected token clicked (2:12) 1 | class C { -> 2 | accessor clicked = \\"value\\"; +> 2 | accessor clicked = "value"; | ^ 3 | *foo() {} 4 | } diff --git a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap index 62aab4d14..913adbb6d 100644 --- a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap @@ -166,22 +166,22 @@ exports[`methods.js [acorn] format 1`] = ` "Unexpected character '@' (3:3) 1 | 2 | class Yo { -> 3 | @foo(\\"hello\\") +> 3 | @foo("hello") | ^ 4 | async plop() {} 5 | - 6 | @anotherDecoratorWithALongName(\\"and a very long string as a first argument\\")" + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")" `; exports[`methods.js [espree] format 1`] = ` "Unexpected character '@' (3:3) 1 | 2 | class Yo { -> 3 | @foo(\\"hello\\") +> 3 | @foo("hello") | ^ 4 | async plop() {} 5 | - 6 | @anotherDecoratorWithALongName(\\"and a very long string as a first argument\\")" + 6 | @anotherDecoratorWithALongName("and a very long string as a first argument")" `; exports[`methods.js format 1`] = ` @@ -266,7 +266,7 @@ export default class MyComponent { exports[`mobx.js [acorn] format 1`] = ` "Unexpected character '@' (3:1) - 1 | import {observable} from \\"mobx\\"; + 1 | import {observable} from "mobx"; 2 | > 3 | @observer class OrderLine { | ^ @@ -277,7 +277,7 @@ exports[`mobx.js [acorn] format 1`] = ` exports[`mobx.js [espree] format 1`] = ` "Unexpected character '@' (3:1) - 1 | import {observable} from \\"mobx\\"; + 1 | import {observable} from "mobx"; 2 | > 3 | @observer class OrderLine { | ^ diff --git a/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap index b73a8ff8c..e975afc7e 100644 --- a/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/do/__snapshots__/jsfmt.spec.js.snap @@ -6,9 +6,9 @@ exports[`call-arguments.js [acorn] format 1`] = ` 2 | expect( > 3 | do { | ^ - 4 | var bar = \\"foo\\"; + 4 | var bar = "foo"; 5 | if (!bar) throw new Error( - 6 | \\"unreachable\\"" + 6 | "unreachable"" `; exports[`call-arguments.js [espree] format 1`] = ` @@ -17,9 +17,9 @@ exports[`call-arguments.js [espree] format 1`] = ` 2 | expect( > 3 | do { | ^ - 4 | var bar = \\"foo\\"; + 4 | var bar = "foo"; 5 | if (!bar) throw new Error( - 6 | \\"unreachable\\"" + 6 | "unreachable"" `; exports[`call-arguments.js [meriyah] format 1`] = ` @@ -28,9 +28,9 @@ exports[`call-arguments.js [meriyah] format 1`] = ` 2 | expect( > 3 | do { | ^ - 4 | var bar = \\"foo\\"; + 4 | var bar = "foo"; 5 | if (!bar) throw new Error( - 6 | \\"unreachable\\"" + 6 | "unreachable"" `; exports[`call-arguments.js format 1`] = ` diff --git a/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap index f4d7d3870..2f14318ed 100644 --- a/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/dynamic-import/__snapshots__/jsfmt.spec.js.snap @@ -2,28 +2,28 @@ exports[`assertions.js [acorn] format 1`] = ` "Unexpected token (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`assertions.js [espree] format 1`] = ` "Unexpected token , (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`assertions.js [flow] format 1`] = ` "Unexpected token \`,\`, expected the token \`)\` (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`assertions.js [meriyah] format 1`] = ` "Expected ')' (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; diff --git a/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap index 1763a573f..e45c64b19 100644 --- a/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/export-default/escaped/__snapshots__/jsfmt.spec.js.snap @@ -2,22 +2,22 @@ exports[`default-escaped.js [acorn] format 1`] = ` "Unexpected token (2:8) - 1 | // export asyn\\\\u{63} from \\"async\\"; -> 2 | export n\\\\u{63} from \\"async\\"; + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; | ^" `; exports[`default-escaped.js [espree] format 1`] = ` -"Unexpected token n\\\\u{63} (2:8) - 1 | // export asyn\\\\u{63} from \\"async\\"; -> 2 | export n\\\\u{63} from \\"async\\"; +"Unexpected token n\\u{63} (2:8) + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; | ^" `; exports[`default-escaped.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (2:12) - 1 | // export asyn\\\\u{63} from \\"async\\"; -> 2 | export n\\\\u{63} from \\"async\\"; + 1 | // export asyn\\u{63} from "async"; +> 2 | export n\\u{63} from "async"; | ^" `; diff --git a/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap index 9562c0d9d..c0b2eac46 100644 --- a/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/export-star/__snapshots__/jsfmt.spec.js.snap @@ -81,14 +81,14 @@ export * as "foo" from "foo"; exports[`export-star-as-string2.js [flow] format 1`] = ` "Unexpected string, expected an identifier (1:13) -> 1 | export * as \\"foo\\" from 'foo' +> 1 | export * as "foo" from 'foo' | ^^^^^ 2 |" `; exports[`export-star-as-string2.js [typescript] format 1`] = ` "Identifier expected. (1:13) -> 1 | export * as \\"foo\\" from 'foo' +> 1 | export * as "foo" from 'foo' | ^ 2 |" `; diff --git a/tests/format/js/exports/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/exports/__snapshots__/jsfmt.spec.js.snap index eeab830d1..711cd20ba 100644 --- a/tests/format/js/exports/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/exports/__snapshots__/jsfmt.spec.js.snap @@ -2,34 +2,34 @@ exports[`test.js [acorn] format 1`] = ` "Unexpected token (3:8) - 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\"; + 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 | -> 3 | export a,{b} from \\"./baz\\"; +> 3 | export a,{b} from "./baz"; | ^ 4 | - 5 | export * as ns from \\"mod\\"; + 5 | export * as ns from "mod"; 6 |" `; exports[`test.js [espree] format 1`] = ` "Unexpected token a (3:8) - 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\"; + 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 | -> 3 | export a,{b} from \\"./baz\\"; +> 3 | export a,{b} from "./baz"; | ^ 4 | - 5 | export * as ns from \\"mod\\"; + 5 | export * as ns from "mod"; 6 |" `; exports[`test.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (3:8) - 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from \\"exports\\"; + 1 | export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 | -> 3 | export a,{b} from \\"./baz\\"; +> 3 | export a,{b} from "./baz"; | ^ 4 | - 5 | export * as ns from \\"mod\\"; + 5 | export * as ns from "mod"; 6 |" `; diff --git a/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap index b92499e61..df7c21072 100644 --- a/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-assertions/__snapshots__/jsfmt.spec.js.snap @@ -2,21 +2,21 @@ exports[`dynamic-import.js [acorn] format 1`] = ` "Unexpected token (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`dynamic-import.js [espree] format 1`] = ` "Unexpected token , (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`dynamic-import.js [meriyah] format 1`] = ` "Expected ')' (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; @@ -37,32 +37,32 @@ import("./foo.json", { assert: { type: "json" } }); exports[`empty.js [acorn] format 1`] = ` "Unexpected token (2:33) - 1 | export * as foo from \\"foo.json\\" -> 2 | export * as bar from \\"bar.json\\" assert { } + 1 | export * as foo from "foo.json" +> 2 | export * as bar from "bar.json" assert { } | ^ - 3 | export * as baz from \\"baz.json\\" assert { /* comment */ } + 3 | export * as baz from "baz.json" assert { /* comment */ } 4 | - 5 | import * as foo from \\"foo.json\\"" + 5 | import * as foo from "foo.json"" `; exports[`empty.js [espree] format 1`] = ` "Unexpected token assert (2:33) - 1 | export * as foo from \\"foo.json\\" -> 2 | export * as bar from \\"bar.json\\" assert { } + 1 | export * as foo from "foo.json" +> 2 | export * as bar from "bar.json" assert { } | ^ - 3 | export * as baz from \\"baz.json\\" assert { /* comment */ } + 3 | export * as baz from "baz.json" assert { /* comment */ } 4 | - 5 | import * as foo from \\"foo.json\\"" + 5 | import * as foo from "foo.json"" `; exports[`empty.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (2:38) - 1 | export * as foo from \\"foo.json\\" -> 2 | export * as bar from \\"bar.json\\" assert { } + 1 | export * as foo from "foo.json" +> 2 | export * as bar from "bar.json" assert { } | ^ - 3 | export * as baz from \\"baz.json\\" assert { /* comment */ } + 3 | export * as baz from "baz.json" assert { /* comment */ } 4 | - 5 | import * as foo from \\"foo.json\\"" + 5 | import * as foo from "foo.json"" `; exports[`empty.js format 1`] = ` @@ -92,21 +92,21 @@ import * as baz from "baz.json" /* comment */; exports[`multi-types.js [acorn] format 1`] = ` "Unexpected token (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" }; +> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; | ^ 2 |" `; exports[`multi-types.js [espree] format 1`] = ` "Unexpected token assert (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" }; +> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; | ^ 2 |" `; exports[`multi-types.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\", type: \\"bar\\" }; +> 1 | import json from "./foo.json" assert { type: "json", type: "bar" }; | ^ 2 |" `; @@ -127,21 +127,21 @@ import json from "./foo.json" assert { type: "json", type: "bar" }; exports[`non-type.js [acorn] format 1`] = ` "Unexpected token (1:28) -> 1 | import foo from \\"foo.json\\" assert { lazy: \\"true\\" }; +> 1 | import foo from "foo.json" assert { lazy: "true" }; | ^ 2 |" `; exports[`non-type.js [espree] format 1`] = ` "Unexpected token assert (1:28) -> 1 | import foo from \\"foo.json\\" assert { lazy: \\"true\\" }; +> 1 | import foo from "foo.json" assert { lazy: "true" }; | ^ 2 |" `; exports[`non-type.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:33) -> 1 | import foo from \\"foo.json\\" assert { lazy: \\"true\\" }; +> 1 | import foo from "foo.json" assert { lazy: "true" }; | ^ 2 |" `; @@ -178,28 +178,28 @@ assert({ type: "json" }); exports[`re-export.js [acorn] format 1`] = ` "Unexpected token (1:33) -> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; +> 1 | export { foo2 } from "foo.json" assert { type: "json" }; | ^ - 2 | export * from \\"foo.json\\" assert { type: \\"json\\" }; - 3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" }; + 2 | export * from "foo.json" assert { type: "json" }; + 3 | export * as foo3 from "foo.json" assert { type: "json" }; 4 |" `; exports[`re-export.js [espree] format 1`] = ` "Unexpected token assert (1:33) -> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; +> 1 | export { foo2 } from "foo.json" assert { type: "json" }; | ^ - 2 | export * from \\"foo.json\\" assert { type: \\"json\\" }; - 3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" }; + 2 | export * from "foo.json" assert { type: "json" }; + 3 | export * as foo3 from "foo.json" assert { type: "json" }; 4 |" `; exports[`re-export.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:38) -> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; +> 1 | export { foo2 } from "foo.json" assert { type: "json" }; | ^ - 2 | export * from \\"foo.json\\" assert { type: \\"json\\" }; - 3 | export * as foo3 from \\"foo.json\\" assert { type: \\"json\\" }; + 2 | export * from "foo.json" assert { type: "json" }; + 3 | export * as foo3 from "foo.json" assert { type: "json" }; 4 |" `; @@ -223,21 +223,21 @@ export * as foo3 from "foo.json" assert { type: "json" }; exports[`static-import.js [acorn] format 1`] = ` "Unexpected token (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`static-import.js [espree] format 1`] = ` "Unexpected token assert (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`static-import.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; @@ -258,21 +258,21 @@ import json from "./foo.json" assert { type: "json" }; exports[`without-from.js [acorn] format 1`] = ` "Unexpected token (1:14) -> 1 | import \\"foo\\" assert { type: \\"json\\" } +> 1 | import "foo" assert { type: "json" } | ^ 2 |" `; exports[`without-from.js [espree] format 1`] = ` "Unexpected token assert (1:14) -> 1 | import \\"foo\\" assert { type: \\"json\\" } +> 1 | import "foo" assert { type: "json" } | ^ 2 |" `; exports[`without-from.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:19) -> 1 | import \\"foo\\" assert { type: \\"json\\" } +> 1 | import "foo" assert { type: "json" } | ^ 2 |" `; diff --git a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap index 26fa4d66e..70b4ed781 100644 --- a/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/import-assertions/bracket-spacing/__snapshots__/jsfmt.spec.js.snap @@ -2,21 +2,21 @@ exports[`dynamic-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`dynamic-import.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token , (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; exports[`dynamic-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Expected ')' (1:20) -> 1 | import(\\"./foo.json\\", { assert: { type: \\"json\\" } }); +> 1 | import("./foo.json", { assert: { type: "json" } }); | ^ 2 |" `; @@ -38,19 +38,19 @@ import("./foo.json", {assert: {type: "json"}}); exports[`empty.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:33) -> 1 | export * as bar from \\"bar.json\\" assert { } +> 1 | export * as bar from "bar.json" assert { } | ^" `; exports[`empty.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token assert (1:33) -> 1 | export * as bar from \\"bar.json\\" assert { } +> 1 | export * as bar from "bar.json" assert { } | ^" `; exports[`empty.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:38) -> 1 | export * as bar from \\"bar.json\\" assert { } +> 1 | export * as bar from "bar.json" assert { } | ^" `; @@ -70,21 +70,21 @@ export * as bar from "bar.json"; exports[`re-export.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:33) -> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; +> 1 | export { foo2 } from "foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`re-export.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token assert (1:33) -> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; +> 1 | export { foo2 } from "foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`re-export.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:38) -> 1 | export { foo2 } from \\"foo.json\\" assert { type: \\"json\\" }; +> 1 | export { foo2 } from "foo.json" assert { type: "json" }; | ^ 2 |" `; @@ -106,21 +106,21 @@ export {foo2} from "foo.json" assert {type: "json"}; exports[`static-import.js - {"bracketSpacing":false} [acorn] format 1`] = ` "Unexpected token (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`static-import.js - {"bracketSpacing":false} [espree] format 1`] = ` "Unexpected token assert (1:31) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; exports[`static-import.js - {"bracketSpacing":false} [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:36) -> 1 | import json from \\"./foo.json\\" assert { type: \\"json\\" }; +> 1 | import json from "./foo.json" assert { type: "json" }; | ^ 2 |" `; diff --git a/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap index 439ae2c5d..541e7ff44 100644 --- a/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/module-blocks/__snapshots__/jsfmt.spec.js.snap @@ -5,7 +5,7 @@ exports[`comments.js [acorn] format 1`] = ` > 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ | ^ 2 | /*A4*/ - 3 | export const foo = \\"foo\\"; + 3 | export const foo = "foo"; 4 | export { foo }; /*A5*/" `; @@ -14,7 +14,7 @@ exports[`comments.js [espree] format 1`] = ` > 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ | ^ 2 | /*A4*/ - 3 | export const foo = \\"foo\\"; + 3 | export const foo = "foo"; 4 | export { foo }; /*A5*/" `; @@ -23,7 +23,7 @@ exports[`comments.js [meriyah] format 1`] = ` > 1 | const m = /*A1*/ module /*A2*/ { /*A3*/ | ^ 2 | /*A4*/ - 3 | export const foo = \\"foo\\"; + 3 | export const foo = "foo"; 4 | export { foo }; /*A5*/" `; @@ -211,7 +211,7 @@ exports[`range.js [acorn] format 1`] = ` | ^ 2 | }; 3 | - 4 | foo(module { export let foo = \\"foo\\"; })" + 4 | foo(module { export let foo = "foo"; })" `; exports[`range.js [espree] format 1`] = ` @@ -220,7 +220,7 @@ exports[`range.js [espree] format 1`] = ` | ^ 2 | }; 3 | - 4 | foo(module { export let foo = \\"foo\\"; })" + 4 | foo(module { export let foo = "foo"; })" `; exports[`range.js [meriyah] format 1`] = ` @@ -229,7 +229,7 @@ exports[`range.js [meriyah] format 1`] = ` | ^ 2 | }; 3 | - 4 | foo(module { export let foo = \\"foo\\"; })" + 4 | foo(module { export let foo = "foo"; })" `; exports[`range.js format 1`] = ` diff --git a/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap index 084e2f09d..59fca2ebe 100644 --- a/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/module-string-names/__snapshots__/jsfmt.spec.js.snap @@ -2,11 +2,11 @@ exports[`module-string-names-export.js [meriyah] format 1`] = ` "Only a identifier can be used to indicate alias (1:26) -> 1 | export { smile as \\"smile1\\" } from \\"./emojis.js\\"; +> 1 | export { smile as "smile1" } from "./emojis.js"; | ^ - 2 | export { \\"smile\\" as smile2 } from \\"./emojis.js\\"; - 3 | export { \\"smile\\" as \\"smile3\\" } from \\"./emojis.js\\"; - 4 | export { foo1, bar as \\"foo2\\" } from \\"./emojis.js\\";" + 2 | export { "smile" as smile2 } from "./emojis.js"; + 3 | export { "smile" as "smile3" } from "./emojis.js"; + 4 | export { foo1, bar as "foo2" } from "./emojis.js";" `; exports[`module-string-names-export.js format 1`] = ` @@ -38,10 +38,10 @@ export { "smile4" } from "./emojis.js"; exports[`module-string-names-import.js [meriyah] format 1`] = ` "Expected '}' (1:18) -> 1 | import { \\"default\\" as quotation1 } from \\"Confucius\\"; +> 1 | import { "default" as quotation1 } from "Confucius"; | ^ - 2 | import { \\"foo\\" as bar, \\"default\\" as qux } from \\"module-a\\"; - 3 | import { \\"學而時習之,不亦說乎?\\" as quotation2 } from \\"Confucius\\"; + 2 | import { "foo" as bar, "default" as qux } from "module-a"; + 3 | import { "學而時習之,不亦說乎?" as quotation2 } from "Confucius"; 4 |" `; diff --git a/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap index b60f0193a..9d80b4ef6 100644 --- a/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap @@ -2,53 +2,53 @@ exports[`text.js [acorn] format 1`] = ` "Bad escape sequence in untagged template literal (6:18) - 4 | foo = markdown\`\\\\u{prettier}\\\\u{0065}\`; - 5 | foo = css\`\\\\u{prettier}\\\\u{0065}\`; -> 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`; + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; | ^ - 7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`; + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" `; exports[`text.js [espree] format 1`] = ` "Bad escape sequence in untagged template literal (6:18) - 4 | foo = markdown\`\\\\u{prettier}\\\\u{0065}\`; - 5 | foo = css\`\\\\u{prettier}\\\\u{0065}\`; -> 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`; + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; | ^ - 7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`; + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" `; exports[`text.js [flow] format 1`] = ` "Unexpected token ILLEGAL (1:12) -> 1 | foo = foo\`\\\\u{prettier}\\\\u{0065}\`; +> 1 | foo = foo\`\\u{prettier}\\u{0065}\`; | ^ - 2 | foo = html\`\\\\u{prettier}\\\\u{0065}\`; - 3 | foo = graphql\`\\\\u{prettier}\\\\u{0065}\`; - 4 | foo = markdown\`\\\\u{prettier}\\\\u{0065}\`;" + 2 | foo = html\`\\u{prettier}\\u{0065}\`; + 3 | foo = graphql\`\\u{prettier}\\u{0065}\`; + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;" `; exports[`text.js [meriyah] format 1`] = ` "Invalid hexadecimal escape sequence (6:20) - 4 | foo = markdown\`\\\\u{prettier}\\\\u{0065}\`; - 5 | foo = css\`\\\\u{prettier}\\\\u{0065}\`; -> 6 | foo = /* HTML */\`\\\\u{prettier}\\\\u{0065}\`; + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`; + 5 | foo = css\`\\u{prettier}\\u{0065}\`; +> 6 | foo = /* HTML */\`\\u{prettier}\\u{0065}\`; | ^ - 7 | foo = /* GraphQL */\`\\\\u{prettier}\\\\u{0065}\`; + 7 | foo = /* GraphQL */\`\\u{prettier}\\u{0065}\`; 8 | - 9 | foo = foo\`\\\\u{prettier}\${foo}pr\\\\u{0065}ttier\`;" + 9 | foo = foo\`\\u{prettier}\${foo}pr\\u{0065}ttier\`;" `; exports[`text.js [typescript] format 1`] = ` "Hexadecimal digit expected. (1:14) -> 1 | foo = foo\`\\\\u{prettier}\\\\u{0065}\`; +> 1 | foo = foo\`\\u{prettier}\\u{0065}\`; | ^ - 2 | foo = html\`\\\\u{prettier}\\\\u{0065}\`; - 3 | foo = graphql\`\\\\u{prettier}\\\\u{0065}\`; - 4 | foo = markdown\`\\\\u{prettier}\\\\u{0065}\`;" + 2 | foo = html\`\\u{prettier}\\u{0065}\`; + 3 | foo = graphql\`\\u{prettier}\\u{0065}\`; + 4 | foo = markdown\`\\u{prettier}\\u{0065}\`;" `; exports[`text.js format 1`] = ` diff --git a/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap index 4a848e587..066838221 100644 --- a/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/record/__snapshots__/jsfmt.spec.js.snap @@ -2,7 +2,7 @@ exports[`computed.js [acorn] format 1`] = ` "Unexpected character '{' (2:9) - 1 | const key = \\"a\\"; + 1 | const key = "a"; > 2 | assert(#{ [key]: 1 } === #{ a: 1 }) | ^ 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) @@ -12,7 +12,7 @@ exports[`computed.js [acorn] format 1`] = ` exports[`computed.js [espree] format 1`] = ` "Unexpected character '{' (2:9) - 1 | const key = \\"a\\"; + 1 | const key = "a"; > 2 | assert(#{ [key]: 1 } === #{ a: 1 }) | ^ 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) @@ -22,7 +22,7 @@ exports[`computed.js [espree] format 1`] = ` exports[`computed.js [meriyah] format 1`] = ` "'#' not followed by identifier (2:8) - 1 | const key = \\"a\\"; + 1 | const key = "a"; > 2 | assert(#{ [key]: 1 } === #{ a: 1 }) | ^ 3 | assert(#{ [key.toUpperCase()]: 1 } === #{ A: 1 }) @@ -190,7 +190,7 @@ assert(record1.d?.a === undefined); exports[`shorthand.js [acorn] format 1`] = ` "Unexpected character '{' (2:17) - 1 | const url = \\"https://github.com/tc39/proposal-record-tuple\\"; + 1 | const url = "https://github.com/tc39/proposal-record-tuple"; > 2 | const record = #{ url } | ^ 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple @@ -199,7 +199,7 @@ exports[`shorthand.js [acorn] format 1`] = ` exports[`shorthand.js [espree] format 1`] = ` "Unexpected character '{' (2:17) - 1 | const url = \\"https://github.com/tc39/proposal-record-tuple\\"; + 1 | const url = "https://github.com/tc39/proposal-record-tuple"; > 2 | const record = #{ url } | ^ 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple @@ -208,7 +208,7 @@ exports[`shorthand.js [espree] format 1`] = ` exports[`shorthand.js [meriyah] format 1`] = ` "'#' not followed by identifier (2:16) - 1 | const url = \\"https://github.com/tc39/proposal-record-tuple\\"; + 1 | const url = "https://github.com/tc39/proposal-record-tuple"; > 2 | const record = #{ url } | ^ 3 | console.log(record.url) // https://github.com/tc39/proposal-record-tuple @@ -235,28 +235,28 @@ console.log(record.url); // https://github.com/tc39/proposal-record-tuple exports[`spread.js [acorn] format 1`] = ` "Unexpected character '{' (1:19) -> 1 | const formData = #{ title: \\"Implement all the things\\" } +> 1 | const formData = #{ title: "Implement all the things" } | ^ - 2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData } - 3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" } + 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } + 3 | const taskLater = #{ ...taskNow, status: "DONE" } 4 |" `; exports[`spread.js [espree] format 1`] = ` "Unexpected character '{' (1:19) -> 1 | const formData = #{ title: \\"Implement all the things\\" } +> 1 | const formData = #{ title: "Implement all the things" } | ^ - 2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData } - 3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" } + 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } + 3 | const taskLater = #{ ...taskNow, status: "DONE" } 4 |" `; exports[`spread.js [meriyah] format 1`] = ` "'#' not followed by identifier (1:18) -> 1 | const formData = #{ title: \\"Implement all the things\\" } +> 1 | const formData = #{ title: "Implement all the things" } | ^ - 2 | const taskNow = #{ id: 42, status: \\"WIP\\", ...formData } - 3 | const taskLater = #{ ...taskNow, status: \\"DONE\\" } + 2 | const taskNow = #{ id: 42, status: "WIP", ...formData } + 3 | const taskLater = #{ ...taskNow, status: "DONE" } 4 |" `; diff --git a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap index 115e2a3c6..dc97633de 100644 --- a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap @@ -4,44 +4,44 @@ exports[`non-octal-eight-and-nine.js [acorn] format 1`] = ` "Invalid escape sequence (3:3) 1 | // https://github.com/babel/babel/pull/11852 2 | -> 3 | \\"\\\\8\\",\\"\\\\9\\"; +> 3 | "\\8","\\9"; | ^ 4 | () => { - 5 | \\"use strict\\"; - 6 | \\"\\\\8\\", \\"\\\\9\\";" + 5 | "use strict"; + 6 | "\\8", "\\9";" `; exports[`non-octal-eight-and-nine.js [espree] format 1`] = ` "Invalid escape sequence (3:3) 1 | // https://github.com/babel/babel/pull/11852 2 | -> 3 | \\"\\\\8\\",\\"\\\\9\\"; +> 3 | "\\8","\\9"; | ^ 4 | () => { - 5 | \\"use strict\\"; - 6 | \\"\\\\8\\", \\"\\\\9\\";" + 5 | "use strict"; + 6 | "\\8", "\\9";" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [acorn] format 1`] = ` "Invalid escape sequence (3:3) 1 | // https://github.com/babel/babel/pull/11852 2 | -> 3 | \\"\\\\8\\",\\"\\\\9\\"; +> 3 | "\\8","\\9"; | ^ 4 | () => { - 5 | \\"use strict\\"; - 6 | \\"\\\\8\\", \\"\\\\9\\";" + 5 | "use strict"; + 6 | "\\8", "\\9";" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} [espree] format 1`] = ` "Invalid escape sequence (3:3) 1 | // https://github.com/babel/babel/pull/11852 2 | -> 3 | \\"\\\\8\\",\\"\\\\9\\"; +> 3 | "\\8","\\9"; | ^ 4 | () => { - 5 | \\"use strict\\"; - 6 | \\"\\\\8\\", \\"\\\\9\\";" + 5 | "use strict"; + 6 | "\\8", "\\9";" `; exports[`non-octal-eight-and-nine.js - {"trailingComma":"all"} format 1`] = ` diff --git a/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap index 7c47a75fc..301a291c6 100644 --- a/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/throw_expressions/__snapshots__/jsfmt.spec.js.snap @@ -2,29 +2,29 @@ exports[`throw_expression.js [acorn] format 1`] = ` "Unexpected token (1:26) -> 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {} +> 1 | function save(filename = throw new TypeError("Argument required")) {} | ^ 2 | 3 | lint(ast, { - 4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")" + 4 | with: () => throw new Error("avoid using 'with' statements.")" `; exports[`throw_expression.js [espree] format 1`] = ` "Unexpected token throw (1:26) -> 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {} +> 1 | function save(filename = throw new TypeError("Argument required")) {} | ^ 2 | 3 | lint(ast, { - 4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")" + 4 | with: () => throw new Error("avoid using 'with' statements.")" `; exports[`throw_expression.js [meriyah] format 1`] = ` "Unexpected token: 'throw' (1:30) -> 1 | function save(filename = throw new TypeError(\\"Argument required\\")) {} +> 1 | function save(filename = throw new TypeError("Argument required")) {} | ^ 2 | 3 | lint(ast, { - 4 | with: () => throw new Error(\\"avoid using 'with' statements.\\")" + 4 | with: () => throw new Error("avoid using 'with' statements.")" `; exports[`throw_expression.js format 1`] = ` diff --git a/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap index 4b1c18496..f002c2f49 100644 --- a/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/trailing-whitespace/__snapshots__/jsfmt.spec.js.snap @@ -2,7 +2,7 @@ exports[`trailing.js [acorn] format 1`] = ` "Unexpected token (1:8) -> 1 | export type Result = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" }; +> 1 | export type Result = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; | ^ 2 | 3 | // Note: there are trailing whitespace in this file @@ -11,7 +11,7 @@ exports[`trailing.js [acorn] format 1`] = ` exports[`trailing.js [espree] format 1`] = ` "Unexpected token type (1:8) -> 1 | export type Result = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" }; +> 1 | export type Result = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; | ^ 2 | 3 | // Note: there are trailing whitespace in this file @@ -20,7 +20,7 @@ exports[`trailing.js [espree] format 1`] = ` exports[`trailing.js [meriyah] format 1`] = ` "Unexpected token: 'identifier' (1:11) -> 1 | export type Result = | { kind: \\"not-test-editor1\\" } | { kind: \\"not-test-editor2\\" }; +> 1 | export type Result = | { kind: "not-test-editor1" } | { kind: "not-test-editor2" }; | ^ 2 | 3 | // Note: there are trailing whitespace in this file diff --git a/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap index efda7f5ab..db1946abe 100644 --- a/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap @@ -46,7 +46,7 @@ exports[`parenthesized-decorators-tagged-template.ts [babel-ts] format 1`] = ` 1 | class Test { > 2 | @foo\`bar\` | ^ - 3 | text: string = \\"text\\" + 3 | text: string = "text" 4 | } 5 |" `; diff --git a/tests/format/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap index d305d8102..c192ba24b 100644 --- a/tests/format/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/broken-plugin/__snapshots__/jsfmt.spec.js.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`snippet: #0 [missing-comments] format 1`] = `"Comment \\"comment\\" was not printed. Please report this error!"`; +exports[`snippet: #0 [missing-comments] format 1`] = `"Comment "comment" was not printed. Please report this error!"`; diff --git a/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap index c781f4850..763008391 100644 --- a/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/flow/__snapshots__/jsfmt.spec.js.snap @@ -10,7 +10,7 @@ exports[`async-arrow-invalid.js [flow] format 1`] = ` exports[`default-escaped.js [flow] format 1`] = ` "Unexpected identifier, expected the token \`{\` (1:8) -> 1 | export asyn\\\\u{63} from \\"async\\"; +> 1 | export asyn\\u{63} from "async"; | ^^^^^^^^^^ 2 |" `; @@ -31,14 +31,14 @@ exports[`function-async.js [flow] format 1`] = ` exports[`module-attributes-dynamic.js [flow] format 1`] = ` "Unexpected token \`,\`, expected the token \`)\` (1:18) -> 1 | import(\\"foo.json\\", { with: { type: \\"json\\" } }) +> 1 | import("foo.json", { with: { type: "json" } }) | ^ 2 |" `; exports[`module-attributes-static.js [flow] format 1`] = ` "Unexpected token \`with\`, expected the token \`;\` (1:28) -> 1 | import foo from \\"foo.json\\" with type: \\"json\\"; +> 1 | import foo from "foo.json" with type: "json"; | ^^^^ 2 |" `; diff --git a/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap index 0e7fd398c..063d84267 100644 --- a/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/graphql/__snapshots__/jsfmt.spec.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`type-interfaces.graphql [graphql] format 1`] = ` -"Syntax Error: Unexpected \\"|\\". (5:21) +"Syntax Error: Unexpected "|". (5:21) 3 | # which will break seperator detection added in #7305 4 | > 5 | type A implements A | B { diff --git a/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap index 4d8238bde..62bb784b9 100644 --- a/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/invalid/__snapshots__/jsfmt.spec.js.snap @@ -7,7 +7,7 @@ exports[`snippet: #0 [acorn] format 1`] = ` `; exports[`snippet: #0 [babel] format 1`] = ` -"Unexpected token, expected \\"(\\" (1:5) +"Unexpected token, expected "(" (1:5) > 1 | for each (a in b) {} | ^" `; @@ -19,7 +19,7 @@ exports[`snippet: #0 [babel] format 2`] = ` `; exports[`snippet: #0 [babel-flow] format 1`] = ` -"Unexpected token, expected \\"(\\" (1:5) +"Unexpected token, expected "(" (1:5) > 1 | for each (a in b) {} | ^" `; @@ -31,7 +31,7 @@ exports[`snippet: #0 [babel-flow] format 2`] = ` `; exports[`snippet: #0 [babel-ts] format 1`] = ` -"Unexpected token, expected \\"(\\" (1:5) +"Unexpected token, expected "(" (1:5) > 1 | for each (a in b) {} | ^" `; 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 e63c49c23..7ab7d242e 100644 --- a/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/__snapshots__/jsfmt.spec.js.snap @@ -13,42 +13,42 @@ exports[`html-like-comments.js [babel] format 1`] = ` exports[`import-assertions-for-export-without-from.js [babel] format 1`] = ` "Missing semicolon. (1:15) -> 1 | export { foo } assert { type: \\"json\\" }; +> 1 | export { foo } assert { type: "json" }; | ^ 2 |" `; exports[`import-assertions-with-parens.js [babel] format 1`] = ` "Unexpected token (1:19) -> 1 | import \\"x\\" assert ({type: 'json'}); +> 1 | import "x" assert ({type: 'json'}); | ^ 2 |" `; exports[`invalid-escape-in-identifier.js [babel] format 1`] = ` "Invalid Unicode escape. (1:7) -> 1 | const \\\\u{20} = 1 +> 1 | const \\u{20} = 1 | ^ - 2 | const \\\\u{3000} = 1 + 2 | const \\u{3000} = 1 3 |" `; exports[`invalid-escape-in-identifier-2.js [babel] format 1`] = ` -"Expecting Unicode escape sequence \\\\uXXXX. (1:3) -> 1 | a\\\\ = a +"Expecting Unicode escape sequence \\uXXXX. (1:3) +> 1 | a\\ = a | ^ 2 |" `; exports[`module-attributes.js [babel] format 1`] = ` -"Unexpected token, expected \\"(\\" (1:33) -> 1 | import foo from \\"foo.json\\" with type: \\"json\\"; +"Unexpected token, expected "(" (1:33) +> 1 | import foo from "foo.json" with type: "json"; | ^ 2 |" `; exports[`no-for-in-init-concise-binary-in.js [babel] format 1`] = ` -"Unexpected token, expected \\")\\" (3:18) +"Unexpected token, expected ")" (3:18) 1 | // https://github.com/babel/babel/pull/11931 2 | > 3 | for (() => x in y;;); @@ -64,7 +64,7 @@ exports[`partial-template-strings.js [babel] format 1`] = ` | ^ 7 | name_not_found: \`'\${?}' not found.\` 8 | }; - 9 | Diagnostics.name_not_found(\\"foo\\"); // \\"'foo' not found.\\"" + 9 | Diagnostics.name_not_found("foo"); // "'foo' not found."" `; exports[`snippet: #0 [babel] format 1`] = ` diff --git a/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap index 2b8f6bc79..0d7e1c3bb 100644 --- a/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/async-await/__snapshots__/jsfmt.spec.js.snap @@ -155,7 +155,7 @@ exports[`snippet: #4 [acorn] format 1`] = ` `; exports[`snippet: #4 [babel] format 1`] = ` -"Unexpected token, expected \\",\\" (1:22) +"Unexpected token, expected "," (1:22) > 1 | async (a) => (await a!) ** 6; | ^" `; diff --git a/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap index a12b158fb..3f0e1d752 100644 --- a/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/for-of/__snapshots__/jsfmt.spec.js.snap @@ -55,7 +55,7 @@ exports[`snippet: #0 [flow] format 1`] = ` `; exports[`snippet: #0 [meriyah] format 1`] = ` -"Identifier \\"let\\" disallowed as left-hand side expression in strict mode (1:9) +"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) > 1 | for (let.foo of []); | ^" `; @@ -91,7 +91,7 @@ exports[`snippet: #1 [flow] format 1`] = ` `; exports[`snippet: #1 [meriyah] format 1`] = ` -"Identifier \\"let\\" disallowed as left-hand side expression in strict mode (1:9) +"Identifier "let" disallowed as left-hand side expression in strict mode (1:9) > 1 | for (let().bar of []); | ^" `; @@ -127,7 +127,7 @@ exports[`snippet: #2 [flow] format 1`] = ` `; exports[`snippet: #2 [meriyah] format 1`] = ` -"Identifier \\"let\\" disallowed as left-hand side expression in strict mode (1:10) +"Identifier "let" disallowed as left-hand side expression in strict mode (1:10) > 1 | for (let\`\`.bar of []); | ^" `; diff --git a/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap index 6bcd3e8b8..7ff9239cd 100644 --- a/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/js/reserved-word/__snapshots__/jsfmt.spec.js.snap @@ -14,12 +14,12 @@ exports[`snippet: #0 [meriyah] format 1`] = ` exports[`snippet: #1 [espree] format 1`] = ` "The keyword 'interface' is reserved (1:8) -> 1 | import interface from \\"foo\\"; +> 1 | import interface from "foo"; | ^" `; exports[`snippet: #1 [meriyah] format 1`] = ` "Unexpected strict mode reserved word (1:16) -> 1 | import interface from \\"foo\\"; +> 1 | import interface from "foo"; | ^" `; 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 128c9cbd2..8976835c9 100644 --- a/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/json/__snapshots__/jsfmt.spec.js.snap @@ -20,91 +20,91 @@ exports[`snippet: #0 [json5] format 1`] = ` exports[`snippet: #1 [json] format 1`] = ` "Computed key is not allowed in JSON. (1:3) -> 1 | {[\\"foo\\"]:\\"bar\\"} +> 1 | {["foo"]:"bar"} | ^^^^^" `; exports[`snippet: #1 [json-stringify] format 1`] = ` "Computed key is not allowed in JSON. (1:3) -> 1 | {[\\"foo\\"]:\\"bar\\"} +> 1 | {["foo"]:"bar"} | ^^^^^" `; exports[`snippet: #1 [json5] format 1`] = ` "Computed key is not allowed in JSON. (1:3) -> 1 | {[\\"foo\\"]:\\"bar\\"} +> 1 | {["foo"]:"bar"} | ^^^^^" `; exports[`snippet: #2 [json] format 1`] = ` "Operator '~' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": ~1} +> 1 | {"foo": ~1} | ^^" `; exports[`snippet: #2 [json-stringify] format 1`] = ` "Operator '~' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": ~1} +> 1 | {"foo": ~1} | ^^" `; exports[`snippet: #2 [json5] format 1`] = ` "Operator '~' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": ~1} +> 1 | {"foo": ~1} | ^^" `; exports[`snippet: #3 [json] format 1`] = ` "'LogicalExpression' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": false || \\"bar\\"} +> 1 | {"foo": false || "bar"} | ^^^^^^^^^^^^^^" `; exports[`snippet: #3 [json-stringify] format 1`] = ` "'LogicalExpression' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": false || \\"bar\\"} +> 1 | {"foo": false || "bar"} | ^^^^^^^^^^^^^^" `; exports[`snippet: #3 [json5] format 1`] = ` "'LogicalExpression' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": false || \\"bar\\"} +> 1 | {"foo": false || "bar"} | ^^^^^^^^^^^^^^" `; exports[`snippet: #4 [json] format 1`] = ` "'ArrowFunctionExpression' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": () => {}} +> 1 | {"foo": () => {}} | ^^^^^^^^" `; exports[`snippet: #4 [json-stringify] format 1`] = ` "'ArrowFunctionExpression' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": () => {}} +> 1 | {"foo": () => {}} | ^^^^^^^^" `; exports[`snippet: #4 [json5] format 1`] = ` "'ArrowFunctionExpression' is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": () => {}} +> 1 | {"foo": () => {}} | ^^^^^^^^" `; exports[`snippet: #5 [json] format 1`] = ` -"Expecting Unicode escape sequence \\\\uXXXX. (1:10) -> 1 | packages\\\\the-hub\\\\cypress\\\\fixtures\\\\gridConfiguration.json +"Expecting Unicode escape sequence \\uXXXX. (1:10) +> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json | ^" `; exports[`snippet: #5 [json-stringify] format 1`] = ` -"Expecting Unicode escape sequence \\\\uXXXX. (1:10) -> 1 | packages\\\\the-hub\\\\cypress\\\\fixtures\\\\gridConfiguration.json +"Expecting Unicode escape sequence \\uXXXX. (1:10) +> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json | ^" `; exports[`snippet: #5 [json5] format 1`] = ` -"Expecting Unicode escape sequence \\\\uXXXX. (1:10) -> 1 | packages\\\\the-hub\\\\cypress\\\\fixtures\\\\gridConfiguration.json +"Expecting Unicode escape sequence \\uXXXX. (1:10) +> 1 | packages\\the-hub\\cypress\\fixtures\\gridConfiguration.json | ^" `; @@ -401,21 +401,21 @@ exports[`snippet: #21 [json5] format 1`] = ` exports[`snippet: #22 [json] format 1`] = ` "Unexpected token (2:1) - 1 | \\"use strict\\" + 1 | "use strict" > 2 | {} | ^" `; exports[`snippet: #22 [json-stringify] format 1`] = ` "Unexpected token (2:1) - 1 | \\"use strict\\" + 1 | "use strict" > 2 | {} | ^" `; exports[`snippet: #22 [json5] format 1`] = ` "Unexpected token (2:1) - 1 | \\"use strict\\" + 1 | "use strict" > 2 | {} | ^" `; diff --git a/tests/format/misc/errors/json/json-stringify/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/json/json-stringify/__snapshots__/jsfmt.spec.js.snap index 2f1c24a06..5d8ae819e 100644 --- a/tests/format/misc/errors/json/json-stringify/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/json/json-stringify/__snapshots__/jsfmt.spec.js.snap @@ -2,7 +2,7 @@ exports[`snippet: #0 [json-stringify] format 1`] = ` "Comment is not allowed in JSON. (1:1) -> 1 | /* comment */{\\"foo\\": 1} +> 1 | /* comment */{"foo": 1} | ^^^^^^^^^^^^^" `; @@ -10,11 +10,11 @@ exports[`snippet: #1 [json-stringify] format 1`] = ` "Comment is not allowed in JSON. (1:1) > 1 | // comment | ^^^^^^^^^^ - 2 | {\\"foo\\": 1}" + 2 | {"foo": 1}" `; exports[`snippet: #2 [json-stringify] format 1`] = ` "Comment is not allowed in JSON. (1:9) -> 1 | {\\"foo\\": /* comment */ 1} +> 1 | {"foo": /* comment */ 1} | ^^^^^^^^^^^^^" `; diff --git a/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap index 20833d225..3e407275f 100644 --- a/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/less/__snapshots__/jsfmt.spec.js.snap @@ -14,7 +14,7 @@ exports[`inline-comment.less [less] format 1`] = ` exports[`open-double-quote.less [less] format 1`] = ` "CssSyntaxError: Unclosed string (2:17) 1 | a { -> 2 | background: url(\\" +> 2 | background: url(" | ^ 3 | } 4 |" diff --git a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap index 842ce1a00..e5586b5f9 100644 --- a/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap @@ -2,7 +2,7 @@ exports[`default-escaped.ts [typescript] format 1`] = ` "Declaration or statement expected. (1:1) -> 1 | export asyn\\\\u{63} from \\"async\\"; +> 1 | export asyn\\u{63} from "async"; | ^ 2 |" `; @@ -25,7 +25,7 @@ exports[`invalid-jsx-1.ts [typescript] format 1`] = ` exports[`module-attributes-static.ts [typescript] format 1`] = ` "';' expected. (1:28) -> 1 | import foo from \\"foo.json\\" with type: \\"json\\"; +> 1 | import foo from "foo.json" with type: "json"; | ^ 2 |" `; @@ -52,25 +52,25 @@ exports[`snippet: #1 [typescript] format 1`] = ` exports[`snippet: #2 [typescript] format 1`] = ` "':' expected. (1:21) -> 1 | let x3 =
{\\"foo\\"}}
; +> 1 | let x3 =
{"foo"}}
; | ^" `; exports[`snippet: #3 [typescript] format 1`] = ` "':' expected. (1:21) -> 1 | let x4 =
{\\"foo\\"}>
; +> 1 | let x4 =
{"foo"}>
; | ^" `; exports[`snippet: #4 [typescript] format 1`] = ` "Expression expected. (1:15) -> 1 | let x5 =
}{\\"foo\\"}
; +> 1 | let x5 =
}{"foo"}
; | ^" `; exports[`snippet: #5 [typescript] format 1`] = ` "Expression expected. (1:15) -> 1 | let x6 =
>{\\"foo\\"}
; +> 1 | let x6 =
>{"foo"}
; | ^" `; diff --git a/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap index 6c157b5db..11aef9f65 100644 --- a/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/misc/errors/vue/__snapshots__/jsfmt.spec.js.snap @@ -1,14 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`unclosed_tag.vue [vue] format 1`] = ` -"Unexpected character \\"EOF\\" (2:1) +"Unexpected character "EOF" (2:1) 1 |
2 | | ^" `; exports[`unclosed_tag_in_template.vue [vue] format 1`] = ` -"Unexpected character \\"/\\" (4:2) +"Unexpected character "/" (4:2) 2 |

Templates are formatted as well... 3 | 4 | @@ -17,12 +17,12 @@ exports[`unclosed_tag_in_template.vue [vue] format 1`] = ` `; exports[`upper-case.html [vue] format 1`] = ` -"Void elements do not have end tags \\"Input\\" (8:21) - 6 |

+"Void elements do not have end tags "Input" (8:21) + 6 |
7 | > 8 | {{value}} | ^^^^^^^^ 9 |
10 | - 11 | " + 11 | " `; diff --git a/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap index 4a507d8cc..1c468fe7f 100644 --- a/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/class/__snapshots__/jsfmt.spec.js.snap @@ -35,7 +35,7 @@ abstract class Bar { `; exports[`constructor.ts [babel-ts] format 1`] = ` -"Unexpected token, expected \\",\\" (2:22) +"Unexpected token, expected "," (2:22) 1 | class foo { > 2 | constructor(static a: number) {} | ^ @@ -351,7 +351,7 @@ interface AudioBufferList { `; exports[`methods.ts [babel-ts] format 1`] = ` -"Unexpected token, expected \\";\\" (6:10) +"Unexpected token, expected ";" (6:10) 4 | 5 | interface Iterable { > 6 | export [Symbol.iterator](): Iterator; diff --git a/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap index bf313dca1..93d1d0e4d 100644 --- a/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/compiler/__snapshots__/jsfmt.spec.js.snap @@ -442,7 +442,7 @@ const; `; exports[`errorOnInitializerInInterfaceProperty.ts [babel-ts] format 1`] = ` -"Unexpected token, expected \\";\\" (2:17) +"Unexpected token, expected ";" (2:17) 1 | interface Foo { > 2 | bar: number = 5; | ^ diff --git a/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap index 5ff496cbd..e70791f7c 100644 --- a/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/error-recovery/__snapshots__/jsfmt.spec.js.snap @@ -153,7 +153,7 @@ class f7<> { `; exports[`index-signature.ts [babel-ts] format 1`] = ` -"Unexpected token, expected \\"]\\" (4:13) +"Unexpected token, expected "]" (4:13) 2 | 3 | type TwoParams = { > 4 | [a: string, b: string]: string; @@ -164,7 +164,7 @@ exports[`index-signature.ts [babel-ts] format 1`] = ` `; exports[`index-signature.ts - {"trailingComma":"all"} [babel-ts] format 1`] = ` -"Unexpected token, expected \\"]\\" (4:13) +"Unexpected token, expected "]" (4:13) 2 | 3 | type TwoParams = { > 4 | [a: string, b: string]: string; @@ -238,7 +238,7 @@ type TooLongSingleParam = { `; exports[`index-signature.ts - {"trailingComma":"es5"} [babel-ts] format 1`] = ` -"Unexpected token, expected \\"]\\" (4:13) +"Unexpected token, expected "]" (4:13) 2 | 3 | type TwoParams = { > 4 | [a: string, b: string]: string; diff --git a/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap index cc2961ef2..e3ee77eac 100644 --- a/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/typescript/keywords/__snapshots__/jsfmt.spec.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`keywords.ts [babel-ts] format 1`] = ` -"Unexpected token, expected \\"{\\" (9:12) +"Unexpected token, expected "{" (9:12) 7 | 8 | // Apparently this parses :P > 9 | export private public protected static readonly abstract async enum X { } @@ -196,7 +196,7 @@ class G { `; exports[`module.ts [babel-ts] format 1`] = ` -"Unexpected token, expected \\"{\\" (7:10) +"Unexpected token, expected "{" (7:10) 5 | 6 | // Apparently this parses :P > 7 | export private public protected static readonly abstract async enum X { } diff --git a/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap b/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap index f9685bf09..74cd8f0f7 100644 --- a/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap +++ b/tests/integration/__tests__/__snapshots__/arg-parsing.js.snap @@ -19,7 +19,7 @@ exports[`deprecated option values are warned (stderr) 1`] = ` `; exports[`deprecated option values are warned (stdout) 1`] = ` -"console.log(\\"could be single quote and without semi\\"); +"console.log("could be single quote and without semi"); " `; @@ -28,7 +28,7 @@ exports[`deprecated option values are warned (write) 1`] = `Array []`; exports[`negated options work (stderr) 1`] = `""`; exports[`negated options work (stdout) 1`] = ` -"console.log(\\"could be single quote and without semi\\") +"console.log("could be single quote and without semi") " `; @@ -81,7 +81,7 @@ exports[`unknown negated options are warned (stderr) 1`] = ` `; exports[`unknown negated options are warned (stdout) 1`] = ` -"console.log(\\"could be single quote and without semi\\"); +"console.log("could be single quote and without semi"); " `; @@ -93,7 +93,7 @@ exports[`unknown options are warned (stderr) 1`] = ` `; exports[`unknown options are warned (stdout) 1`] = ` -"console.log(\\"could be single quote and without semi\\"); +"console.log("could be single quote and without semi"); " `; @@ -105,6 +105,6 @@ exports[`unknown options not suggestion \`_\` (stderr) 1`] = ` `; exports[`unknown options not suggestion \`_\` (stdout) 1`] = ` -"console.log(\\"could be single quote and without semi\\"); +"console.log("could be single quote and without semi"); " `; diff --git a/tests/integration/__tests__/__snapshots__/config-invalid.js.snap b/tests/integration/__tests__/__snapshots__/config-invalid.js.snap index 27ebc38fc..eb8f9a690 100644 --- a/tests/integration/__tests__/__snapshots__/config-invalid.js.snap +++ b/tests/integration/__tests__/__snapshots__/config-invalid.js.snap @@ -10,7 +10,7 @@ exports[`resolves external configuration from package.json (stdout) 1`] = `""`; exports[`resolves external configuration from package.json (write) 1`] = `Array []`; exports[`show warning with kebab-case option key (stderr) 1`] = ` -"[warn] Ignored unknown option { \\"print-width\\": 3 }. Did you mean printWidth? +"[warn] Ignored unknown option { "print-width": 3 }. Did you mean printWidth? " `; @@ -19,7 +19,7 @@ exports[`show warning with kebab-case option key (stdout) 1`] = `""`; exports[`show warning with kebab-case option key (write) 1`] = `Array []`; exports[`show warning with unknown option (stderr) 1`] = ` -"[warn] Ignored unknown option { hello: \\"world\\" }. +"[warn] Ignored unknown option { hello: "world" }. " `; @@ -28,7 +28,7 @@ exports[`show warning with unknown option (stdout) 1`] = `""`; exports[`show warning with unknown option (write) 1`] = `Array []`; exports[`throw error for unsupported extension (stderr) 1`] = ` -"[error] Invalid configuration file \`/tests/integration/cli/config/invalid\`: No loader specified for extension \\".unsupported\\" +"[error] Invalid configuration file \`/tests/integration/cli/config/invalid\`: No loader specified for extension ".unsupported" " `; @@ -54,7 +54,7 @@ exports[`throw error with invalid config option (int) (stdout) 1`] = `""`; exports[`throw error with invalid config option (int) (write) 1`] = `Array []`; exports[`throw error with invalid config option (trailingComma) (stderr) 1`] = ` -"[error] Invalid trailingComma value. Expected \\"all\\", \\"es5\\" or \\"none\\", but received \\"wow\\". +"[error] Invalid trailingComma value. Expected "all", "es5" or "none", but received "wow". " `; @@ -63,7 +63,7 @@ exports[`throw error with invalid config option (trailingComma) (stdout) 1`] = ` exports[`throw error with invalid config option (trailingComma) (write) 1`] = `Array []`; exports[`throw error with invalid config precedence option (configPrecedence) (stderr) 1`] = ` -"[error] Invalid --config-precedence value. Expected \\"cli-override\\", \\"file-override\\" or \\"prefer-file\\", but received \\"option/configPrecedence\\". +"[error] Invalid --config-precedence value. Expected "cli-override", "file-override" or "prefer-file", but received "option/configPrecedence". " `; diff --git a/tests/integration/__tests__/__snapshots__/config-resolution.js.snap b/tests/integration/__tests__/__snapshots__/config-resolution.js.snap index 08d2fb229..bdec0cd3b 100644 --- a/tests/integration/__tests__/__snapshots__/config-resolution.js.snap +++ b/tests/integration/__tests__/__snapshots__/config-resolution.js.snap @@ -5,59 +5,59 @@ exports[`CLI overrides take precedence (stderr) 1`] = `""`; exports[`CLI overrides take precedence (stdout) 1`] = ` "function f() { console.log( - \\"should have tab width 8\\" + "should have tab width 8" ) } function f() { console.log( - \\"should have space width 2\\" + "should have space width 2" ) } function f() { console.log( - \\"should have space width 8\\" + "should have space width 8" ) } function f() { console.log( - \\"should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present\\" + "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" ) } console.log( - \\"should have no semi\\" + "should have no semi" ) console.log( - \\"jest/__best-tests__/.file.js should have semi\\" + "jest/__best-tests__/.file.js should have semi" ); console.log( - \\"jest/__best-tests__/file.js should have semi\\" + "jest/__best-tests__/file.js should have semi" ); console.log( - \\"jest/Component.js should not have semi\\" + "jest/Component.js should not have semi" ) console.log( - \\"jest/Component.test.js should have semi\\" + "jest/Component.test.js should have semi" ); function js() { console.log( - \\"js/file.js should have tab width 8 (1 if CLI)\\" + "js/file.js should have tab width 8 (1 if CLI)" ); } -\\"use strict\\"; +"use strict"; module.exports = { - endOfLine: \\"auto\\", + endOfLine: "auto", tabWidth: 8, }; function noConfigJs() { console.log( - \\"no-config/file.js should have no semicolons\\" + "no-config/file.js should have no semicolons" ) } function packageJs() { console.log( - \\"package/file.js should have tab width 3\\" + "package/file.js should have tab width 3" ); } function rcJson() { @@ -99,7 +99,7 @@ exports[`accepts configuration from --config (stderr) 1`] = `""`; exports[`accepts configuration from --config (stdout) 1`] = ` "function js() { - console.log(\\"js/file.js should have tab width 8 (1 if CLI)\\") + console.log("js/file.js should have tab width 8 (1 if CLI)") } " `; @@ -107,7 +107,7 @@ exports[`accepts configuration from --config (stdout) 1`] = ` exports[`accepts configuration from --config (write) 1`] = `Array []`; exports[`prints error message when no file found with --find-config-path (stderr) 1`] = ` -"[error] Can not find configure file for \\"..\\" +"[error] Can not find configure file for ".." " `; @@ -126,38 +126,38 @@ exports[`resolves configuration from external files (stderr) 1`] = `""`; exports[`resolves configuration from external files (stdout) 1`] = ` "function f() { - console.log(\\"should have tab width 8\\") + console.log("should have tab width 8") } function f() { - console.log(\\"should have space width 2\\") + console.log("should have space width 2") } function f() { - console.log(\\"should have space width 8\\") + console.log("should have space width 8") } function f() { console.log( - \\"should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present\\" + "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" ) } -console.log(\\"should have no semi\\") -console.log(\\"jest/__best-tests__/.file.js should have semi\\"); -console.log(\\"jest/__best-tests__/file.js should have semi\\"); -console.log(\\"jest/Component.js should not have semi\\") -console.log(\\"jest/Component.test.js should have semi\\"); +console.log("should have no semi") +console.log("jest/__best-tests__/.file.js should have semi"); +console.log("jest/__best-tests__/file.js should have semi"); +console.log("jest/Component.js should not have semi") +console.log("jest/Component.test.js should have semi"); function js() { - console.log(\\"js/file.js should have tab width 8 (1 if CLI)\\"); + console.log("js/file.js should have tab width 8 (1 if CLI)"); } -\\"use strict\\"; +"use strict"; module.exports = { - endOfLine: \\"auto\\", + endOfLine: "auto", tabWidth: 8, }; function noConfigJs() { - console.log(\\"no-config/file.js should have no semicolons\\") + console.log("no-config/file.js should have no semicolons") } function packageJs() { - console.log(\\"package/file.js should have tab width 3\\"); + console.log("package/file.js should have tab width 3"); } function rcJson() { console.log.apply(null, [ @@ -190,12 +190,12 @@ exports[`resolves configuration from external files and overrides by extname (st exports[`resolves configuration from external files and overrides by extname (stdout) 1`] = ` "function noConfigTs() { console.log( - \\"no-config/file.ts should have semicolons because it has a .ts extension\\" + "no-config/file.ts should have semicolons because it has a .ts extension" ); } function packageTs() { console.log( - \\"package/file.ts should have tab width 5 because it has .ts extension\\" + "package/file.ts should have tab width 5 because it has .ts extension" ); } " @@ -206,7 +206,7 @@ exports[`resolves configuration from external files and overrides by extname (wr exports[`resolves external configuration from package.json (stderr) 1`] = `""`; exports[`resolves external configuration from package.json (stdout) 1`] = ` -"console.log(\\"should have no semi\\") +"console.log("should have no semi") " `; diff --git a/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap b/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap index ec16c601c..7f36dbfe7 100644 --- a/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap +++ b/tests/integration/__tests__/__snapshots__/cursor-offset.js.snap @@ -2,17 +2,17 @@ exports[`cursorOffset should not be affected by full-width character (stdout) 1`] = ` "const x = [ - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", - \\"中文\\", + "中文", + "中文", + "中文", + "中文", + "中文", + "中文", + "中文", + "中文", + "中文", + "中文", + "中文", ]; " `; diff --git a/tests/integration/__tests__/__snapshots__/debug-api.js.snap b/tests/integration/__tests__/__snapshots__/debug-api.js.snap index 6f66f17ca..8357d3948 100644 --- a/tests/integration/__tests__/__snapshots__/debug-api.js.snap +++ b/tests/integration/__tests__/__snapshots__/debug-api.js.snap @@ -3,11 +3,11 @@ exports[`API prettier.formatDoc 1`] = ` "[ group([ - \\"const\\", - \\" \\", - group([group(\\"foo\\"), \\" =\\", group(indent([line, '\\"bar\\"']))]), + "const", + " ", + group([group("foo"), " =", group(indent([line, '"bar"']))]), indent([]), - \\";\\", + ";", ]), hardline, ]" diff --git a/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap b/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap index 6c4c00f94..6e4781352 100644 --- a/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap +++ b/tests/integration/__tests__/__snapshots__/debug-print-ast.js.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`prints information for debugging AST --debug-print-ast (stdout) 1`] = `"{\\"type\\":\\"File\\",\\"start\\":0,\\"end\\":18,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":0,\\"index\\":0},\\"end\\":{\\"line\\":1,\\"column\\":18,\\"index\\":18}},\\"range\\":[0,18],\\"errors\\":[],\\"program\\":{\\"type\\":\\"Program\\",\\"start\\":0,\\"end\\":18,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":0,\\"index\\":0},\\"end\\":{\\"line\\":1,\\"column\\":18,\\"index\\":18}},\\"range\\":[0,18],\\"sourceType\\":\\"module\\",\\"interpreter\\":null,\\"body\\":[{\\"type\\":\\"VariableDeclaration\\",\\"start\\":0,\\"end\\":18,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":0,\\"index\\":0},\\"end\\":{\\"line\\":1,\\"column\\":18,\\"index\\":18}},\\"range\\":[0,18],\\"declarations\\":[{\\"type\\":\\"VariableDeclarator\\",\\"start\\":6,\\"end\\":17,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":6,\\"index\\":6},\\"end\\":{\\"line\\":1,\\"column\\":17,\\"index\\":17}},\\"range\\":[6,17],\\"id\\":{\\"type\\":\\"Identifier\\",\\"start\\":6,\\"end\\":9,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":6,\\"index\\":6},\\"end\\":{\\"line\\":1,\\"column\\":9,\\"index\\":9},\\"identifierName\\":\\"foo\\"},\\"range\\":[6,9],\\"name\\":\\"foo\\"},\\"init\\":{\\"type\\":\\"StringLiteral\\",\\"start\\":12,\\"end\\":17,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":12,\\"index\\":12},\\"end\\":{\\"line\\":1,\\"column\\":17,\\"index\\":17}},\\"range\\":[12,17],\\"extra\\":{\\"rawValue\\":\\"foo\\",\\"raw\\":\\"'foo'\\"},\\"value\\":\\"foo\\"}}],\\"kind\\":\\"const\\"}],\\"directives\\":[]},\\"comments\\":[],\\"tokens\\":[{\\"type\\":{\\"label\\":\\"const\\",\\"keyword\\":\\"const\\",\\"beforeExpr\\":false,\\"startsExpr\\":false,\\"rightAssociative\\":false,\\"isLoop\\":false,\\"isAssign\\":false,\\"prefix\\":false,\\"postfix\\":false,\\"binop\\":null,\\"updateContext\\":null},\\"value\\":\\"const\\",\\"start\\":0,\\"end\\":5,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":0,\\"index\\":0},\\"end\\":{\\"line\\":1,\\"column\\":5,\\"index\\":5}}},{\\"type\\":{\\"label\\":\\"name\\",\\"beforeExpr\\":false,\\"startsExpr\\":true,\\"rightAssociative\\":false,\\"isLoop\\":false,\\"isAssign\\":false,\\"prefix\\":false,\\"postfix\\":false,\\"binop\\":null,\\"updateContext\\":null},\\"value\\":\\"foo\\",\\"start\\":6,\\"end\\":9,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":6,\\"index\\":6},\\"end\\":{\\"line\\":1,\\"column\\":9,\\"index\\":9}}},{\\"type\\":{\\"label\\":\\"=\\",\\"beforeExpr\\":true,\\"startsExpr\\":false,\\"rightAssociative\\":false,\\"isLoop\\":false,\\"isAssign\\":true,\\"prefix\\":false,\\"postfix\\":false,\\"binop\\":null,\\"updateContext\\":null},\\"value\\":\\"=\\",\\"start\\":10,\\"end\\":11,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":10,\\"index\\":10},\\"end\\":{\\"line\\":1,\\"column\\":11,\\"index\\":11}}},{\\"type\\":{\\"label\\":\\"string\\",\\"beforeExpr\\":false,\\"startsExpr\\":true,\\"rightAssociative\\":false,\\"isLoop\\":false,\\"isAssign\\":false,\\"prefix\\":false,\\"postfix\\":false,\\"binop\\":null,\\"updateContext\\":null},\\"value\\":\\"foo\\",\\"start\\":12,\\"end\\":17,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":12,\\"index\\":12},\\"end\\":{\\"line\\":1,\\"column\\":17,\\"index\\":17}}},{\\"type\\":{\\"label\\":\\";\\",\\"beforeExpr\\":true,\\"startsExpr\\":false,\\"rightAssociative\\":false,\\"isLoop\\":false,\\"isAssign\\":false,\\"prefix\\":false,\\"postfix\\":false,\\"binop\\":null,\\"updateContext\\":null},\\"start\\":17,\\"end\\":18,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":17,\\"index\\":17},\\"end\\":{\\"line\\":1,\\"column\\":18,\\"index\\":18}}},{\\"type\\":{\\"label\\":\\"eof\\",\\"beforeExpr\\":false,\\"startsExpr\\":false,\\"rightAssociative\\":false,\\"isLoop\\":false,\\"isAssign\\":false,\\"prefix\\":false,\\"postfix\\":false,\\"binop\\":null,\\"updateContext\\":null},\\"start\\":18,\\"end\\":18,\\"loc\\":{\\"start\\":{\\"line\\":1,\\"column\\":18,\\"index\\":18},\\"end\\":{\\"line\\":1,\\"column\\":18,\\"index\\":18}}}]}"`; +exports[`prints information for debugging AST --debug-print-ast (stdout) 1`] = `"{"type":"File","start":0,"end":18,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":18,"index":18}},"range":[0,18],"errors":[],"program":{"type":"Program","start":0,"end":18,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":18,"index":18}},"range":[0,18],"sourceType":"module","interpreter":null,"body":[{"type":"VariableDeclaration","start":0,"end":18,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":18,"index":18}},"range":[0,18],"declarations":[{"type":"VariableDeclarator","start":6,"end":17,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":17,"index":17}},"range":[6,17],"id":{"type":"Identifier","start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"foo"},"range":[6,9],"name":"foo"},"init":{"type":"StringLiteral","start":12,"end":17,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":17,"index":17}},"range":[12,17],"extra":{"rawValue":"foo","raw":"'foo'"},"value":"foo"}}],"kind":"const"}],"directives":[]},"comments":[],"tokens":[{"type":{"label":"const","keyword":"const","beforeExpr":false,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"const","start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5}}},{"type":{"label":"name","beforeExpr":false,"startsExpr":true,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"foo","start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9}}},{"type":{"label":"=","beforeExpr":true,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":true,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"=","start":10,"end":11,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":11,"index":11}}},{"type":{"label":"string","beforeExpr":false,"startsExpr":true,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"value":"foo","start":12,"end":17,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":17,"index":17}}},{"type":{"label":";","beforeExpr":true,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"start":17,"end":18,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":1,"column":18,"index":18}}},{"type":{"label":"eof","beforeExpr":false,"startsExpr":false,"rightAssociative":false,"isLoop":false,"isAssign":false,"prefix":false,"postfix":false,"binop":null,"updateContext":null},"start":18,"end":18,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":18,"index":18}}}]}"`; exports[`prints information for debugging AST --debug-print-ast (write) 1`] = `Array []`; diff --git a/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap b/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap index 260d1cc9d..fd5ce3845 100644 --- a/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap +++ b/tests/integration/__tests__/__snapshots__/debug-print-comments.js.snap @@ -3,46 +3,46 @@ exports[`prints information for debugging comment attachment with --debug-print-comments (stdout) 1`] = ` "[ { - \\"type\\": \\"CommentBlock\\", - \\"value\\": \\" 1 \\", - \\"start\\": 0, - \\"end\\": 7, - \\"loc\\": { - \\"start\\": { \\"line\\": 1, \\"column\\": 0, \\"index\\": 0 }, - \\"end\\": { \\"line\\": 1, \\"column\\": 7, \\"index\\": 7 } + "type": "CommentBlock", + "value": " 1 ", + "start": 0, + "end": 7, + "loc": { + "start": { "line": 1, "column": 0, "index": 0 }, + "end": { "line": 1, "column": 7, "index": 7 } }, - \\"placement\\": \\"endOfLine\\", - \\"leading\\": true, - \\"trailing\\": false, - \\"nodeDescription\\": \\"ExpressionStatement\\" + "placement": "endOfLine", + "leading": true, + "trailing": false, + "nodeDescription": "ExpressionStatement" }, { - \\"type\\": \\"CommentBlock\\", - \\"value\\": \\" 2 \\", - \\"start\\": 24, - \\"end\\": 31, - \\"loc\\": { - \\"start\\": { \\"line\\": 2, \\"column\\": 16, \\"index\\": 24 }, - \\"end\\": { \\"line\\": 2, \\"column\\": 23, \\"index\\": 31 } + "type": "CommentBlock", + "value": " 2 ", + "start": 24, + "end": 31, + "loc": { + "start": { "line": 2, "column": 16, "index": 24 }, + "end": { "line": 2, "column": 23, "index": 31 } }, - \\"placement\\": \\"remaining\\", - \\"leading\\": false, - \\"trailing\\": true, - \\"nodeDescription\\": \\"Identifier foo\\" + "placement": "remaining", + "leading": false, + "trailing": true, + "nodeDescription": "Identifier foo" }, { - \\"type\\": \\"CommentLine\\", - \\"value\\": \\" 3\\", - \\"start\\": 34, - \\"end\\": 38, - \\"loc\\": { - \\"start\\": { \\"line\\": 2, \\"column\\": 26, \\"index\\": 34 }, - \\"end\\": { \\"line\\": 2, \\"column\\": 30, \\"index\\": 38 } + "type": "CommentLine", + "value": " 3", + "start": 34, + "end": 38, + "loc": { + "start": { "line": 2, "column": 26, "index": 34 }, + "end": { "line": 2, "column": 30, "index": 38 } }, - \\"placement\\": \\"remaining\\", - \\"leading\\": false, - \\"trailing\\": true, - \\"nodeDescription\\": \\"ExpressionStatement\\" + "placement": "remaining", + "leading": false, + "trailing": true, + "nodeDescription": "ExpressionStatement" } ] " diff --git a/tests/integration/__tests__/__snapshots__/early-exit.js.snap b/tests/integration/__tests__/__snapshots__/early-exit.js.snap index 1f88c4859..ba09493f3 100644 --- a/tests/integration/__tests__/__snapshots__/early-exit.js.snap +++ b/tests/integration/__tests__/__snapshots__/early-exit.js.snap @@ -172,7 +172,7 @@ exports[`show version with --version (stderr) 1`] = `""`; exports[`show version with --version (write) 1`] = `Array []`; exports[`show warning with --help not-found (typo) (stderr) 1`] = ` -"[warn] Unknown flag \\"parserr\\", did you mean \\"parser\\"? +"[warn] Unknown flag "parserr", did you mean "parser"? " `; @@ -365,7 +365,7 @@ exports[`throw error with --find-config-path + multiple files (stdout) 1`] = `"" exports[`throw error with --find-config-path + multiple files (write) 1`] = `Array []`; exports[`throw error with --help not-found (stderr) 1`] = ` -"[error] Invalid --help value. Expected a flag, but received \\"not-found\\". +"[error] Invalid --help value. Expected a flag, but received "not-found". " `; diff --git a/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap b/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap index ddce6fcc5..3c92dbe64 100644 --- a/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap +++ b/tests/integration/__tests__/__snapshots__/error-on-unmatched-pattern.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`error on unmatched pattern (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"**/*.toml\\". +"[error] No files matching the pattern were found: "**/*.toml". " `; @@ -10,14 +10,14 @@ exports[`error on unmatched pattern (stdout) 1`] = `""`; exports[`error on unmatched pattern (write) 1`] = `Array []`; exports[`error on unmatched pattern when 2nd glob has no match (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"**/*.toml\\". +"[error] No files matching the pattern were found: "**/*.toml". " `; exports[`error on unmatched pattern when 2nd glob has no match (stdout) 1`] = ` -"const hello = \\"there\\"; +"const hello = "there"; { - \\"hello\\": \\"there\\" + "hello": "there" } hello: there " @@ -28,7 +28,7 @@ exports[`error on unmatched pattern when 2nd glob has no match (write) 1`] = `Ar exports[`no error on unmatched pattern (stderr) 1`] = `""`; exports[`no error on unmatched pattern (stdout) 1`] = ` -"const hello = \\"there\\"; +"const hello = "there"; " `; @@ -37,9 +37,9 @@ exports[`no error on unmatched pattern (write) 1`] = `Array []`; exports[`no error on unmatched pattern when 2nd glob has no match (stderr) 1`] = `""`; exports[`no error on unmatched pattern when 2nd glob has no match (stdout) 1`] = ` -"const hello = \\"there\\"; +"const hello = "there"; { - \\"hello\\": \\"there\\" + "hello": "there" } hello: there " diff --git a/tests/integration/__tests__/__snapshots__/file-info.js.snap b/tests/integration/__tests__/__snapshots__/file-info.js.snap index 7a3c7901c..d10bc2c3a 100644 --- a/tests/integration/__tests__/__snapshots__/file-info.js.snap +++ b/tests/integration/__tests__/__snapshots__/file-info.js.snap @@ -3,7 +3,7 @@ exports[`extracts file-info for a file in not_node_modules (stderr) 1`] = `""`; exports[`extracts file-info for a file in not_node_modules (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"babel\\" } +"{ "ignored": false, "inferredParser": "babel" } " `; @@ -13,7 +13,7 @@ exports[`extracts file-info for a file in not_node_modules (write) 1`] = `Array exports[`extracts file-info for a js file (stderr) 1`] = `""`; exports[`extracts file-info for a js file (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"babel\\" } +"{ "ignored": false, "inferredParser": "babel" } " `; @@ -23,7 +23,7 @@ exports[`extracts file-info for a js file (write) 1`] = `Array []`; exports[`extracts file-info for a known markdown file with no extension (stderr) 1`] = `""`; exports[`extracts file-info for a known markdown file with no extension (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"markdown\\" } +"{ "ignored": false, "inferredParser": "markdown" } " `; @@ -33,7 +33,7 @@ exports[`extracts file-info for a known markdown file with no extension (write) exports[`extracts file-info for a markdown file (stderr) 1`] = `""`; exports[`extracts file-info for a markdown file (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"markdown\\" } +"{ "ignored": false, "inferredParser": "markdown" } " `; @@ -43,7 +43,7 @@ exports[`extracts file-info for a markdown file (write) 1`] = `Array []`; exports[`extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided (stderr) 1`] = `""`; exports[`extracts file-info with ignored=false for a file in node_modules when --with-node-modules provided (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"babel\\" } +"{ "ignored": false, "inferredParser": "babel" } " `; @@ -53,7 +53,7 @@ exports[`extracts file-info with ignored=false for a file in node_modules when - exports[`extracts file-info with ignored=true for a file in .prettierignore (stderr) 1`] = `""`; exports[`extracts file-info with ignored=true for a file in .prettierignore (stdout) 1`] = ` -"{ \\"ignored\\": true, \\"inferredParser\\": null } +"{ "ignored": true, "inferredParser": null } " `; @@ -63,7 +63,7 @@ exports[`extracts file-info with ignored=true for a file in .prettierignore (wri exports[`extracts file-info with ignored=true for a file in a hand-picked .prettierignore (stderr) 1`] = `""`; exports[`extracts file-info with ignored=true for a file in a hand-picked .prettierignore (stdout) 1`] = ` -"{ \\"ignored\\": true, \\"inferredParser\\": null } +"{ "ignored": true, "inferredParser": null } " `; @@ -73,7 +73,7 @@ exports[`extracts file-info with ignored=true for a file in a hand-picked .prett exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked (stderr) 1`] = `""`; exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"foo\\" } +"{ "ignored": false, "inferredParser": "foo" } " `; @@ -83,7 +83,7 @@ exports[`extracts file-info with inferredParser=foo when a plugin is hand-picked exports[`extracts file-info with inferredParser=foo when plugins are autoloaded (stderr) 1`] = `""`; exports[`extracts file-info with inferredParser=foo when plugins are autoloaded (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"foo\\" } +"{ "ignored": false, "inferredParser": "foo" } " `; @@ -93,7 +93,7 @@ exports[`extracts file-info with inferredParser=foo when plugins are autoloaded exports[`extracts file-info with inferredParser=foo when plugins are loaded with --plugin-search-dir (stderr) 1`] = `""`; exports[`extracts file-info with inferredParser=foo when plugins are loaded with --plugin-search-dir (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"foo\\" } +"{ "ignored": false, "inferredParser": "foo" } " `; @@ -103,7 +103,7 @@ exports[`extracts file-info with inferredParser=foo when plugins are loaded with exports[`extracts file-info with inferredParser=null for file.foo (stderr) 1`] = `""`; exports[`extracts file-info with inferredParser=null for file.foo (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": null } +"{ "ignored": false, "inferredParser": null } " `; @@ -113,7 +113,7 @@ exports[`extracts file-info with inferredParser=null for file.foo (write) 1`] = exports[`extracts file-info with with ignored=true for a file in node_modules (stderr) 1`] = `""`; exports[`extracts file-info with with ignored=true for a file in node_modules (stdout) 1`] = ` -"{ \\"ignored\\": true, \\"inferredParser\\": null } +"{ "ignored": true, "inferredParser": null } " `; @@ -121,7 +121,7 @@ exports[`extracts file-info with with ignored=true for a file in node_modules (s exports[`extracts file-info with with ignored=true for a file in node_modules (write) 1`] = `Array []`; exports[`file-info should not try resolve config with --no-config (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"babel\\" } +"{ "ignored": false, "inferredParser": "babel" } " `; @@ -129,7 +129,7 @@ exports[`file-info should not try resolve config with --no-config (stdout) 1`] = exports[`file-info should try resolve config (stderr) 1`] = `""`; exports[`file-info should try resolve config (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"override-js-parser\\" } +"{ "ignored": false, "inferredParser": "override-js-parser" } " `; @@ -139,7 +139,7 @@ exports[`file-info should try resolve config (write) 1`] = `Array []`; exports[`non-exists ignore path (stderr) 1`] = `""`; exports[`non-exists ignore path (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"babel\\" } +"{ "ignored": false, "inferredParser": "babel" } " `; diff --git a/tests/integration/__tests__/__snapshots__/format-ast.js.snap b/tests/integration/__tests__/__snapshots__/format-ast.js.snap index 422eaeb0b..e8eb191cf 100644 --- a/tests/integration/__tests__/__snapshots__/format-ast.js.snap +++ b/tests/integration/__tests__/__snapshots__/format-ast.js.snap @@ -11,11 +11,11 @@ exports[`formatAST Shorthand specifier 2 1`] = ` `; exports[`formatAST Shorthand specifier 3 1`] = ` -"export { \\"specifier\\" as specifier }; +"export { "specifier" as specifier }; " `; exports[`formatAST Shorthand specifier 4 1`] = ` -"export { \\"specifier\\" as \\"specifier\\" }; +"export { "specifier" as "specifier" }; " `; diff --git a/tests/integration/__tests__/__snapshots__/format.js.snap b/tests/integration/__tests__/__snapshots__/format.js.snap index 40cafac78..fc7cb935d 100644 --- a/tests/integration/__tests__/__snapshots__/format.js.snap +++ b/tests/integration/__tests__/__snapshots__/format.js.snap @@ -7,9 +7,9 @@ exports[`'Adjacent JSX' error should not be swallowed by Babel's error recovery | ^" `; -exports[`html parser should handle CRLF correctly 1`] = `"\\"\\\\r\\\\n\\""`; +exports[`html parser should handle CRLF correctly 1`] = `""\\r\\n""`; -exports[`markdown parser should handle CRLF correctly 1`] = `"\\"\`\`\`\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\`\`\`\\\\r\\\\n\\""`; +exports[`markdown parser should handle CRLF correctly 1`] = `""\`\`\`\\r\\n\\r\\n\\r\\n\`\`\`\\r\\n""`; exports[`typescript parser should throw the first error when both JSX and non-JSX mode failed 1`] = ` "Expression expected. (8:7) @@ -19,4 +19,4 @@ exports[`typescript parser should throw the first error when both JSX and non-JS | ^" `; -exports[`yaml parser should handle CRLF correctly 1`] = `"\\"a: 123\\\\r\\\\n\\""`; +exports[`yaml parser should handle CRLF correctly 1`] = `""a: 123\\r\\n""`; diff --git a/tests/integration/__tests__/__snapshots__/help-options.js.snap b/tests/integration/__tests__/__snapshots__/help-options.js.snap index e4821dc24..98fbd7470 100644 --- a/tests/integration/__tests__/__snapshots__/help-options.js.snap +++ b/tests/integration/__tests__/__snapshots__/help-options.js.snap @@ -154,9 +154,9 @@ exports[`show detailed usage with --help end-of-line (stdout) 1`] = ` Valid options: - lf Line Feed only (\\\\n), common on Linux and macOS as well as inside git repos - crlf Carriage Return + Line Feed characters (\\\\r\\\\n), common on Windows - cr Carriage Return character only (\\\\r), used very rarely + lf Line Feed only (\\n), common on Linux and macOS as well as inside git repos + crlf Carriage Return + Line Feed characters (\\r\\n), common on Windows + cr Carriage Return character only (\\r), used very rarely auto Maintain existing (mixed values within one file are normalised by looking at what's used after the first line) diff --git a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap index 7fe86de9f..9f7ab764e 100644 --- a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap +++ b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap @@ -7,7 +7,7 @@ exports[`Ignored file (stdout) 1`] = `""`; exports[`Ignored file (write) 1`] = `Array []`; exports[`None exist file (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"non-exist-file\\". +"[error] No files matching the pattern were found: "non-exist-file". " `; @@ -16,7 +16,7 @@ exports[`None exist file (stdout) 1`] = `""`; exports[`None exist file (write) 1`] = `Array []`; exports[`Not matching pattern (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"*.non-exist-pattern\\". +"[error] No files matching the pattern were found: "*.non-exist-pattern". " `; @@ -61,7 +61,7 @@ exports[`ignore-unknown write (stdout) 1`] = ` exports[`ignore-unknown write (write) 1`] = ` Array [ Object { - "content": "const foo = \\"bar\\"; + "content": "const foo = "bar"; ", "filename": "javascript.js", }, diff --git a/tests/integration/__tests__/__snapshots__/infer-parser.js.snap b/tests/integration/__tests__/__snapshots__/infer-parser.js.snap index 21c86bbf1..44ca2f3e9 100644 --- a/tests/integration/__tests__/__snapshots__/infer-parser.js.snap +++ b/tests/integration/__tests__/__snapshots__/infer-parser.js.snap @@ -129,7 +129,7 @@ Array [ `; exports[`Interpreters (stdout) 1`] = ` -"{ \\"ignored\\": false, \\"inferredParser\\": \\"babel\\" } +"{ "ignored": false, "inferredParser": "babel" } " `; diff --git a/tests/integration/__tests__/__snapshots__/load-toml.js.snap b/tests/integration/__tests__/__snapshots__/load-toml.js.snap index 8b0ab33d3..75b5b616b 100644 --- a/tests/integration/__tests__/__snapshots__/load-toml.js.snap +++ b/tests/integration/__tests__/__snapshots__/load-toml.js.snap @@ -22,7 +22,7 @@ Object { exports[`TOML throws error on incorrect toml 1`] = ` "TOML Error in example.toml: -Unknown character \\"47\\" at row 1, col 2, pos 1: +Unknown character "47" at row 1, col 2, pos 1: 1> ///ERROR/// ^ diff --git a/tests/integration/__tests__/__snapshots__/loglevel.js.snap b/tests/integration/__tests__/__snapshots__/loglevel.js.snap index 8e63b3cd6..f4030895b 100644 --- a/tests/integration/__tests__/__snapshots__/loglevel.js.snap +++ b/tests/integration/__tests__/__snapshots__/loglevel.js.snap @@ -15,6 +15,6 @@ Array [ `; exports[`Should use default level logger to log \`--loglevel\` error (stderr) 1`] = ` -"[error] Invalid --loglevel value. Expected \\"debug\\", \\"error\\", \\"log\\", \\"silent\\" or \\"warn\\", but received \\"a-unknown-log-level\\". +"[error] Invalid --loglevel value. Expected "debug", "error", "log", "silent" or "warn", but received "a-unknown-log-level". " `; diff --git a/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap b/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap index 8be8bd58f..c52084b2b 100644 --- a/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap +++ b/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap @@ -29,7 +29,7 @@ dir2/nested2/bn2.js `; exports[`1c: prettier dir1 empty (stderr) 1`] = ` -"[error] No supported files were found in the directory: \\"empty\\". +"[error] No supported files were found in the directory: "empty". " `; @@ -62,7 +62,7 @@ dir2/node-shebang `; exports[`3: prettier nonexistent-dir 'dir2/**/*' (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"nonexistent-dir\\". +"[error] No files matching the pattern were found: "nonexistent-dir". [error] No parser could be inferred for file: dir2/a2.foo " `; @@ -140,7 +140,7 @@ exports[`Negative patterns 4: prettier '!nonexistent-dir1 !nonexistent-dir2' (st exports[`Negative patterns 4: prettier '!nonexistent-dir1 !nonexistent-dir2' (stdout) 1`] = `""`; exports[`Negative patterns with explicit files: prettier dir1/a1.js dir2/a2.js '!dir1/*' (stderr) 1`] = ` -"[error] Explicitly specified file was ignored due to negative glob patterns: \\"dir1/a1.js\\". +"[error] Explicitly specified file was ignored due to negative glob patterns: "dir1/a1.js". " `; diff --git a/tests/integration/__tests__/__snapshots__/patterns.js.snap b/tests/integration/__tests__/__snapshots__/patterns.js.snap index b8c00ca8f..d2ebdb3c7 100644 --- a/tests/integration/__tests__/__snapshots__/patterns.js.snap +++ b/tests/integration/__tests__/__snapshots__/patterns.js.snap @@ -62,7 +62,7 @@ regular-module.js exports[`multiple patterns with ignore nested directories pattern (write) 1`] = `Array []`; exports[`multiple patterns with non exists pattern (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"non-existent.js\\". +"[error] No files matching the pattern were found: "non-existent.js". " `; @@ -75,8 +75,8 @@ directory/nested-directory/nested-directory-file.js exports[`multiple patterns with non exists pattern (write) 1`] = `Array []`; exports[`multiple patterns, throw error and exit with non zero code on non existing files (stderr) 1`] = ` -"[error] No files matching the pattern were found: \\"non-existent.js\\". -[error] No files matching the pattern were found: \\"other-non-existent.js\\". +"[error] No files matching the pattern were found: "non-existent.js". +[error] No files matching the pattern were found: "other-non-existent.js". " `; diff --git a/tests/integration/__tests__/__snapshots__/schema.js.snap b/tests/integration/__tests__/__snapshots__/schema.js.snap index d76f18954..d73ae2338 100644 --- a/tests/integration/__tests__/__snapshots__/schema.js.snap +++ b/tests/integration/__tests__/__snapshots__/schema.js.snap @@ -63,19 +63,19 @@ This option cannot be used with --range-start and --range-end.", "description": "Which end of line characters to apply.", "oneOf": Array [ Object { - "description": "Line Feed only (\\\\n), common on Linux and macOS as well as inside git repos", + "description": "Line Feed only (\\n), common on Linux and macOS as well as inside git repos", "enum": Array [ "lf", ], }, Object { - "description": "Carriage Return + Line Feed characters (\\\\r\\\\n), common on Windows", + "description": "Carriage Return + Line Feed characters (\\r\\n), common on Windows", "enum": Array [ "crlf", ], }, Object { - "description": "Carriage Return character only (\\\\r), used very rarely", + "description": "Carriage Return character only (\\r), used very rarely", "enum": Array [ "cr", ], diff --git a/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap b/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap index f27f5e90f..ddb528da5 100644 --- a/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap +++ b/tests/integration/__tests__/__snapshots__/stdin-filepath.js.snap @@ -6,14 +6,14 @@ exports[`apply editorconfig for stdin-filepath with a deep path (stderr) 2`] = ` exports[`apply editorconfig for stdin-filepath with a deep path (stdout) 1`] = ` "function f() { - console.log(\\"should be indented with a tab\\") + console.log("should be indented with a tab") } " `; exports[`apply editorconfig for stdin-filepath with a deep path (stdout) 2`] = ` "function f() { - console.log(\\"should be indented with a tab\\") + console.log("should be indented with a tab") } " `; @@ -26,7 +26,7 @@ exports[`apply editorconfig for stdin-filepath with nonexistent directory (stder exports[`apply editorconfig for stdin-filepath with nonexistent directory (stdout) 1`] = ` "function f() { - console.log(\\"should be indented with a tab\\") + console.log("should be indented with a tab") } " `; @@ -37,7 +37,7 @@ exports[`apply editorconfig for stdin-filepath with nonexistent file (stderr) 1` exports[`apply editorconfig for stdin-filepath with nonexistent file (stdout) 1`] = ` "function f() { - console.log(\\"should be indented with a tab\\") + console.log("should be indented with a tab") } " `; @@ -48,7 +48,7 @@ exports[`don’t apply editorconfig outside project for stdin-filepath with none exports[`don’t apply editorconfig outside project for stdin-filepath with nonexistent directory (stdout) 1`] = ` "function f() { - console.log(\\"should be indented with 2 spaces\\") + console.log("should be indented with 2 spaces") } " `; diff --git a/tests/integration/__tests__/__snapshots__/support-info.js.snap b/tests/integration/__tests__/__snapshots__/support-info.js.snap index dbf1347b3..934e89e62 100644 --- a/tests/integration/__tests__/__snapshots__/support-info.js.snap +++ b/tests/integration/__tests__/__snapshots__/support-info.js.snap @@ -283,861 +283,861 @@ exports[`CLI --support-info (stderr) 1`] = `""`; exports[`CLI --support-info (stdout) 1`] = ` "{ - \\"languages\\": [ + "languages": [ { - \\"aceMode\\": \\"javascript\\", - \\"aliases\\": [\\"js\\", \\"node\\"], - \\"codemirrorMimeType\\": \\"text/javascript\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"color\\": \\"#f1e05a\\", - \\"extensions\\": [ - \\".js\\", - \\"._js\\", - \\".bones\\", - \\".cjs\\", - \\".es\\", - \\".es6\\", - \\".frag\\", - \\".gs\\", - \\".jake\\", - \\".jsb\\", - \\".jscad\\", - \\".jsfl\\", - \\".jsm\\", - \\".jss\\", - \\".mjs\\", - \\".njs\\", - \\".pac\\", - \\".sjs\\", - \\".ssjs\\", - \\".xsjs\\", - \\".xsjslib\\", - \\".wxs\\" + "aceMode": "javascript", + "aliases": ["js", "node"], + "codemirrorMimeType": "text/javascript", + "codemirrorMode": "javascript", + "color": "#f1e05a", + "extensions": [ + ".js", + "._js", + ".bones", + ".cjs", + ".es", + ".es6", + ".frag", + ".gs", + ".jake", + ".jsb", + ".jscad", + ".jsfl", + ".jsm", + ".jss", + ".mjs", + ".njs", + ".pac", + ".sjs", + ".ssjs", + ".xsjs", + ".xsjslib", + ".wxs" ], - \\"filenames\\": [\\"Jakefile\\"], - \\"interpreters\\": [ - \\"chakra\\", - \\"d8\\", - \\"gjs\\", - \\"js\\", - \\"node\\", - \\"nodejs\\", - \\"qjs\\", - \\"rhino\\", - \\"v8\\", - \\"v8-shell\\", - \\"zx\\" + "filenames": ["Jakefile"], + "interpreters": [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell", + "zx" ], - \\"linguistLanguageId\\": 183, - \\"name\\": \\"JavaScript\\", - \\"parsers\\": [ - \\"babel\\", - \\"acorn\\", - \\"espree\\", - \\"meriyah\\", - \\"babel-flow\\", - \\"babel-ts\\", - \\"flow\\", - \\"typescript\\" + "linguistLanguageId": 183, + "name": "JavaScript", + "parsers": [ + "babel", + "acorn", + "espree", + "meriyah", + "babel-flow", + "babel-ts", + "flow", + "typescript" ], - \\"since\\": \\"0.0.0\\", - \\"tmScope\\": \\"source.js\\", - \\"type\\": \\"programming\\", - \\"vscodeLanguageIds\\": [\\"javascript\\", \\"mongo\\"] + "since": "0.0.0", + "tmScope": "source.js", + "type": "programming", + "vscodeLanguageIds": ["javascript", "mongo"] }, { - \\"aceMode\\": \\"javascript\\", - \\"aliases\\": [], - \\"codemirrorMimeType\\": \\"text/javascript\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"color\\": \\"#f1e05a\\", - \\"extensions\\": [\\".js.flow\\"], - \\"filenames\\": [], - \\"interpreters\\": [ - \\"chakra\\", - \\"d8\\", - \\"gjs\\", - \\"js\\", - \\"node\\", - \\"nodejs\\", - \\"qjs\\", - \\"rhino\\", - \\"v8\\", - \\"v8-shell\\" + "aceMode": "javascript", + "aliases": [], + "codemirrorMimeType": "text/javascript", + "codemirrorMode": "javascript", + "color": "#f1e05a", + "extensions": [".js.flow"], + "filenames": [], + "interpreters": [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell" ], - \\"linguistLanguageId\\": 183, - \\"name\\": \\"Flow\\", - \\"parsers\\": [\\"flow\\", \\"babel-flow\\"], - \\"since\\": \\"0.0.0\\", - \\"tmScope\\": \\"source.js\\", - \\"type\\": \\"programming\\", - \\"vscodeLanguageIds\\": [\\"javascript\\"] + "linguistLanguageId": 183, + "name": "Flow", + "parsers": ["flow", "babel-flow"], + "since": "0.0.0", + "tmScope": "source.js", + "type": "programming", + "vscodeLanguageIds": ["javascript"] }, { - \\"aceMode\\": \\"javascript\\", - \\"codemirrorMimeType\\": \\"text/jsx\\", - \\"codemirrorMode\\": \\"jsx\\", - \\"extensions\\": [\\".jsx\\"], - \\"group\\": \\"JavaScript\\", - \\"linguistLanguageId\\": 183, - \\"name\\": \\"JSX\\", - \\"parsers\\": [ - \\"babel\\", - \\"babel-flow\\", - \\"babel-ts\\", - \\"flow\\", - \\"typescript\\", - \\"espree\\", - \\"meriyah\\" + "aceMode": "javascript", + "codemirrorMimeType": "text/jsx", + "codemirrorMode": "jsx", + "extensions": [".jsx"], + "group": "JavaScript", + "linguistLanguageId": 183, + "name": "JSX", + "parsers": [ + "babel", + "babel-flow", + "babel-ts", + "flow", + "typescript", + "espree", + "meriyah" ], - \\"since\\": \\"0.0.0\\", - \\"tmScope\\": \\"source.js.jsx\\", - \\"type\\": \\"programming\\", - \\"vscodeLanguageIds\\": [\\"javascriptreact\\"] + "since": "0.0.0", + "tmScope": "source.js.jsx", + "type": "programming", + "vscodeLanguageIds": ["javascriptreact"] }, { - \\"aceMode\\": \\"typescript\\", - \\"aliases\\": [\\"ts\\"], - \\"codemirrorMimeType\\": \\"application/typescript\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"color\\": \\"#2b7489\\", - \\"extensions\\": [\\".ts\\", \\".mts\\", \\".cts\\"], - \\"interpreters\\": [\\"deno\\", \\"ts-node\\"], - \\"linguistLanguageId\\": 378, - \\"name\\": \\"TypeScript\\", - \\"parsers\\": [\\"typescript\\", \\"babel-ts\\"], - \\"since\\": \\"1.4.0\\", - \\"tmScope\\": \\"source.ts\\", - \\"type\\": \\"programming\\", - \\"vscodeLanguageIds\\": [\\"typescript\\"] + "aceMode": "typescript", + "aliases": ["ts"], + "codemirrorMimeType": "application/typescript", + "codemirrorMode": "javascript", + "color": "#2b7489", + "extensions": [".ts", ".mts", ".cts"], + "interpreters": ["deno", "ts-node"], + "linguistLanguageId": 378, + "name": "TypeScript", + "parsers": ["typescript", "babel-ts"], + "since": "1.4.0", + "tmScope": "source.ts", + "type": "programming", + "vscodeLanguageIds": ["typescript"] }, { - \\"aceMode\\": \\"javascript\\", - \\"codemirrorMimeType\\": \\"text/jsx\\", - \\"codemirrorMode\\": \\"jsx\\", - \\"extensions\\": [\\".tsx\\"], - \\"group\\": \\"TypeScript\\", - \\"linguistLanguageId\\": 94901924, - \\"name\\": \\"TSX\\", - \\"parsers\\": [\\"typescript\\", \\"babel-ts\\"], - \\"since\\": \\"1.4.0\\", - \\"tmScope\\": \\"source.tsx\\", - \\"type\\": \\"programming\\", - \\"vscodeLanguageIds\\": [\\"typescriptreact\\"] + "aceMode": "javascript", + "codemirrorMimeType": "text/jsx", + "codemirrorMode": "jsx", + "extensions": [".tsx"], + "group": "TypeScript", + "linguistLanguageId": 94901924, + "name": "TSX", + "parsers": ["typescript", "babel-ts"], + "since": "1.4.0", + "tmScope": "source.tsx", + "type": "programming", + "vscodeLanguageIds": ["typescriptreact"] }, { - \\"aceMode\\": \\"json\\", - \\"codemirrorMimeType\\": \\"application/json\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"extensions\\": [\\".importmap\\"], - \\"filenames\\": [\\"package.json\\", \\"package-lock.json\\", \\"composer.json\\"], - \\"linguistLanguageId\\": 174, - \\"name\\": \\"JSON.stringify\\", - \\"parsers\\": [\\"json-stringify\\"], - \\"since\\": \\"1.13.0\\", - \\"tmScope\\": \\"source.json\\", - \\"type\\": \\"data\\", - \\"vscodeLanguageIds\\": [\\"json\\"] + "aceMode": "json", + "codemirrorMimeType": "application/json", + "codemirrorMode": "javascript", + "extensions": [".importmap"], + "filenames": ["package.json", "package-lock.json", "composer.json"], + "linguistLanguageId": 174, + "name": "JSON.stringify", + "parsers": ["json-stringify"], + "since": "1.13.0", + "tmScope": "source.json", + "type": "data", + "vscodeLanguageIds": ["json"] }, { - \\"aceMode\\": \\"json\\", - \\"codemirrorMimeType\\": \\"application/json\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"extensions\\": [ - \\".json\\", - \\".avsc\\", - \\".geojson\\", - \\".gltf\\", - \\".har\\", - \\".ice\\", - \\".JSON-tmLanguage\\", - \\".mcmeta\\", - \\".tfstate\\", - \\".tfstate.backup\\", - \\".topojson\\", - \\".webapp\\", - \\".webmanifest\\", - \\".yy\\", - \\".yyp\\" + "aceMode": "json", + "codemirrorMimeType": "application/json", + "codemirrorMode": "javascript", + "extensions": [ + ".json", + ".avsc", + ".geojson", + ".gltf", + ".har", + ".ice", + ".JSON-tmLanguage", + ".mcmeta", + ".tfstate", + ".tfstate.backup", + ".topojson", + ".webapp", + ".webmanifest", + ".yy", + ".yyp" ], - \\"filenames\\": [ - \\".arcconfig\\", - \\".htmlhintrc\\", - \\".imgbotconfig\\", - \\".tern-config\\", - \\".tern-project\\", - \\".watchmanconfig\\", - \\"Pipfile.lock\\", - \\"composer.lock\\", - \\"mcmod.info\\" + "filenames": [ + ".arcconfig", + ".htmlhintrc", + ".imgbotconfig", + ".tern-config", + ".tern-project", + ".watchmanconfig", + "Pipfile.lock", + "composer.lock", + "mcmod.info" ], - \\"linguistLanguageId\\": 174, - \\"name\\": \\"JSON\\", - \\"parsers\\": [\\"json\\"], - \\"since\\": \\"1.5.0\\", - \\"tmScope\\": \\"source.json\\", - \\"type\\": \\"data\\", - \\"vscodeLanguageIds\\": [\\"json\\"] + "linguistLanguageId": 174, + "name": "JSON", + "parsers": ["json"], + "since": "1.5.0", + "tmScope": "source.json", + "type": "data", + "vscodeLanguageIds": ["json"] }, { - \\"aceMode\\": \\"javascript\\", - \\"aliases\\": [\\"jsonc\\"], - \\"codemirrorMimeType\\": \\"text/javascript\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"extensions\\": [ - \\".jsonc\\", - \\".sublime-build\\", - \\".sublime-commands\\", - \\".sublime-completions\\", - \\".sublime-keymap\\", - \\".sublime-macro\\", - \\".sublime-menu\\", - \\".sublime-mousemap\\", - \\".sublime-project\\", - \\".sublime-settings\\", - \\".sublime-theme\\", - \\".sublime-workspace\\", - \\".sublime_metrics\\", - \\".sublime_session\\" + "aceMode": "javascript", + "aliases": ["jsonc"], + "codemirrorMimeType": "text/javascript", + "codemirrorMode": "javascript", + "extensions": [ + ".jsonc", + ".sublime-build", + ".sublime-commands", + ".sublime-completions", + ".sublime-keymap", + ".sublime-macro", + ".sublime-menu", + ".sublime-mousemap", + ".sublime-project", + ".sublime-settings", + ".sublime-theme", + ".sublime-workspace", + ".sublime_metrics", + ".sublime_session" ], - \\"filenames\\": [ - \\".babelrc\\", - \\".eslintrc.json\\", - \\".jscsrc\\", - \\".jshintrc\\", - \\".jslintrc\\", - \\"api-extractor.json\\", - \\"devcontainer.json\\", - \\"jsconfig.json\\", - \\"language-configuration.json\\", - \\"tsconfig.json\\", - \\"tslint.json\\", - \\".eslintrc\\", - \\".swcrc\\" + "filenames": [ + ".babelrc", + ".eslintrc.json", + ".jscsrc", + ".jshintrc", + ".jslintrc", + "api-extractor.json", + "devcontainer.json", + "jsconfig.json", + "language-configuration.json", + "tsconfig.json", + "tslint.json", + ".eslintrc", + ".swcrc" ], - \\"group\\": \\"JSON\\", - \\"linguistLanguageId\\": 423, - \\"name\\": \\"JSON with Comments\\", - \\"parsers\\": [\\"json\\"], - \\"since\\": \\"1.5.0\\", - \\"tmScope\\": \\"source.js\\", - \\"type\\": \\"data\\", - \\"vscodeLanguageIds\\": [\\"jsonc\\"] + "group": "JSON", + "linguistLanguageId": 423, + "name": "JSON with Comments", + "parsers": ["json"], + "since": "1.5.0", + "tmScope": "source.js", + "type": "data", + "vscodeLanguageIds": ["jsonc"] }, { - \\"aceMode\\": \\"javascript\\", - \\"codemirrorMimeType\\": \\"application/json\\", - \\"codemirrorMode\\": \\"javascript\\", - \\"extensions\\": [\\".json5\\"], - \\"linguistLanguageId\\": 175, - \\"name\\": \\"JSON5\\", - \\"parsers\\": [\\"json5\\"], - \\"since\\": \\"1.13.0\\", - \\"tmScope\\": \\"source.js\\", - \\"type\\": \\"data\\", - \\"vscodeLanguageIds\\": [\\"json5\\"] + "aceMode": "javascript", + "codemirrorMimeType": "application/json", + "codemirrorMode": "javascript", + "extensions": [".json5"], + "linguistLanguageId": 175, + "name": "JSON5", + "parsers": ["json5"], + "since": "1.13.0", + "tmScope": "source.js", + "type": "data", + "vscodeLanguageIds": ["json5"] }, { - \\"aceMode\\": \\"css\\", - \\"codemirrorMimeType\\": \\"text/css\\", - \\"codemirrorMode\\": \\"css\\", - \\"color\\": \\"#563d7c\\", - \\"extensions\\": [\\".css\\", \\".wxss\\"], - \\"linguistLanguageId\\": 50, - \\"name\\": \\"CSS\\", - \\"parsers\\": [\\"css\\"], - \\"since\\": \\"1.4.0\\", - \\"tmScope\\": \\"source.css\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"css\\"] + "aceMode": "css", + "codemirrorMimeType": "text/css", + "codemirrorMode": "css", + "color": "#563d7c", + "extensions": [".css", ".wxss"], + "linguistLanguageId": 50, + "name": "CSS", + "parsers": ["css"], + "since": "1.4.0", + "tmScope": "source.css", + "type": "markup", + "vscodeLanguageIds": ["css"] }, { - \\"aceMode\\": \\"text\\", - \\"extensions\\": [\\".pcss\\", \\".postcss\\"], - \\"group\\": \\"CSS\\", - \\"linguistLanguageId\\": 262764437, - \\"name\\": \\"PostCSS\\", - \\"parsers\\": [\\"css\\"], - \\"since\\": \\"1.4.0\\", - \\"tmScope\\": \\"source.postcss\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"postcss\\"] + "aceMode": "text", + "extensions": [".pcss", ".postcss"], + "group": "CSS", + "linguistLanguageId": 262764437, + "name": "PostCSS", + "parsers": ["css"], + "since": "1.4.0", + "tmScope": "source.postcss", + "type": "markup", + "vscodeLanguageIds": ["postcss"] }, { - \\"aceMode\\": \\"less\\", - \\"codemirrorMimeType\\": \\"text/css\\", - \\"codemirrorMode\\": \\"css\\", - \\"color\\": \\"#1d365d\\", - \\"extensions\\": [\\".less\\"], - \\"linguistLanguageId\\": 198, - \\"name\\": \\"Less\\", - \\"parsers\\": [\\"less\\"], - \\"since\\": \\"1.4.0\\", - \\"tmScope\\": \\"source.css.less\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"less\\"] + "aceMode": "less", + "codemirrorMimeType": "text/css", + "codemirrorMode": "css", + "color": "#1d365d", + "extensions": [".less"], + "linguistLanguageId": 198, + "name": "Less", + "parsers": ["less"], + "since": "1.4.0", + "tmScope": "source.css.less", + "type": "markup", + "vscodeLanguageIds": ["less"] }, { - \\"aceMode\\": \\"scss\\", - \\"codemirrorMimeType\\": \\"text/x-scss\\", - \\"codemirrorMode\\": \\"css\\", - \\"color\\": \\"#c6538c\\", - \\"extensions\\": [\\".scss\\"], - \\"linguistLanguageId\\": 329, - \\"name\\": \\"SCSS\\", - \\"parsers\\": [\\"scss\\"], - \\"since\\": \\"1.4.0\\", - \\"tmScope\\": \\"source.css.scss\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"scss\\"] + "aceMode": "scss", + "codemirrorMimeType": "text/x-scss", + "codemirrorMode": "css", + "color": "#c6538c", + "extensions": [".scss"], + "linguistLanguageId": 329, + "name": "SCSS", + "parsers": ["scss"], + "since": "1.4.0", + "tmScope": "source.css.scss", + "type": "markup", + "vscodeLanguageIds": ["scss"] }, { - \\"aceMode\\": \\"handlebars\\", - \\"aliases\\": [\\"hbs\\", \\"htmlbars\\"], - \\"color\\": \\"#f7931e\\", - \\"extensions\\": [\\".handlebars\\", \\".hbs\\"], - \\"linguistLanguageId\\": 155, - \\"name\\": \\"Handlebars\\", - \\"parsers\\": [\\"glimmer\\"], - \\"since\\": \\"2.3.0\\", - \\"tmScope\\": \\"text.html.handlebars\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"handlebars\\"] + "aceMode": "handlebars", + "aliases": ["hbs", "htmlbars"], + "color": "#f7931e", + "extensions": [".handlebars", ".hbs"], + "linguistLanguageId": 155, + "name": "Handlebars", + "parsers": ["glimmer"], + "since": "2.3.0", + "tmScope": "text.html.handlebars", + "type": "markup", + "vscodeLanguageIds": ["handlebars"] }, { - \\"aceMode\\": \\"text\\", - \\"color\\": \\"#e10098\\", - \\"extensions\\": [\\".graphql\\", \\".gql\\", \\".graphqls\\"], - \\"linguistLanguageId\\": 139, - \\"name\\": \\"GraphQL\\", - \\"parsers\\": [\\"graphql\\"], - \\"since\\": \\"1.5.0\\", - \\"tmScope\\": \\"source.graphql\\", - \\"type\\": \\"data\\", - \\"vscodeLanguageIds\\": [\\"graphql\\"] + "aceMode": "text", + "color": "#e10098", + "extensions": [".graphql", ".gql", ".graphqls"], + "linguistLanguageId": 139, + "name": "GraphQL", + "parsers": ["graphql"], + "since": "1.5.0", + "tmScope": "source.graphql", + "type": "data", + "vscodeLanguageIds": ["graphql"] }, { - \\"aceMode\\": \\"markdown\\", - \\"aliases\\": [\\"pandoc\\"], - \\"codemirrorMimeType\\": \\"text/x-gfm\\", - \\"codemirrorMode\\": \\"gfm\\", - \\"color\\": \\"#083fa1\\", - \\"extensions\\": [ - \\".md\\", - \\".markdown\\", - \\".mdown\\", - \\".mdwn\\", - \\".mkd\\", - \\".mkdn\\", - \\".mkdown\\", - \\".ronn\\", - \\".scd\\", - \\".workbook\\" + "aceMode": "markdown", + "aliases": ["pandoc"], + "codemirrorMimeType": "text/x-gfm", + "codemirrorMode": "gfm", + "color": "#083fa1", + "extensions": [ + ".md", + ".markdown", + ".mdown", + ".mdwn", + ".mkd", + ".mkdn", + ".mkdown", + ".ronn", + ".scd", + ".workbook" ], - \\"filenames\\": [\\"contents.lr\\", \\"README\\"], - \\"linguistLanguageId\\": 222, - \\"name\\": \\"Markdown\\", - \\"parsers\\": [\\"markdown\\"], - \\"since\\": \\"1.8.0\\", - \\"tmScope\\": \\"source.gfm\\", - \\"type\\": \\"prose\\", - \\"vscodeLanguageIds\\": [\\"markdown\\"], - \\"wrap\\": true + "filenames": ["contents.lr", "README"], + "linguistLanguageId": 222, + "name": "Markdown", + "parsers": ["markdown"], + "since": "1.8.0", + "tmScope": "source.gfm", + "type": "prose", + "vscodeLanguageIds": ["markdown"], + "wrap": true }, { - \\"aceMode\\": \\"markdown\\", - \\"aliases\\": [\\"pandoc\\"], - \\"codemirrorMimeType\\": \\"text/x-gfm\\", - \\"codemirrorMode\\": \\"gfm\\", - \\"color\\": \\"#083fa1\\", - \\"extensions\\": [\\".mdx\\"], - \\"filenames\\": [], - \\"linguistLanguageId\\": 222, - \\"name\\": \\"MDX\\", - \\"parsers\\": [\\"mdx\\"], - \\"since\\": \\"1.15.0\\", - \\"tmScope\\": \\"source.gfm\\", - \\"type\\": \\"prose\\", - \\"vscodeLanguageIds\\": [\\"mdx\\"], - \\"wrap\\": true + "aceMode": "markdown", + "aliases": ["pandoc"], + "codemirrorMimeType": "text/x-gfm", + "codemirrorMode": "gfm", + "color": "#083fa1", + "extensions": [".mdx"], + "filenames": [], + "linguistLanguageId": 222, + "name": "MDX", + "parsers": ["mdx"], + "since": "1.15.0", + "tmScope": "source.gfm", + "type": "prose", + "vscodeLanguageIds": ["mdx"], + "wrap": true }, { - \\"aceMode\\": \\"html\\", - \\"aliases\\": [\\"xhtml\\"], - \\"codemirrorMimeType\\": \\"text/html\\", - \\"codemirrorMode\\": \\"htmlmixed\\", - \\"color\\": \\"#e34c26\\", - \\"extensions\\": [\\".component.html\\"], - \\"filenames\\": [], - \\"linguistLanguageId\\": 146, - \\"name\\": \\"Angular\\", - \\"parsers\\": [\\"angular\\"], - \\"since\\": \\"1.15.0\\", - \\"tmScope\\": \\"text.html.basic\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"html\\"] + "aceMode": "html", + "aliases": ["xhtml"], + "codemirrorMimeType": "text/html", + "codemirrorMode": "htmlmixed", + "color": "#e34c26", + "extensions": [".component.html"], + "filenames": [], + "linguistLanguageId": 146, + "name": "Angular", + "parsers": ["angular"], + "since": "1.15.0", + "tmScope": "text.html.basic", + "type": "markup", + "vscodeLanguageIds": ["html"] }, { - \\"aceMode\\": \\"html\\", - \\"aliases\\": [\\"xhtml\\"], - \\"codemirrorMimeType\\": \\"text/html\\", - \\"codemirrorMode\\": \\"htmlmixed\\", - \\"color\\": \\"#e34c26\\", - \\"extensions\\": [ - \\".html\\", - \\".htm\\", - \\".html.hl\\", - \\".inc\\", - \\".xht\\", - \\".xhtml\\", - \\".mjml\\" + "aceMode": "html", + "aliases": ["xhtml"], + "codemirrorMimeType": "text/html", + "codemirrorMode": "htmlmixed", + "color": "#e34c26", + "extensions": [ + ".html", + ".htm", + ".html.hl", + ".inc", + ".xht", + ".xhtml", + ".mjml" ], - \\"linguistLanguageId\\": 146, - \\"name\\": \\"HTML\\", - \\"parsers\\": [\\"html\\"], - \\"since\\": \\"1.15.0\\", - \\"tmScope\\": \\"text.html.basic\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"html\\"] + "linguistLanguageId": 146, + "name": "HTML", + "parsers": ["html"], + "since": "1.15.0", + "tmScope": "text.html.basic", + "type": "markup", + "vscodeLanguageIds": ["html"] }, { - \\"aceMode\\": \\"html\\", - \\"aliases\\": [\\"xhtml\\"], - \\"codemirrorMimeType\\": \\"text/html\\", - \\"codemirrorMode\\": \\"htmlmixed\\", - \\"color\\": \\"#e34c26\\", - \\"extensions\\": [], - \\"filenames\\": [], - \\"linguistLanguageId\\": 146, - \\"name\\": \\"Lightning Web Components\\", - \\"parsers\\": [\\"lwc\\"], - \\"since\\": \\"1.17.0\\", - \\"tmScope\\": \\"text.html.basic\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"html\\"] + "aceMode": "html", + "aliases": ["xhtml"], + "codemirrorMimeType": "text/html", + "codemirrorMode": "htmlmixed", + "color": "#e34c26", + "extensions": [], + "filenames": [], + "linguistLanguageId": 146, + "name": "Lightning Web Components", + "parsers": ["lwc"], + "since": "1.17.0", + "tmScope": "text.html.basic", + "type": "markup", + "vscodeLanguageIds": ["html"] }, { - \\"aceMode\\": \\"html\\", - \\"color\\": \\"#41b883\\", - \\"extensions\\": [\\".vue\\"], - \\"linguistLanguageId\\": 391, - \\"name\\": \\"Vue\\", - \\"parsers\\": [\\"vue\\"], - \\"since\\": \\"1.10.0\\", - \\"tmScope\\": \\"text.html.vue\\", - \\"type\\": \\"markup\\", - \\"vscodeLanguageIds\\": [\\"vue\\"] + "aceMode": "html", + "color": "#41b883", + "extensions": [".vue"], + "linguistLanguageId": 391, + "name": "Vue", + "parsers": ["vue"], + "since": "1.10.0", + "tmScope": "text.html.vue", + "type": "markup", + "vscodeLanguageIds": ["vue"] }, { - \\"aceMode\\": \\"yaml\\", - \\"aliases\\": [\\"yml\\"], - \\"codemirrorMimeType\\": \\"text/x-yaml\\", - \\"codemirrorMode\\": \\"yaml\\", - \\"color\\": \\"#cb171e\\", - \\"extensions\\": [ - \\".yml\\", - \\".mir\\", - \\".reek\\", - \\".rviz\\", - \\".sublime-syntax\\", - \\".syntax\\", - \\".yaml\\", - \\".yaml-tmlanguage\\", - \\".yaml.sed\\", - \\".yml.mysql\\" + "aceMode": "yaml", + "aliases": ["yml"], + "codemirrorMimeType": "text/x-yaml", + "codemirrorMode": "yaml", + "color": "#cb171e", + "extensions": [ + ".yml", + ".mir", + ".reek", + ".rviz", + ".sublime-syntax", + ".syntax", + ".yaml", + ".yaml-tmlanguage", + ".yaml.sed", + ".yml.mysql" ], - \\"filenames\\": [ - \\".clang-format\\", - \\".clang-tidy\\", - \\".gemrc\\", - \\"glide.lock\\", - \\".prettierrc\\", - \\".stylelintrc\\" + "filenames": [ + ".clang-format", + ".clang-tidy", + ".gemrc", + "glide.lock", + ".prettierrc", + ".stylelintrc" ], - \\"linguistLanguageId\\": 407, - \\"name\\": \\"YAML\\", - \\"parsers\\": [\\"yaml\\"], - \\"since\\": \\"1.14.0\\", - \\"tmScope\\": \\"source.yaml\\", - \\"type\\": \\"data\\", - \\"vscodeLanguageIds\\": [\\"yaml\\", \\"ansible\\", \\"home-assistant\\"] + "linguistLanguageId": 407, + "name": "YAML", + "parsers": ["yaml"], + "since": "1.14.0", + "tmScope": "source.yaml", + "type": "data", + "vscodeLanguageIds": ["yaml", "ansible", "home-assistant"] } ], - \\"options\\": [ + "options": [ { - \\"category\\": \\"JavaScript\\", - \\"choices\\": [ + "category": "JavaScript", + "choices": [ { - \\"description\\": \\"Always include parens. Example: \`(x) => x\`\\", - \\"value\\": \\"always\\" + "description": "Always include parens. Example: \`(x) => x\`", + "value": "always" }, { - \\"description\\": \\"Omit parens when possible. Example: \`x => x\`\\", - \\"value\\": \\"avoid\\" + "description": "Omit parens when possible. Example: \`x => x\`", + "value": "avoid" } ], - \\"default\\": \\"always\\", - \\"description\\": \\"Include parentheses around a sole arrow function parameter.\\", - \\"name\\": \\"arrowParens\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.9.0\\", - \\"type\\": \\"choice\\" + "default": "always", + "description": "Include parentheses around a sole arrow function parameter.", + "name": "arrowParens", + "pluginDefaults": {}, + "since": "1.9.0", + "type": "choice" }, { - \\"category\\": \\"Common\\", - \\"default\\": false, - \\"description\\": \\"Put > of opening tags on the last line instead of on a new line.\\", - \\"name\\": \\"bracketSameLine\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"2.4.0\\", - \\"type\\": \\"boolean\\" + "category": "Common", + "default": false, + "description": "Put > of opening tags on the last line instead of on a new line.", + "name": "bracketSameLine", + "pluginDefaults": {}, + "since": "2.4.0", + "type": "boolean" }, { - \\"category\\": \\"Common\\", - \\"default\\": true, - \\"description\\": \\"Print spaces between brackets.\\", - \\"name\\": \\"bracketSpacing\\", - \\"oppositeDescription\\": \\"Do not print spaces between brackets.\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"0.0.0\\", - \\"type\\": \\"boolean\\" + "category": "Common", + "default": true, + "description": "Print spaces between brackets.", + "name": "bracketSpacing", + "oppositeDescription": "Do not print spaces between brackets.", + "pluginDefaults": {}, + "since": "0.0.0", + "type": "boolean" }, { - \\"category\\": \\"Special\\", - \\"default\\": -1, - \\"description\\": \\"Print (to stderr) where a cursor at the given position would move to after formatting.\\\\nThis option cannot be used with --range-start and --range-end.\\", - \\"name\\": \\"cursorOffset\\", - \\"pluginDefaults\\": {}, - \\"range\\": { \\"end\\": null, \\"start\\": -1, \\"step\\": 1 }, - \\"since\\": \\"1.4.0\\", - \\"type\\": \\"int\\" + "category": "Special", + "default": -1, + "description": "Print (to stderr) where a cursor at the given position would move to after formatting.\\nThis option cannot be used with --range-start and --range-end.", + "name": "cursorOffset", + "pluginDefaults": {}, + "range": { "end": null, "start": -1, "step": 1 }, + "since": "1.4.0", + "type": "int" }, { - \\"category\\": \\"Global\\", - \\"choices\\": [ + "category": "Global", + "choices": [ { - \\"description\\": \\"Format embedded code if Prettier can automatically identify it.\\", - \\"value\\": \\"auto\\" + "description": "Format embedded code if Prettier can automatically identify it.", + "value": "auto" }, { - \\"description\\": \\"Never automatically format embedded code.\\", - \\"value\\": \\"off\\" + "description": "Never automatically format embedded code.", + "value": "off" } ], - \\"default\\": \\"auto\\", - \\"description\\": \\"Control how Prettier formats quoted code embedded in the file.\\", - \\"name\\": \\"embeddedLanguageFormatting\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"2.1.0\\", - \\"type\\": \\"choice\\" + "default": "auto", + "description": "Control how Prettier formats quoted code embedded in the file.", + "name": "embeddedLanguageFormatting", + "pluginDefaults": {}, + "since": "2.1.0", + "type": "choice" }, { - \\"category\\": \\"Global\\", - \\"choices\\": [ + "category": "Global", + "choices": [ { - \\"description\\": \\"Line Feed only (\\\\\\\\n), common on Linux and macOS as well as inside git repos\\", - \\"value\\": \\"lf\\" + "description": "Line Feed only (\\\\n), common on Linux and macOS as well as inside git repos", + "value": "lf" }, { - \\"description\\": \\"Carriage Return + Line Feed characters (\\\\\\\\r\\\\\\\\n), common on Windows\\", - \\"value\\": \\"crlf\\" + "description": "Carriage Return + Line Feed characters (\\\\r\\\\n), common on Windows", + "value": "crlf" }, { - \\"description\\": \\"Carriage Return character only (\\\\\\\\r), used very rarely\\", - \\"value\\": \\"cr\\" + "description": "Carriage Return character only (\\\\r), used very rarely", + "value": "cr" }, { - \\"description\\": \\"Maintain existing\\\\n(mixed values within one file are normalised by looking at what's used after the first line)\\", - \\"value\\": \\"auto\\" + "description": "Maintain existing\\n(mixed values within one file are normalised by looking at what's used after the first line)", + "value": "auto" } ], - \\"default\\": \\"lf\\", - \\"description\\": \\"Which end of line characters to apply.\\", - \\"name\\": \\"endOfLine\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.15.0\\", - \\"type\\": \\"choice\\" + "default": "lf", + "description": "Which end of line characters to apply.", + "name": "endOfLine", + "pluginDefaults": {}, + "since": "1.15.0", + "type": "choice" }, { - \\"category\\": \\"Special\\", - \\"description\\": \\"Specify the input filepath. This will be used to do parser inference.\\", - \\"name\\": \\"filepath\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.4.0\\", - \\"type\\": \\"path\\" + "category": "Special", + "description": "Specify the input filepath. This will be used to do parser inference.", + "name": "filepath", + "pluginDefaults": {}, + "since": "1.4.0", + "type": "path" }, { - \\"category\\": \\"HTML\\", - \\"choices\\": [ + "category": "HTML", + "choices": [ { - \\"description\\": \\"Respect the default value of CSS display property.\\", - \\"value\\": \\"css\\" + "description": "Respect the default value of CSS display property.", + "value": "css" }, { - \\"description\\": \\"Whitespaces are considered sensitive.\\", - \\"value\\": \\"strict\\" + "description": "Whitespaces are considered sensitive.", + "value": "strict" }, { - \\"description\\": \\"Whitespaces are considered insensitive.\\", - \\"value\\": \\"ignore\\" + "description": "Whitespaces are considered insensitive.", + "value": "ignore" } ], - \\"default\\": \\"css\\", - \\"description\\": \\"How to handle whitespaces in HTML.\\", - \\"name\\": \\"htmlWhitespaceSensitivity\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.15.0\\", - \\"type\\": \\"choice\\" + "default": "css", + "description": "How to handle whitespaces in HTML.", + "name": "htmlWhitespaceSensitivity", + "pluginDefaults": {}, + "since": "1.15.0", + "type": "choice" }, { - \\"category\\": \\"Special\\", - \\"default\\": false, - \\"description\\": \\"Insert @format pragma into file's first docblock comment.\\", - \\"name\\": \\"insertPragma\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.8.0\\", - \\"type\\": \\"boolean\\" + "category": "Special", + "default": false, + "description": "Insert @format pragma into file's first docblock comment.", + "name": "insertPragma", + "pluginDefaults": {}, + "since": "1.8.0", + "type": "boolean" }, { - \\"category\\": \\"JavaScript\\", - \\"default\\": false, - \\"description\\": \\"Use single quotes in JSX.\\", - \\"name\\": \\"jsxSingleQuote\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.15.0\\", - \\"type\\": \\"boolean\\" + "category": "JavaScript", + "default": false, + "description": "Use single quotes in JSX.", + "name": "jsxSingleQuote", + "pluginDefaults": {}, + "since": "1.15.0", + "type": "boolean" }, { - \\"category\\": \\"Global\\", - \\"choices\\": [ - { \\"description\\": \\"Flow\\", \\"value\\": \\"flow\\" }, - { \\"description\\": \\"JavaScript\\", \\"since\\": \\"1.16.0\\", \\"value\\": \\"babel\\" }, - { \\"description\\": \\"Flow\\", \\"since\\": \\"1.16.0\\", \\"value\\": \\"babel-flow\\" }, - { \\"description\\": \\"TypeScript\\", \\"since\\": \\"2.0.0\\", \\"value\\": \\"babel-ts\\" }, + "category": "Global", + "choices": [ + { "description": "Flow", "value": "flow" }, + { "description": "JavaScript", "since": "1.16.0", "value": "babel" }, + { "description": "Flow", "since": "1.16.0", "value": "babel-flow" }, + { "description": "TypeScript", "since": "2.0.0", "value": "babel-ts" }, { - \\"description\\": \\"TypeScript\\", - \\"since\\": \\"1.4.0\\", - \\"value\\": \\"typescript\\" + "description": "TypeScript", + "since": "1.4.0", + "value": "typescript" }, - { \\"description\\": \\"JavaScript\\", \\"since\\": \\"2.6.0\\", \\"value\\": \\"acorn\\" }, - { \\"description\\": \\"JavaScript\\", \\"since\\": \\"2.2.0\\", \\"value\\": \\"espree\\" }, - { \\"description\\": \\"JavaScript\\", \\"since\\": \\"2.2.0\\", \\"value\\": \\"meriyah\\" }, - { \\"description\\": \\"CSS\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"css\\" }, - { \\"description\\": \\"Less\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"less\\" }, - { \\"description\\": \\"SCSS\\", \\"since\\": \\"1.7.1\\", \\"value\\": \\"scss\\" }, - { \\"description\\": \\"JSON\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"json\\" }, - { \\"description\\": \\"JSON5\\", \\"since\\": \\"1.13.0\\", \\"value\\": \\"json5\\" }, + { "description": "JavaScript", "since": "2.6.0", "value": "acorn" }, + { "description": "JavaScript", "since": "2.2.0", "value": "espree" }, + { "description": "JavaScript", "since": "2.2.0", "value": "meriyah" }, + { "description": "CSS", "since": "1.7.1", "value": "css" }, + { "description": "Less", "since": "1.7.1", "value": "less" }, + { "description": "SCSS", "since": "1.7.1", "value": "scss" }, + { "description": "JSON", "since": "1.5.0", "value": "json" }, + { "description": "JSON5", "since": "1.13.0", "value": "json5" }, { - \\"description\\": \\"JSON.stringify\\", - \\"since\\": \\"1.13.0\\", - \\"value\\": \\"json-stringify\\" + "description": "JSON.stringify", + "since": "1.13.0", + "value": "json-stringify" }, - { \\"description\\": \\"GraphQL\\", \\"since\\": \\"1.5.0\\", \\"value\\": \\"graphql\\" }, - { \\"description\\": \\"Markdown\\", \\"since\\": \\"1.8.0\\", \\"value\\": \\"markdown\\" }, - { \\"description\\": \\"MDX\\", \\"since\\": \\"1.15.0\\", \\"value\\": \\"mdx\\" }, - { \\"description\\": \\"Vue\\", \\"since\\": \\"1.10.0\\", \\"value\\": \\"vue\\" }, - { \\"description\\": \\"YAML\\", \\"since\\": \\"1.14.0\\", \\"value\\": \\"yaml\\" }, + { "description": "GraphQL", "since": "1.5.0", "value": "graphql" }, + { "description": "Markdown", "since": "1.8.0", "value": "markdown" }, + { "description": "MDX", "since": "1.15.0", "value": "mdx" }, + { "description": "Vue", "since": "1.10.0", "value": "vue" }, + { "description": "YAML", "since": "1.14.0", "value": "yaml" }, { - \\"description\\": \\"Ember / Handlebars\\", - \\"since\\": \\"2.3.0\\", - \\"value\\": \\"glimmer\\" + "description": "Ember / Handlebars", + "since": "2.3.0", + "value": "glimmer" }, - { \\"description\\": \\"HTML\\", \\"since\\": \\"1.15.0\\", \\"value\\": \\"html\\" }, - { \\"description\\": \\"Angular\\", \\"since\\": \\"1.15.0\\", \\"value\\": \\"angular\\" }, + { "description": "HTML", "since": "1.15.0", "value": "html" }, + { "description": "Angular", "since": "1.15.0", "value": "angular" }, { - \\"description\\": \\"Lightning Web Components\\", - \\"since\\": \\"1.17.0\\", - \\"value\\": \\"lwc\\" + "description": "Lightning Web Components", + "since": "1.17.0", + "value": "lwc" } ], - \\"description\\": \\"Which parser to use.\\", - \\"name\\": \\"parser\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"0.0.10\\", - \\"type\\": \\"choice\\" + "description": "Which parser to use.", + "name": "parser", + "pluginDefaults": {}, + "since": "0.0.10", + "type": "choice" }, { - \\"array\\": true, - \\"category\\": \\"Global\\", - \\"default\\": [], - \\"description\\": \\"Custom directory that contains prettier plugins in node_modules subdirectory.\\\\nOverrides default behavior when plugins are searched relatively to the location of Prettier.\\\\nMultiple values are accepted.\\", - \\"name\\": \\"pluginSearchDirs\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.13.0\\", - \\"type\\": \\"path\\" + "array": true, + "category": "Global", + "default": [], + "description": "Custom directory that contains prettier plugins in node_modules subdirectory.\\nOverrides default behavior when plugins are searched relatively to the location of Prettier.\\nMultiple values are accepted.", + "name": "pluginSearchDirs", + "pluginDefaults": {}, + "since": "1.13.0", + "type": "path" }, { - \\"array\\": true, - \\"category\\": \\"Global\\", - \\"default\\": [], - \\"description\\": \\"Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s.\\", - \\"name\\": \\"plugins\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.10.0\\", - \\"type\\": \\"path\\" + "array": true, + "category": "Global", + "default": [], + "description": "Add a plugin. Multiple plugins can be passed as separate \`--plugin\`s.", + "name": "plugins", + "pluginDefaults": {}, + "since": "1.10.0", + "type": "path" }, { - \\"category\\": \\"Global\\", - \\"default\\": 80, - \\"description\\": \\"The line length where Prettier will try wrap.\\", - \\"name\\": \\"printWidth\\", - \\"pluginDefaults\\": {}, - \\"range\\": { \\"end\\": null, \\"start\\": 0, \\"step\\": 1 }, - \\"since\\": \\"0.0.0\\", - \\"type\\": \\"int\\" + "category": "Global", + "default": 80, + "description": "The line length where Prettier will try wrap.", + "name": "printWidth", + "pluginDefaults": {}, + "range": { "end": null, "start": 0, "step": 1 }, + "since": "0.0.0", + "type": "int" }, { - \\"category\\": \\"Common\\", - \\"choices\\": [ + "category": "Common", + "choices": [ { - \\"description\\": \\"Wrap prose if it exceeds the print width.\\", - \\"since\\": \\"1.9.0\\", - \\"value\\": \\"always\\" + "description": "Wrap prose if it exceeds the print width.", + "since": "1.9.0", + "value": "always" }, { - \\"description\\": \\"Do not wrap prose.\\", - \\"since\\": \\"1.9.0\\", - \\"value\\": \\"never\\" + "description": "Do not wrap prose.", + "since": "1.9.0", + "value": "never" }, { - \\"description\\": \\"Wrap prose as-is.\\", - \\"since\\": \\"1.9.0\\", - \\"value\\": \\"preserve\\" + "description": "Wrap prose as-is.", + "since": "1.9.0", + "value": "preserve" } ], - \\"default\\": \\"preserve\\", - \\"description\\": \\"How to wrap prose.\\", - \\"name\\": \\"proseWrap\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.8.2\\", - \\"type\\": \\"choice\\" + "default": "preserve", + "description": "How to wrap prose.", + "name": "proseWrap", + "pluginDefaults": {}, + "since": "1.8.2", + "type": "choice" }, { - \\"category\\": \\"JavaScript\\", - \\"choices\\": [ + "category": "JavaScript", + "choices": [ { - \\"description\\": \\"Only add quotes around object properties where required.\\", - \\"value\\": \\"as-needed\\" + "description": "Only add quotes around object properties where required.", + "value": "as-needed" }, { - \\"description\\": \\"If at least one property in an object requires quotes, quote all properties.\\", - \\"value\\": \\"consistent\\" + "description": "If at least one property in an object requires quotes, quote all properties.", + "value": "consistent" }, { - \\"description\\": \\"Respect the input use of quotes in object properties.\\", - \\"value\\": \\"preserve\\" + "description": "Respect the input use of quotes in object properties.", + "value": "preserve" } ], - \\"default\\": \\"as-needed\\", - \\"description\\": \\"Change when properties in objects are quoted.\\", - \\"name\\": \\"quoteProps\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.17.0\\", - \\"type\\": \\"choice\\" + "default": "as-needed", + "description": "Change when properties in objects are quoted.", + "name": "quoteProps", + "pluginDefaults": {}, + "since": "1.17.0", + "type": "choice" }, { - \\"category\\": \\"Special\\", - \\"default\\": null, - \\"description\\": \\"Format code ending at a given character offset (exclusive).\\\\nThe range will extend forwards to the end of the selected statement.\\\\nThis option cannot be used with --cursor-offset.\\", - \\"name\\": \\"rangeEnd\\", - \\"pluginDefaults\\": {}, - \\"range\\": { \\"end\\": null, \\"start\\": 0, \\"step\\": 1 }, - \\"since\\": \\"1.4.0\\", - \\"type\\": \\"int\\" + "category": "Special", + "default": null, + "description": "Format code ending at a given character offset (exclusive).\\nThe range will extend forwards to the end of the selected statement.\\nThis option cannot be used with --cursor-offset.", + "name": "rangeEnd", + "pluginDefaults": {}, + "range": { "end": null, "start": 0, "step": 1 }, + "since": "1.4.0", + "type": "int" }, { - \\"category\\": \\"Special\\", - \\"default\\": 0, - \\"description\\": \\"Format code starting at a given character offset.\\\\nThe range will extend backwards to the start of the first line containing the selected statement.\\\\nThis option cannot be used with --cursor-offset.\\", - \\"name\\": \\"rangeStart\\", - \\"pluginDefaults\\": {}, - \\"range\\": { \\"end\\": null, \\"start\\": 0, \\"step\\": 1 }, - \\"since\\": \\"1.4.0\\", - \\"type\\": \\"int\\" + "category": "Special", + "default": 0, + "description": "Format code starting at a given character offset.\\nThe range will extend backwards to the start of the first line containing the selected statement.\\nThis option cannot be used with --cursor-offset.", + "name": "rangeStart", + "pluginDefaults": {}, + "range": { "end": null, "start": 0, "step": 1 }, + "since": "1.4.0", + "type": "int" }, { - \\"category\\": \\"Special\\", - \\"default\\": false, - \\"description\\": \\"Require either '@prettier' or '@format' to be present in the file's first docblock comment\\\\nin order for it to be formatted.\\", - \\"name\\": \\"requirePragma\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.7.0\\", - \\"type\\": \\"boolean\\" + "category": "Special", + "default": false, + "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment\\nin order for it to be formatted.", + "name": "requirePragma", + "pluginDefaults": {}, + "since": "1.7.0", + "type": "boolean" }, { - \\"category\\": \\"JavaScript\\", - \\"default\\": true, - \\"description\\": \\"Print semicolons.\\", - \\"name\\": \\"semi\\", - \\"oppositeDescription\\": \\"Do not print semicolons, except at the beginning of lines which may need them.\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.0.0\\", - \\"type\\": \\"boolean\\" + "category": "JavaScript", + "default": true, + "description": "Print semicolons.", + "name": "semi", + "oppositeDescription": "Do not print semicolons, except at the beginning of lines which may need them.", + "pluginDefaults": {}, + "since": "1.0.0", + "type": "boolean" }, { - \\"category\\": \\"Common\\", - \\"default\\": false, - \\"description\\": \\"Enforce single attribute per line in HTML, Vue and JSX.\\", - \\"name\\": \\"singleAttributePerLine\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"2.6.0\\", - \\"type\\": \\"boolean\\" + "category": "Common", + "default": false, + "description": "Enforce single attribute per line in HTML, Vue and JSX.", + "name": "singleAttributePerLine", + "pluginDefaults": {}, + "since": "2.6.0", + "type": "boolean" }, { - \\"category\\": \\"Common\\", - \\"default\\": false, - \\"description\\": \\"Use single quotes instead of double quotes.\\", - \\"name\\": \\"singleQuote\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"0.0.0\\", - \\"type\\": \\"boolean\\" + "category": "Common", + "default": false, + "description": "Use single quotes instead of double quotes.", + "name": "singleQuote", + "pluginDefaults": {}, + "since": "0.0.0", + "type": "boolean" }, { - \\"category\\": \\"Global\\", - \\"default\\": 2, - \\"description\\": \\"Number of spaces per indentation level.\\", - \\"name\\": \\"tabWidth\\", - \\"pluginDefaults\\": {}, - \\"range\\": { \\"end\\": null, \\"start\\": 0, \\"step\\": 1 }, - \\"type\\": \\"int\\" + "category": "Global", + "default": 2, + "description": "Number of spaces per indentation level.", + "name": "tabWidth", + "pluginDefaults": {}, + "range": { "end": null, "start": 0, "step": 1 }, + "type": "int" }, { - \\"category\\": \\"JavaScript\\", - \\"choices\\": [ + "category": "JavaScript", + "choices": [ { - \\"description\\": \\"Trailing commas where valid in ES5 (objects, arrays, etc.)\\", - \\"value\\": \\"es5\\" + "description": "Trailing commas where valid in ES5 (objects, arrays, etc.)", + "value": "es5" }, - { \\"description\\": \\"No trailing commas.\\", \\"value\\": \\"none\\" }, + { "description": "No trailing commas.", "value": "none" }, { - \\"description\\": \\"Trailing commas wherever possible (including function arguments).\\", - \\"value\\": \\"all\\" + "description": "Trailing commas wherever possible (including function arguments).", + "value": "all" } ], - \\"default\\": \\"es5\\", - \\"description\\": \\"Print trailing commas wherever possible when multi-line.\\", - \\"name\\": \\"trailingComma\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"0.0.0\\", - \\"type\\": \\"choice\\" + "default": "es5", + "description": "Print trailing commas wherever possible when multi-line.", + "name": "trailingComma", + "pluginDefaults": {}, + "since": "0.0.0", + "type": "choice" }, { - \\"category\\": \\"Global\\", - \\"default\\": false, - \\"description\\": \\"Indent with tabs instead of spaces.\\", - \\"name\\": \\"useTabs\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.0.0\\", - \\"type\\": \\"boolean\\" + "category": "Global", + "default": false, + "description": "Indent with tabs instead of spaces.", + "name": "useTabs", + "pluginDefaults": {}, + "since": "1.0.0", + "type": "boolean" }, { - \\"category\\": \\"HTML\\", - \\"default\\": false, - \\"description\\": \\"Indent script and style tags in Vue files.\\", - \\"name\\": \\"vueIndentScriptAndStyle\\", - \\"pluginDefaults\\": {}, - \\"since\\": \\"1.19.0\\", - \\"type\\": \\"boolean\\" + "category": "HTML", + "default": false, + "description": "Indent script and style tags in Vue files.", + "name": "vueIndentScriptAndStyle", + "pluginDefaults": {}, + "since": "1.19.0", + "type": "boolean" } ] } diff --git a/tests/integration/__tests__/__snapshots__/third-party.js.snap b/tests/integration/__tests__/__snapshots__/third-party.js.snap index c7863ffc5..d9088f3a7 100644 --- a/tests/integration/__tests__/__snapshots__/third-party.js.snap +++ b/tests/integration/__tests__/__snapshots__/third-party.js.snap @@ -7,7 +7,7 @@ exports[`cosmiconfig Invalid json file 1`] = ` | ^ 2 | -Unexpected token \\"a\\" (0x61) in JSON at position 1 while parsing \\"{a':}/n\\" +Unexpected token "a" (0x61) in JSON at position 1 while parsing "{a':}/n" > 1 | {a':} | ^ diff --git a/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap b/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap index 919bcf67e..4bb4d2895 100644 --- a/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-config-precedence.js.snap @@ -25,7 +25,7 @@ exports[`CLI overrides are still applied when no config is found with --config-p exports[`CLI overrides are still applied when no config is found with --config-precedence file-override (stdout) 1`] = ` "function noConfigJs() { - console.log(\\"no-config/file.js should have no semicolons\\") + console.log("no-config/file.js should have no semicolons") } " `; @@ -37,7 +37,7 @@ exports[`CLI overrides gets applied when no config exists with --config-preceden exports[`CLI overrides gets applied when no config exists with --config-precedence prefer-file (stdout) 1`] = ` "function noConfigJs() { console.log( - \\"no-config/file.js should have no semicolons\\" + "no-config/file.js should have no semicolons" ); } " @@ -49,12 +49,12 @@ exports[`CLI overrides gets ignored when config exists with --config-precedence exports[`CLI overrides gets ignored when config exists with --config-precedence prefer-file (stdout) 1`] = ` "function js() { - console.log(\\"js/file.js should have tab width 8 (1 if CLI)\\"); + console.log("js/file.js should have tab width 8 (1 if CLI)"); } -\\"use strict\\"; +"use strict"; module.exports = { - endOfLine: \\"auto\\", + endOfLine: "auto", tabWidth: 8, }; " @@ -66,12 +66,12 @@ exports[`CLI overrides take lower precedence with --config-precedence file-overr exports[`CLI overrides take lower precedence with --config-precedence file-override (stdout) 1`] = ` "function js() { - console.log(\\"js/file.js should have tab width 8 (1 if CLI)\\"); + console.log("js/file.js should have tab width 8 (1 if CLI)"); } -\\"use strict\\"; +"use strict"; module.exports = { - endOfLine: \\"auto\\", + endOfLine: "auto", tabWidth: 8, }; " @@ -84,59 +84,59 @@ exports[`CLI overrides take precedence with --config-precedence cli-override (st exports[`CLI overrides take precedence with --config-precedence cli-override (stdout) 1`] = ` "function f() { console.log( - \\"should have tab width 8\\" + "should have tab width 8" ) } function f() { console.log( - \\"should have space width 2\\" + "should have space width 2" ) } function f() { console.log( - \\"should have space width 8\\" + "should have space width 8" ) } function f() { console.log( - \\"should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present\\" + "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" ) } console.log( - \\"should have no semi\\" + "should have no semi" ) console.log( - \\"jest/__best-tests__/.file.js should have semi\\" + "jest/__best-tests__/.file.js should have semi" ); console.log( - \\"jest/__best-tests__/file.js should have semi\\" + "jest/__best-tests__/file.js should have semi" ); console.log( - \\"jest/Component.js should not have semi\\" + "jest/Component.js should not have semi" ) console.log( - \\"jest/Component.test.js should have semi\\" + "jest/Component.test.js should have semi" ); function js() { console.log( - \\"js/file.js should have tab width 8 (1 if CLI)\\" + "js/file.js should have tab width 8 (1 if CLI)" ); } -\\"use strict\\"; +"use strict"; module.exports = { - endOfLine: \\"auto\\", + endOfLine: "auto", tabWidth: 8, }; function noConfigJs() { console.log( - \\"no-config/file.js should have no semicolons\\" + "no-config/file.js should have no semicolons" ) } function packageJs() { console.log( - \\"package/file.js should have tab width 3\\" + "package/file.js should have tab width 3" ); } function rcJson() { @@ -179,59 +179,59 @@ exports[`CLI overrides take precedence without --config-precedence (stderr) 1`] exports[`CLI overrides take precedence without --config-precedence (stdout) 1`] = ` "function f() { console.log( - \\"should have tab width 8\\" + "should have tab width 8" ) } function f() { console.log( - \\"should have space width 2\\" + "should have space width 2" ) } function f() { console.log( - \\"should have space width 8\\" + "should have space width 8" ) } function f() { console.log( - \\"should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present\\" + "should have space width 2 despite ../.editorconfig specifying 8, because ./.hg is present" ) } console.log( - \\"should have no semi\\" + "should have no semi" ) console.log( - \\"jest/__best-tests__/.file.js should have semi\\" + "jest/__best-tests__/.file.js should have semi" ); console.log( - \\"jest/__best-tests__/file.js should have semi\\" + "jest/__best-tests__/file.js should have semi" ); console.log( - \\"jest/Component.js should not have semi\\" + "jest/Component.js should not have semi" ) console.log( - \\"jest/Component.test.js should have semi\\" + "jest/Component.test.js should have semi" ); function js() { console.log( - \\"js/file.js should have tab width 8 (1 if CLI)\\" + "js/file.js should have tab width 8 (1 if CLI)" ); } -\\"use strict\\"; +"use strict"; module.exports = { - endOfLine: \\"auto\\", + endOfLine: "auto", tabWidth: 8, }; function noConfigJs() { console.log( - \\"no-config/file.js should have no semicolons\\" + "no-config/file.js should have no semicolons" ) } function packageJs() { console.log( - \\"package/file.js should have tab width 3\\" + "package/file.js should have tab width 3" ); } function rcJson() { diff --git a/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap b/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap index ae829f1ee..e3c050ee0 100644 --- a/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-parser-inference.js.snap @@ -4,7 +4,7 @@ exports[`infers postcss parser (stderr) 1`] = `""`; exports[`infers postcss parser (stdout) 1`] = ` "/* JavaScript */ -\\"use strict\\"; +"use strict"; /* Stylesheet */ * { outline: none; diff --git a/tests/integration/__tests__/__snapshots__/with-shebang.js.snap b/tests/integration/__tests__/__snapshots__/with-shebang.js.snap index 807b89adc..f479a6255 100644 --- a/tests/integration/__tests__/__snapshots__/with-shebang.js.snap +++ b/tests/integration/__tests__/__snapshots__/with-shebang.js.snap @@ -4,7 +4,7 @@ exports[`preserves shebang (stderr) 1`] = `""`; exports[`preserves shebang (stdout) 1`] = ` "#!/usr/bin/env node -\\"use strict\\"; +"use strict"; " `; diff --git a/tests/integration/__tests__/format.js b/tests/integration/__tests__/format.js index ea7c7f7a2..5f2d2dd2f 100644 --- a/tests/integration/__tests__/format.js +++ b/tests/integration/__tests__/format.js @@ -56,9 +56,7 @@ test("should work with foo plugin instance", () => { JSON.stringify( prettier.format(input, { parser: "foo-parser", plugins: [fooPlugin] }) ) - ).toMatchInlineSnapshot( - '"\\"{\\\\\\"tabWidth\\\\\\":8,\\\\\\"bracketSpacing\\\\\\":false}\\""' - ); + ).toMatchInlineSnapshot('""{\\"tabWidth\\":8,\\"bracketSpacing\\":false}""'); }); test("'Adjacent JSX' error should not be swallowed by Babel's error recovery", () => { diff --git a/yarn.lock b/yarn.lock index f77dab94b..2d7981a15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1861,9 +1861,9 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.1: type-fest "^0.21.3" ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^4.1.0: version "4.1.0" From b419ea2cb8f673dc287d5a7d7f99ad008576e5a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 02:51:18 +0000 Subject: [PATCH 04/49] Build(deps-dev): Bump @typescript-eslint/eslint-plugin (#12615) --- package.json | 2 +- yarn.lock | 76 +++++++++++++++++++++++++++++++++++----------------- 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index e329b632c..656bace09 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@glimmer/reference": "0.84.1", "@types/estree": "0.0.51", "@types/jest": "27.4.1", - "@typescript-eslint/eslint-plugin": "5.17.0", + "@typescript-eslint/eslint-plugin": "5.18.0", "babel-jest": "27.5.1", "benchmark": "2.1.4", "browserslist-to-esbuild": "1.1.1", diff --git a/yarn.lock b/yarn.lock index 2d7981a15..ff91ebf32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1705,14 +1705,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz#704eb4e75039000531255672bf1c85ee85cf1d67" - integrity sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ== +"@typescript-eslint/eslint-plugin@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz#950df411cec65f90d75d6320a03b2c98f6c3af7d" + integrity sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A== dependencies: - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/type-utils" "5.17.0" - "@typescript-eslint/utils" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/type-utils" "5.18.0" + "@typescript-eslint/utils" "5.18.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -1720,20 +1720,20 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/scope-manager@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz#4cea7d0e0bc0e79eb60cad431c89120987c3f952" - integrity sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w== +"@typescript-eslint/scope-manager@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" + integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" -"@typescript-eslint/type-utils@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz#1c4549d68c89877662224aabb29fbbebf5fc9672" - integrity sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg== +"@typescript-eslint/type-utils@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz#62dbfc8478abf36ba94a90ddf10be3cc8e471c74" + integrity sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA== dependencies: - "@typescript-eslint/utils" "5.17.0" + "@typescript-eslint/utils" "5.18.0" debug "^4.3.2" tsutils "^3.21.0" @@ -1742,6 +1742,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f" integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw== +"@typescript-eslint/types@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" + integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== + "@typescript-eslint/typescript-estree@5.17.0": version "5.17.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488" @@ -1755,15 +1760,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.17.0", "@typescript-eslint/utils@^5.10.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.17.0.tgz#549a9e1d491c6ccd3624bc3c1b098f5cfb45f306" - integrity sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA== +"@typescript-eslint/typescript-estree@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" + integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== + dependencies: + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.18.0", "@typescript-eslint/utils@^5.10.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.18.0.tgz#27fc84cf95c1a96def0aae31684cb43a37e76855" + integrity sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/typescript-estree" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/typescript-estree" "5.18.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -1775,6 +1793,14 @@ "@typescript-eslint/types" "5.17.0" eslint-visitor-keys "^3.0.0" +"@typescript-eslint/visitor-keys@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" + integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== + dependencies: + "@typescript-eslint/types" "5.18.0" + eslint-visitor-keys "^3.0.0" + abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" From e7233d4e06516897014006dcc6fe363eb9816f4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 02:56:25 +0000 Subject: [PATCH 05/49] Build(deps-dev): Bump @babel/core from 7.17.8 to 7.17.9 (#12617) --- package.json | 2 +- yarn.lock | 67 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 41 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index 656bace09..0f5a17a05 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "yaml-unist-parser": "1.3.1" }, "devDependencies": { - "@babel/core": "7.17.8", + "@babel/core": "7.17.9", "@babel/preset-env": "7.16.11", "@babel/types": "7.17.0", "@esbuild-plugins/node-modules-polyfill": "0.1.4", diff --git a/yarn.lock b/yarn.lock index ff91ebf32..3b056e9a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,31 +40,31 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== -"@babel/core@7.17.8", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a" - integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ== +"@babel/core@7.17.9", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" + integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.7" + "@babel/generator" "^7.17.9" "@babel/helper-compilation-targets" "^7.17.7" "@babel/helper-module-transforms" "^7.17.7" - "@babel/helpers" "^7.17.8" - "@babel/parser" "^7.17.8" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.9" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" + "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.1.2" + json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.7.2": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.7.tgz#8da2599beb4a86194a3b24df6c085931d9ee45ad" - integrity sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w== +"@babel/generator@^7.17.9", "@babel/generator@^7.7.2": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" + integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ== dependencies: "@babel/types" "^7.17.0" jsesc "^2.5.1" @@ -153,6 +153,14 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-function-name@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" + integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/types" "^7.17.0" + "@babel/helper-get-function-arity@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" @@ -275,13 +283,13 @@ "@babel/traverse" "^7.16.8" "@babel/types" "^7.16.8" -"@babel/helpers@^7.17.8": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.8.tgz#288450be8c6ac7e4e44df37bcc53d345e07bc106" - integrity sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw== +"@babel/helpers@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" + integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== dependencies: "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" + "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" "@babel/highlight@^7.0.0", "@babel/highlight@^7.16.7": @@ -293,11 +301,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@7.17.8", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8": +"@babel/parser@7.17.8": version "7.17.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240" integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" + integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" @@ -918,18 +931,18 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.3", "@babel/traverse@^7.7.2": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.3.tgz#0ae0f15b27d9a92ba1f2263358ea7c4e7db47b57" - integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw== +"@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d" + integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== dependencies: "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.3" + "@babel/generator" "^7.17.9" "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" "@babel/helper-hoist-variables" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.3" + "@babel/parser" "^7.17.9" "@babel/types" "^7.17.0" debug "^4.1.0" globals "^11.1.0" @@ -4655,7 +4668,7 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json5@2.2.1, json5@^2.1.2: +json5@2.2.1, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== From 9558c93201655400693c6c44b6980775a6913591 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 02:57:34 +0000 Subject: [PATCH 06/49] Build(deps): Bump flow-parser from 0.175.0 to 0.175.1 (#12616) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0f5a17a05..0232af14d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "fast-glob": "3.2.11", "fast-json-stable-stringify": "2.1.0", "find-parent-dir": "0.3.1", - "flow-parser": "0.175.0", + "flow-parser": "0.175.1", "get-stdin": "8.0.0", "graphql": "15.6.1", "html-element-attributes": "3.1.0", diff --git a/yarn.lock b/yarn.lock index 3b056e9a8..33f85659a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3414,10 +3414,10 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -flow-parser@0.175.0: - version "0.175.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.175.0.tgz#622c2e1dadeed0cc3d25779b143a0935bf515983" - integrity sha512-9XG5JGOjhODF+OQF5ufCw8XiGi+8B46scjr3Q49JxN7IDRdT2W+1AOuvKKd6j766/5E7qSuCn/dsq1y3hihntg== +flow-parser@0.175.1: + version "0.175.1" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.175.1.tgz#835a0ea46346c8bdd947e70b2814c2b613beb238" + integrity sha512-gYes5/nxeLYiu02MMb+WH4KaOIYrVcTVIuV9M4aP/4hqJ+zULxxS/In+WEj/tEBsQ+8/wSHo9IDWKQL1FhrLmA== form-data@^3.0.0: version "3.0.1" From f4224334935f2920509da225e2fc049a67627826 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 06:27:00 +0000 Subject: [PATCH 07/49] Build(deps): Bump semver from 7.3.5 to 7.3.6 (#12620) --- package.json | 2 +- yarn.lock | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0232af14d..dbfd0b1e7 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "remark-math": "3.0.1", "remark-parse": "8.0.3", "resolve": "1.22.0", - "semver": "7.3.5", + "semver": "7.3.6", "string-width": "5.0.1", "strip-ansi": "7.0.1", "typescript": "4.6.3", diff --git a/yarn.lock b/yarn.lock index 33f85659a..8ae478a97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4822,6 +4822,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.4.0: + version "7.8.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.0.tgz#649aaeb294a56297b5cbc5d70f198dcc5ebe5747" + integrity sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg== + magic-string@0.25.7, magic-string@^0.25.3: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" @@ -5841,13 +5846,20 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@7.3.5, semver@^7.3.2, semver@^7.3.5: +semver@7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== dependencies: lru-cache "^6.0.0" +semver@7.3.6, semver@^7.3.2, semver@^7.3.5: + version "7.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b" + integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w== + dependencies: + lru-cache "^7.4.0" + semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" From f1ae6db2c4a54e05d0b40c0567820d87374a4a6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 06:40:52 +0000 Subject: [PATCH 08/49] Build(deps-dev): Bump esbuild from 0.14.30 to 0.14.34 (#12618) --- package.json | 2 +- yarn.lock | 208 +++++++++++++++++++++++++-------------------------- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index dbfd0b1e7..4aa306db6 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "cross-env": "7.0.3", "cspell": "5.19.5", "enquirer": "2.3.6", - "esbuild": "0.14.30", + "esbuild": "0.14.34", "esbuild-visualizer": "0.3.1", "eslint": "8.12.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 8ae478a97..d6d4632d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2809,90 +2809,90 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild-android-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.30.tgz#9efcdb3d826b9c67705a0c518d361ab44ae4cc5b" - integrity sha512-vdJ7t8A8msPfKpYUGUV/KaTQRiZ0vDa2XSTlzXVkGGVHLKPeb85PBUtYJcEgw3htW3IdX5i1t1IMdQCwJJgNAg== +esbuild-android-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.34.tgz#46bc4327dd0809937912346244eaffdb9bfc980d" + integrity sha512-XfxcfJqmMYsT/LXqrptzFxmaR3GWzXHDLdFNIhm6S00zPaQF1TBBWm+9t0RZ6LRR7iwH57DPjaOeW20vMqI4Yw== -esbuild-android-arm64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.30.tgz#7b90fa7578b94da047e0bf3da477cb5775b58664" - integrity sha512-BdgGfxeA5hBQNErLr7BWJUA8xjflEfyaARICy8e0OJYNSAwDbEzOf8LyiKWSrDcgV129mWhi3VpbNQvOIDEHcg== +esbuild-android-arm64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.34.tgz#a3f7e1ad84b8a7dcb39b5e132768b56ee7133656" + integrity sha512-T02+NXTmSRL1Mc6puz+R9CB54rSPICkXKq6+tw8B6vxZFnCPzbJxgwIX4kcluz9p8nYBjF3+lSilTGWb7+Xgew== -esbuild-darwin-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.30.tgz#275e40eb100286b868d4cd664e6447b53400f7ff" - integrity sha512-VRaOXMMrsG5n53pl4qFZQdXy2+E0NoLP/QH3aDUI0+bQP+ZHDmbINKcDy2IX7GVFI9kqPS18iJNAs5a6/G2LZg== +esbuild-darwin-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.34.tgz#a0e4ab7a0cddf76761f1fb5d6bf552a376beb16e" + integrity sha512-pLRip2Bh4Ng7Bf6AMgCrSp3pPe/qZyf11h5Qo2mOfJqLWzSVjxrXW+CFRJfrOVP7TCnh/gmZSM2AFdCPB72vtw== -esbuild-darwin-arm64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.30.tgz#c2b8fe03fb0dcee1d227b226c9c921de71e4d411" - integrity sha512-qDez+fHMOrO9Oc9qjt/x+sy09RJVh62kik5tVybKRLmezeV4qczM9/sAYY57YN0aWLdHbcCj2YqJUWYJNsgKnw== +esbuild-darwin-arm64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.34.tgz#54c35461f82f83a7f5169d9a6a54201798977b07" + integrity sha512-vpidSJEBxx6lf1NWgXC+DCmGqesJuZ5Y8aQVVsaoO4i8tRXbXb0whChRvop/zd3nfNM4dIl5EXAky0knRX5I6w== -esbuild-freebsd-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.30.tgz#328bb272ce6cfcae202b6e0a06c240036335cc91" - integrity sha512-mec1jENcImVVagddZlGWsdAUwBnzR5cgnhzCxv+9fSMxKbx1uZYLLUAnLPp8m/i934zrumR1xGjJ5VoWdPlI2w== +esbuild-freebsd-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.34.tgz#aebb50248f5874d04ffeab2db8ee1ed6037e2654" + integrity sha512-m0HBjePhe0hAQJgtMRMNV9kMgIyV4/qSnzPx42kRMQBcPhgjAq1JRu4Il26czC+9FgpMbFkUktb07f/Lwnc6CA== -esbuild-freebsd-arm64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.30.tgz#49ce79fa7d7087a941e27432da46bafb5b35a979" - integrity sha512-cpjbTs6Iok/AfeB0JgTzyUJTMStC1SQULmany5nHx6S4GTkSgaAHuJzZO0GcVWqghI4e0YL/bjXAhN5Mn6feNw== +esbuild-freebsd-arm64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.34.tgz#09bef288e29f18b38b0c70a9827b6ee718e36c7f" + integrity sha512-cpRc2B94L1KvMPPYB4D6G39jLqpKlD3noAMY4/e86iXXXkhUYJJEtTuyNFTa9JRpWM0xCAp4mxjHjoIiLuoCLA== -esbuild-linux-32@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.30.tgz#c473299f5291130f6d4436808603b529ccbfa785" - integrity sha512-liIONVT4F2kZmOMwtwASqZ8WkIjb5HHBR9HUffdHiuotSTF3CyZO+EJf+Og+SYYuuVIvt0qHNSFjBA/iSESteQ== +esbuild-linux-32@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.34.tgz#67790061758e008e919e65bbc34549f55dadaca7" + integrity sha512-8nQaEaoW7MH/K/RlozJa+lE1ejHIr8fuPIHhc513UebRav7HtXgQvxHQ6VZRUkWtep23M6dd7UqhwO1tMOfzQQ== -esbuild-linux-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.30.tgz#b4be59f0665a44574a7617c9db673943da6061f8" - integrity sha512-LUnpzoMpRqFON5En4qEj6NWiyH6a1K+Y2qYNKrCy5qPTjDoG/EWeqMz69n8Uv7pRuvDKl3FNGJ1dufTrA5i0sw== +esbuild-linux-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.34.tgz#b9b19d4ac07e37495dd2508ec843418aa71c98d6" + integrity sha512-Y3of4qQoLLlAgf042MlrY1P+7PnN9zWj8nVtw9XQG5hcLOZLz7IKpU35oeu7n4wvyaZHwvQqDJ93gRLqdJekcQ== -esbuild-linux-arm64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.30.tgz#78485a9f49858ea69ced85c3dd0fe58d354f20f8" - integrity sha512-DHZHn6FK5q/KL0fpNT/0jE38Nnyk2rXxKE9WENi95EXtqfOLPgE8tzjTZQNgpr61R95QX4ymQU26ni3IZk8buQ== +esbuild-linux-arm64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.34.tgz#fd84b11a6ccfe9e83e00d0c45890e9fb3a7248c1" + integrity sha512-IlWaGtj9ir7+Nrume1DGcyzBDlK8GcnJq0ANKwcI9pVw8tqr+6GD0eqyF9SF1mR8UmAp+odrx1H5NdR2cHdFHA== -esbuild-linux-arm@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.30.tgz#00392bbe04ac687dd6d9849ecee302bc27f984f2" - integrity sha512-97T+bbXnpqf7mfIG49UR7ZSJFGgvc22byn74qw3Kx2GDCBSQoVFjyWuKOHGXp8nXk3XYrdFF+mQ8yQ7aNsgQvg== +esbuild-linux-arm@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.34.tgz#c89d4714b05265a315a97c8933508cc73950e683" + integrity sha512-9lpq1NcJqssAF7alCO6zL3gvBVVt/lKw4oetUM7OgNnRX0OWpB+ZIO9FwCrSj/dMdmgDhPLf+119zB8QxSMmAg== -esbuild-linux-mips64le@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.30.tgz#cf48a292037c3a9ca3ca84ec0ae4f47bf1247ab4" - integrity sha512-fLUzTFZ7uknC0aPTk7/lM7NmaG/9ZqE3SaHEphcaM009SZK/mDOvZugWi1ss6WGNhk13dUrhkfHcc4FSb9hYhg== +esbuild-linux-mips64le@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.34.tgz#d60752c3fb1260dd0737532af2de2a9521656456" + integrity sha512-k3or+01Rska1AjUyNjA4buEwB51eyN/xPQAoOx1CjzAQC3l8rpjUDw55kXyL63O/1MUi4ISvtNtl8gLwdyEcxw== -esbuild-linux-ppc64le@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.30.tgz#8e448a54e7040829ee9ecfc68dab0f3a039b1cff" - integrity sha512-2Oudm2WEfj0dNU9bzIl5L/LrsMEmHWsOsYgJJqu8fDyUDgER+J1d33qz3cUdjsJk7gAENayIxDSpsuCszx0w3A== +esbuild-linux-ppc64le@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.34.tgz#f4c6229269956564f0c6f9825f5e717c2cfc22b3" + integrity sha512-+qxb8M9FfM2CJaVU7GgYpJOHM1ngQOx+/VrtBjb4C8oVqaPcESCeg2anjl+HRZy8VpYc71q/iBYausPPbJ+Keg== -esbuild-linux-riscv64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.30.tgz#118af007f21adb00c4362d5eda3f004290f4d0ef" - integrity sha512-RPMucPW47rV4t2jlelaE948iCRtbZf5RhifxSwzlpM1Mqdyu99MMNK0w4jFreGTmLN+oGomxIOxD6n+2E/XqHw== +esbuild-linux-riscv64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.34.tgz#549bd18a9eba3135b67f7b742730b5343a1be35d" + integrity sha512-Y717ltBdQ5j5sZIHdy1DV9kieo0wMip0dCmVSTceowCPYSn1Cg33Kd6981+F/3b9FDMzNWldZFOBRILViENZSA== -esbuild-linux-s390x@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.30.tgz#e0649e26d8791bf6265685842dcef732de59b49b" - integrity sha512-OZ68r7ok6qO7hdwrwQn2p5jbIRRcUcVaAykB7e0uCA0ODwfeGunILM6phJtq2Oz4dlEEFvd+tSuma3paQKwt+A== +esbuild-linux-s390x@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.34.tgz#2a6b577c437f94c2b37623c755ff5215a05c12bc" + integrity sha512-bDDgYO4LhL4+zPs+WcBkXph+AQoPcQRTv18FzZS0WhjfH8TZx2QqlVPGhmhZ6WidrY+jKthUqO6UhGyIb4MpmA== -esbuild-netbsd-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.30.tgz#7653db21ab4379a1b557f338b040e3493ff5006c" - integrity sha512-iyejQUKn0TzpPkufq8pSCxOg9NheycQbMbPCmjefTe9wYuUlBt1TcHvdoJnYbQzsAhAh1BNq+s0ycRsIJFZzaQ== +esbuild-netbsd-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.34.tgz#7f0b73229157975eb35597207723df52ba21722a" + integrity sha512-cfaFGXdRt0+vHsjNPyF0POM4BVSHPSbhLPe8mppDc7GDDxjIl08mV1Zou14oDWMp/XZMjYN1kWYRSfftiD0vvQ== -esbuild-openbsd-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.30.tgz#3fad1699cb2ca7a060585356e2881df7b3fa5bb1" - integrity sha512-UyK1MTMcy4j5fH260fsE1o6MVgWNhb62eCK2yCKCRazZv8Nqdc2WiP9ygjWidmEdCDS+A6MuVp9ozk9uoQtQpA== +esbuild-openbsd-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.34.tgz#b9bc44b4f70031fb01b173b279daeffc4d4f54b7" + integrity sha512-vmy9DxXVnRiI14s8GKuYBtess+EVcDALkbpTqd5jw4XITutIzyB7n4x0Tj5utAkKsgZJB22lLWGekr0ABnSLow== -esbuild-sunos-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.30.tgz#2306a178dc2362cf32fc182327c21b49b78ca1a3" - integrity sha512-aQRtRTNKHB4YuG+xXATe5AoRTNY48IJg5vjE8ElxfmjO9+KdX7MHFkTLhlKevCD6rNANtB3qOlSIeAiXTwHNqw== +esbuild-sunos-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.34.tgz#512dd6085ac1a0dccc20c5f932f16a618bea409c" + integrity sha512-eNPVatNET1F7tRMhii7goL/eptfxc0ALRjrj9SPFNqp0zmxrehBFD6BaP3R4LjMn6DbMO0jOAnTLFKr8NqcJAA== esbuild-visualizer@0.3.1: version "0.3.1" @@ -2903,46 +2903,46 @@ esbuild-visualizer@0.3.1: open "^7.4.2" yargs "^16.2.0" -esbuild-windows-32@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.30.tgz#ea17b2a9468e346734f926a7edd49de3cc81d12f" - integrity sha512-9/fb1tPtpacMqxAXp3fGHowUDg/l9dVch5hKmCLEZC6PdGljh6h372zMdJwYfH0Bd5CCPT0Wx95uycBLJiqpXA== +esbuild-windows-32@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.34.tgz#3ff1afd5cac08050c7c7140a59e343b06f6b037c" + integrity sha512-EFhpXyHEcnqWYe2rAHFd8dRw8wkrd9U+9oqcyoEL84GbanAYjiiIjBZsnR8kl0sCQ5w6bLpk7vCEIA2VS32Vcg== -esbuild-windows-64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.30.tgz#266147f1f45974ac61dece10ab32bc916050dcc2" - integrity sha512-DHgITeUhPAnN9I5O6QBa1GVyPOhiYCn4S4TtQr7sO4+X0LNyqnlmA1M0qmGkUdDC1QQfjI8uQ4G/whdWb2pWIQ== +esbuild-windows-64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.34.tgz#66f7b43d2a0b132f6748dfa3edac4fc939a99be0" + integrity sha512-a8fbl8Ky7PxNEjf1aJmtxdDZj32/hC7S1OcA2ckEpCJRTjiKslI9vAdPpSjrKIWhws4Galpaawy0nB7fjHYf5Q== -esbuild-windows-arm64@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.30.tgz#8e5e9c2455bffaf3e1a387eee4841f5c3797b8a8" - integrity sha512-F1kLyQH7zSgjh5eLxogGZN7C9+KNs9m+s7Q6WZoMmCWT/6j998zlaoECHyM8izJRRfsvw2eZlEa1jO6/IOU1AQ== +esbuild-windows-arm64@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.34.tgz#b74a6395b7b7e53dba70b71b39542afd83352473" + integrity sha512-EYvmKbSa2B3sPnpC28UEu9jBK5atGV4BaVRE7CYGUci2Hlz4AvtV/LML+TcDMT6gBgibnN2gcltWclab3UutMg== -esbuild@0.14.30: - version "0.14.30" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.30.tgz#8bf6501a58f71e622e7485aeada79c764c1affe4" - integrity sha512-wCecQSBkIjp2xjuXY+wcXS/PpOQo9rFh4NAKPh4Pm9f3fuLcnxkR0rDzA+mYP88FtXIUcXUyYmaIgfrzRl55jA== +esbuild@0.14.34: + version "0.14.34" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.34.tgz#3610056f0a57bcfd0b63ddaafdb2e3bef1cf96e4" + integrity sha512-QIWdPT/gFF6hCaf4m7kP0cJ+JIuFkdHibI7vVFvu3eJS1HpVmYHWDulyN5WXwbRA0SX/7ZDaJ/1DH8SdY9xOJg== optionalDependencies: - esbuild-android-64 "0.14.30" - esbuild-android-arm64 "0.14.30" - esbuild-darwin-64 "0.14.30" - esbuild-darwin-arm64 "0.14.30" - esbuild-freebsd-64 "0.14.30" - esbuild-freebsd-arm64 "0.14.30" - esbuild-linux-32 "0.14.30" - esbuild-linux-64 "0.14.30" - esbuild-linux-arm "0.14.30" - esbuild-linux-arm64 "0.14.30" - esbuild-linux-mips64le "0.14.30" - esbuild-linux-ppc64le "0.14.30" - esbuild-linux-riscv64 "0.14.30" - esbuild-linux-s390x "0.14.30" - esbuild-netbsd-64 "0.14.30" - esbuild-openbsd-64 "0.14.30" - esbuild-sunos-64 "0.14.30" - esbuild-windows-32 "0.14.30" - esbuild-windows-64 "0.14.30" - esbuild-windows-arm64 "0.14.30" + esbuild-android-64 "0.14.34" + esbuild-android-arm64 "0.14.34" + esbuild-darwin-64 "0.14.34" + esbuild-darwin-arm64 "0.14.34" + esbuild-freebsd-64 "0.14.34" + esbuild-freebsd-arm64 "0.14.34" + esbuild-linux-32 "0.14.34" + esbuild-linux-64 "0.14.34" + esbuild-linux-arm "0.14.34" + esbuild-linux-arm64 "0.14.34" + esbuild-linux-mips64le "0.14.34" + esbuild-linux-ppc64le "0.14.34" + esbuild-linux-riscv64 "0.14.34" + esbuild-linux-s390x "0.14.34" + esbuild-netbsd-64 "0.14.34" + esbuild-openbsd-64 "0.14.34" + esbuild-sunos-64 "0.14.34" + esbuild-windows-32 "0.14.34" + esbuild-windows-64 "0.14.34" + esbuild-windows-arm64 "0.14.34" escalade@^3.1.1: version "3.1.1" From cb997ca7abac937899bede96c3ff87aac16abc83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 17:15:29 +0800 Subject: [PATCH 09/49] Build(deps): Bump @typescript-eslint/typescript-estree (#12621) Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 5.17.0 to 5.18.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-estree/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.18.0/packages/typescript-estree) --- updated-dependencies: - dependency-name: "@typescript-eslint/typescript-estree" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 26 -------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/package.json b/package.json index 4aa306db6..94a81af54 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@babel/parser": "7.17.8", "@glimmer/syntax": "0.84.1", "@iarna/toml": "2.2.5", - "@typescript-eslint/typescript-estree": "5.17.0", + "@typescript-eslint/typescript-estree": "5.18.0", "acorn": "8.7.0", "acorn-jsx": "5.3.2", "angular-estree-parser": "2.5.0", diff --git a/yarn.lock b/yarn.lock index d6d4632d5..1d703d98c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1750,29 +1750,11 @@ debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f" - integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw== - "@typescript-eslint/types@5.18.0": version "5.18.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== -"@typescript-eslint/typescript-estree@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488" - integrity sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg== - dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" - debug "^4.3.2" - globby "^11.0.4" - is-glob "^4.0.3" - semver "^7.3.5" - tsutils "^3.21.0" - "@typescript-eslint/typescript-estree@5.18.0": version "5.18.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" @@ -1798,14 +1780,6 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz#52daae45c61b0211b4c81b53a71841911e479128" - integrity sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA== - dependencies: - "@typescript-eslint/types" "5.17.0" - eslint-visitor-keys "^3.0.0" - "@typescript-eslint/visitor-keys@5.18.0": version "5.18.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" From f8ce0e303bf82ed10c4abd2c02c1cfe34215b1a9 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Fri, 8 Apr 2022 23:36:23 +0900 Subject: [PATCH 10/49] Fix HTML AST JSON serializer for debugging (#12611) * Add `JSON.stringify` replacer * Fix serializer for playground * Use `opt.parser` * Consitent style * lwc * Revert "lwc" This reverts commit 799bf357e8b30765944b29639a45b3c326bce615. Revert "Use `opt.parser`" This reverts commit 3046f52798ce740ea0ed267bf46c3221606b1fbc. Revert "Add `JSON.stringify` replacer" This reverts commit 54266cde61ea8f7cc4b3b0c9714559c93b456923. * Rewrite `Node` class * Revert changes in playground * Revert wrong changes * Update clean.js * Set `configurable: true` * Fix missing `return` * Fix: "children" and "attrs" are enumerable * Type check * Revert unnessary change Co-authored-by: fisker Cheung --- src/language-html/ast.js | 100 +++++++++++++++++++------------------ src/language-html/clean.js | 1 - 2 files changed, 51 insertions(+), 50 deletions(-) diff --git a/src/language-html/ast.js b/src/language-html/ast.js index 913960a17..e24915636 100644 --- a/src/language-html/ast.js +++ b/src/language-html/ast.js @@ -8,33 +8,40 @@ const NODES_KEYS = { children: true, }; +const NON_ENUMERABLE_PROPERTIES = new Set(["parent"]); + // TODO: typechecking is problematic for this class because of this issue: // https://github.com/microsoft/TypeScript/issues/26811 class Node { - constructor(props = {}) { - for (const [key, value] of Object.entries(props)) { - if (key in NODES_KEYS) { - this._setNodes(key, value); - } else { - this[key] = value; - } + constructor(nodeOrProperties = {}) { + for (const property of new Set([ + ...NON_ENUMERABLE_PROPERTIES, + ...Object.keys(nodeOrProperties), + ])) { + this.setProperty(property, nodeOrProperties[property]); } } - _setNodes(key, nodes) { - if (nodes !== this[key]) { - this[key] = cloneAndUpdateNodes(nodes, this); - if (key === "attrs") { - setNonEnumerableProperty( - this, - "attrMap", - Object.fromEntries( - this[key].map((attr) => [attr.fullName, attr.value]) - ) - ); - } + setProperty(property, value) { + if (this[property] === value) { + return; } + + if (property in NODES_KEYS) { + value = value.map((node) => this.createChild(node)); + } + + if (!NON_ENUMERABLE_PROPERTIES.has(property)) { + this[property] = value; + return; + } + + Object.defineProperty(this, property, { + value, + enumerable: false, + configurable: true, + }); } map(fn) { @@ -50,7 +57,7 @@ class Node { // @ts-expect-error newNode = new Node({ parent: this.parent }); } - newNode._setNodes(NODES_KEY, mappedNodes); + newNode.setProperty(NODES_KEY, mappedNodes); } } } @@ -78,15 +85,27 @@ class Node { fn(this); } + createChild(nodeOrProperties) { + const node = + nodeOrProperties instanceof Node + ? nodeOrProperties.clone() + : new Node(nodeOrProperties); + node.setProperty("parent", this); + return node; + } + /** * @param {Node} [target] * @param {Object} [node] */ insertChildBefore(target, node) { - const newNode = new Node({ ...node, parent: this }); - // @ts-expect-error - this.children.splice(this.children.indexOf(target), 0, newNode); + this.children.splice( + // @ts-expect-error + this.children.indexOf(target), + 0, + this.createChild(node) + ); } /** @@ -102,23 +121,14 @@ class Node { * @param {Object} [node] */ replaceChild(target, node) { - const newNode = new Node({ ...node, parent: this }); - // @ts-expect-error - this.children[this.children.indexOf(target)] = newNode; + this.children[this.children.indexOf(target)] = this.createChild(node); } clone() { return new Node(this); } - /** - * @param {Array} [children] - */ - setChildren(children) { - this._setNodes("children", children); - } - get firstChild() { // @ts-expect-error return isNonEmptyArray(this.children) ? this.children[0] : null; @@ -152,10 +162,18 @@ class Node { // @ts-expect-error return this.hasExplicitNamespace ? this.fullName : this.name; } + get fullName() { // @ts-expect-error return this.namespace ? this.namespace + ":" + this.name : this.name; } + + get attrMap() { + return Object.fromEntries( + // @ts-expect-error + this.attrs.map((attr) => [attr.fullName, attr.value]) + ); + } } function mapNodesIfChanged(nodes, fn) { @@ -165,22 +183,6 @@ function mapNodesIfChanged(nodes, fn) { : nodes; } -function cloneAndUpdateNodes(nodes, parent) { - const siblings = nodes.map((node) => - node instanceof Node ? node.clone() : new Node({ ...node, parent }) - ); - - for (const sibling of siblings) { - sibling.parent = parent; - } - - return siblings; -} - -function setNonEnumerableProperty(obj, key, value) { - Object.defineProperty(obj, key, { value, enumerable: false }); -} - module.exports = { Node, }; diff --git a/src/language-html/clean.js b/src/language-html/clean.js index 2d316486d..fbfc73f2e 100644 --- a/src/language-html/clean.js +++ b/src/language-html/clean.js @@ -8,7 +8,6 @@ const ignoredProperties = new Set([ "endSourceSpan", "nameSpan", "valueSpan", - "parent", ]); function clean(ast, newNode) { From ce6fafc92a0e38a98cc80734bff72efa7fefcd48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 00:06:12 +0900 Subject: [PATCH 11/49] Build(deps-dev): Bump eslint-plugin-import from 2.25.4 to 2.26.0 (#12619) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.25.4 to 2.26.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.25.4...v2.26.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 94a81af54..86e5a1fe0 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "eslint-config-prettier": "8.5.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-compat": "4.0.2", - "eslint-plugin-import": "2.25.4", + "eslint-plugin-import": "2.26.0", "eslint-plugin-jest": "26.1.3", "eslint-plugin-prettier-internal-rules": "2.0.1", "eslint-plugin-react": "7.29.4", diff --git a/yarn.lock b/yarn.lock index 1d703d98c..8d99531b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2979,7 +2979,7 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-module-utils@^2.7.2: +eslint-module-utils@^2.7.3: version "2.7.3" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== @@ -3001,24 +3001,24 @@ eslint-plugin-compat@4.0.2: lodash.memoize "4.1.2" semver "7.3.5" -eslint-plugin-import@2.25.4: - version "2.25.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" - integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== +eslint-plugin-import@2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== dependencies: array-includes "^3.1.4" array.prototype.flat "^1.2.5" debug "^2.6.9" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.2" + eslint-module-utils "^2.7.3" has "^1.0.3" - is-core-module "^2.8.0" + is-core-module "^2.8.1" is-glob "^4.0.3" - minimatch "^3.0.4" + minimatch "^3.1.2" object.values "^1.1.5" - resolve "^1.20.0" - tsconfig-paths "^3.12.0" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" eslint-plugin-jest@26.1.3: version "26.1.3" @@ -3787,7 +3787,7 @@ is-callable@^1.1.4, is-callable@^1.2.4: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== -is-core-module@^2.2.0, is-core-module@^2.8.0, is-core-module@^2.8.1: +is-core-module@^2.2.0, is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== @@ -4904,7 +4904,7 @@ minimatch@^3.0.4, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimist@1.2.6, minimist@^1.2.0: +minimist@1.2.6, minimist@^1.2.0, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -5698,7 +5698,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@1.22.0, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0: +resolve@1.22.0, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -6280,14 +6280,14 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== -tsconfig-paths@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" - integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" - minimist "^1.2.0" + minimist "^1.2.6" strip-bom "^3.0.0" tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: From 5c2f3f3bf349a54680045d6f33946839091c7a7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Apr 2022 10:50:52 +0800 Subject: [PATCH 12/49] Build(deps): Bump @babel/parser from 7.17.8 to 7.17.9 (#12614) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 86e5a1fe0..6f5d50c2a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "@angular/compiler": "12.2.16", "@babel/code-frame": "7.16.7", - "@babel/parser": "7.17.8", + "@babel/parser": "7.17.9", "@glimmer/syntax": "0.84.1", "@iarna/toml": "2.2.5", "@typescript-eslint/typescript-estree": "5.18.0", diff --git a/yarn.lock b/yarn.lock index 8d99531b3..6a68c5f85 100644 --- a/yarn.lock +++ b/yarn.lock @@ -301,12 +301,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@7.17.8": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240" - integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ== - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.9": +"@babel/parser@7.17.9", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== From 991708420a0368fac2960901e637d6c610a5d704 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Sat, 9 Apr 2022 17:34:34 +0800 Subject: [PATCH 13/49] Simplify HTML `Node` class (#12622) --- src/language-html/ast.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/language-html/ast.js b/src/language-html/ast.js index e24915636..a225e8a96 100644 --- a/src/language-html/ast.js +++ b/src/language-html/ast.js @@ -1,8 +1,5 @@ "use strict"; -const { isNonEmptyArray } = require("../common/util.js"); -const getLast = require("../utils/get-last.js"); - const NODES_KEYS = { attrs: true, children: true, @@ -46,7 +43,7 @@ class Node { map(fn) { /** @type{any} */ - let newNode = null; + let newNode; for (const NODES_KEY in NODES_KEYS) { const nodes = this[NODES_KEY]; @@ -131,30 +128,22 @@ class Node { get firstChild() { // @ts-expect-error - return isNonEmptyArray(this.children) ? this.children[0] : null; + return this.children?.[0]; } get lastChild() { // @ts-expect-error - return isNonEmptyArray(this.children) ? getLast(this.children) : null; + return this.children?.[this.children.length - 1]; } get prev() { // @ts-expect-error - if (!this.parent) { - return null; - } - // @ts-expect-error - return this.parent.children[this.parent.children.indexOf(this) - 1]; + return this.parent?.children[this.parent.children.indexOf(this) - 1]; } get next() { // @ts-expect-error - if (!this.parent) { - return null; - } - // @ts-expect-error - return this.parent.children[this.parent.children.indexOf(this) + 1]; + return this.parent?.children[this.parent.children.indexOf(this) + 1]; } // for element and attribute From fa3b95c2e1a3a3351dc1b0168aa2c26f0cc4e9b3 Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 10 Apr 2022 15:26:07 +0900 Subject: [PATCH 14/49] Remove `lodash` (#12628) * Replace `groupBy` * Replace `partition` * Replace `pick` * Move `partition` * Replace `uniqBy` * Replace `fromPairs` * Remove usage from website * Reuse `partition` * Remove from package.json * Fix * Use `ignore.default` * Add `resolveConfig` to `FileInfoOptions` * Explicit tuple types * Make `cache` optional * Fix cosmiconfig type * Use `@ts-expect-error` for private property access * Add type annotation for validate * Fix type errors for `OptionInfo` * Add `@ts-expect-error` * Fix type of `normalizeOptions` * Fix `OptionInfo` type * Add `@ts-expect-error` for `option-normalizer` * Avoid type error * Fix typo * Add types for lodash fns Co-authored-by: fisker Cheung --- package.json | 1 - src/cli/options/create-minimist-options.js | 4 +- src/cli/options/parse-cli-arguments.js | 2 +- src/cli/usage.js | 2 +- src/cli/utils.js | 37 ++++++++++++++++++- src/common/create-ignorer.js | 2 +- src/common/get-file-info.js | 2 +- src/common/load-plugins.js | 6 +-- src/config/resolve-config.js | 29 ++++++++------- src/index.js | 6 +++ src/main/core-options.js | 2 +- src/main/multiparser.js | 2 + src/main/options-normalizer.js | 28 ++++++++++++-- src/main/support.js | 6 +++ src/utils/partition.js | 20 ++++++++++ src/utils/uniq-by-key.js | 24 ++++++++++++ tests/format/markdown/auto-link/jsfmt.spec.js | 8 +++- tests/integration/__tests__/file-info.js | 5 +-- website/playground/sidebar/SidebarOptions.js | 2 +- 19 files changed, 155 insertions(+), 33 deletions(-) create mode 100644 src/utils/partition.js create mode 100644 src/utils/uniq-by-key.js diff --git a/package.json b/package.json index 6f5d50c2a..b2691d5db 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "leven": "4.0.0", "lines-and-columns": "2.0.3", "linguist-languages": "7.15.0", - "lodash": "4.17.21", "mem": "9.0.2", "meriyah": "4.2.1", "micromatch": "4.0.5", diff --git a/src/cli/options/create-minimist-options.js b/src/cli/options/create-minimist-options.js index baaa4cf46..fe0deb200 100644 --- a/src/cli/options/create-minimist-options.js +++ b/src/cli/options/create-minimist-options.js @@ -1,6 +1,8 @@ "use strict"; -const partition = require("lodash/partition"); +const { + utils: { partition }, +} = require("../prettier-internal.js"); module.exports = function createMinimistOptions(detailedOptions) { const [boolean, string] = partition( diff --git a/src/cli/options/parse-cli-arguments.js b/src/cli/options/parse-cli-arguments.js index 66433266e..ba3142162 100644 --- a/src/cli/options/parse-cli-arguments.js +++ b/src/cli/options/parse-cli-arguments.js @@ -1,6 +1,6 @@ "use strict"; -const pick = require("lodash/pick"); const camelCase = require("camelcase"); +const { pick } = require("../utils.js"); const getContextOptions = require("./get-context-options.js"); const minimist = require("./minimist.js"); const createMinimistOptions = require("./create-minimist-options.js"); diff --git a/src/cli/usage.js b/src/cli/usage.js index e1be6badd..d74bdb237 100644 --- a/src/cli/usage.js +++ b/src/cli/usage.js @@ -1,8 +1,8 @@ "use strict"; -const groupBy = require("lodash/groupBy"); const camelCase = require("camelcase"); const constant = require("./constant.js"); +const { groupBy } = require("./utils.js"); const OPTION_USAGE_THRESHOLD = 25; const CHOICE_USAGE_MARGIN = 3; diff --git a/src/cli/utils.js b/src/cli/utils.js index 6c0bff9fd..3fc2637dd 100644 --- a/src/cli/utils.js +++ b/src/cli/utils.js @@ -3,4 +3,39 @@ // eslint-disable-next-line no-console const printToScreen = console.log.bind(console); -module.exports = { printToScreen }; +/** + * @template Obj + * @template Key + * @param {Array} array + * @param {(value: Obj) => Key} iteratee + * @returns {{[p in Key]: T}} + */ +function groupBy(array, iteratee) { + const result = Object.create(null); + + for (const value of array) { + const key = iteratee(value); + + if (Array.isArray(result[key])) { + result[key].push(value); + } else { + result[key] = [value]; + } + } + + return result; +} + +/** + * @template Obj + * @template {keyof Obj} Keys + * @param {Obj} object + * @param {Array} keys + * @returns {{[key in Keys]: Obj[key]}} + */ +function pick(object, keys) { + const entries = keys.map((key) => [key, object[key]]); + return Object.fromEntries(entries); +} + +module.exports = { printToScreen, groupBy, pick }; diff --git a/src/common/create-ignorer.js b/src/common/create-ignorer.js index 4ccfc4121..5bae530ad 100644 --- a/src/common/create-ignorer.js +++ b/src/common/create-ignorer.js @@ -1,7 +1,7 @@ "use strict"; const path = require("path"); -const ignore = require("ignore"); +const ignore = require("ignore").default; const getFileContentOrNull = require("../utils/get-file-content-or-null.js"); /** diff --git a/src/common/get-file-info.js b/src/common/get-file-info.js index d01d1ee95..e6851e39f 100644 --- a/src/common/get-file-info.js +++ b/src/common/get-file-info.js @@ -6,7 +6,7 @@ const config = require("../config/resolve-config.js"); const createIgnorer = require("./create-ignorer.js"); /** - * @typedef {{ ignorePath?: string, withNodeModules?: boolean, plugins: object }} FileInfoOptions + * @typedef {{ ignorePath?: string, withNodeModules?: boolean, plugins: object, resolveConfig?: boolean }} FileInfoOptions * @typedef {{ ignored: boolean, inferredParser: string | null }} FileInfoResult */ diff --git a/src/common/load-plugins.js b/src/common/load-plugins.js index 374730ed4..fd520ef1d 100644 --- a/src/common/load-plugins.js +++ b/src/common/load-plugins.js @@ -2,9 +2,9 @@ const fs = require("fs"); const path = require("path"); -const uniqBy = require("lodash/uniqBy"); -const partition = require("lodash/partition"); const fastGlob = require("fast-glob"); +const partition = require("../utils/partition.js"); +const uniqByKey = require("../utils/uniq-by-key.js"); const internalPlugins = require("../languages.js"); const { default: mem, memClear } = require("../../vendors/mem.js"); const thirdParty = require("./third-party.js"); @@ -91,7 +91,7 @@ function load(plugins, pluginSearchDirs) { ); const externalPlugins = [ - ...uniqBy( + ...uniqByKey( [...externalManualLoadPluginInfos, ...externalAutoLoadPluginInfos], "requirePath" ).map((externalPluginInfo) => ({ diff --git a/src/config/resolve-config.js b/src/config/resolve-config.js index 560ac428e..e5ee80221 100644 --- a/src/config/resolve-config.js +++ b/src/config/resolve-config.js @@ -6,17 +6,21 @@ const thirdParty = require("../common/third-party.js"); const loadToml = require("../utils/load-toml.js"); const loadJson5 = require("../utils/load-json5.js"); +const partition = require("../utils/partition.js"); const resolve = require("../common/resolve.js"); const { default: mem, memClear } = require("../../vendors/mem.js"); const resolveEditorConfig = require("./resolve-config-editorconfig.js"); /** - * @typedef {import("cosmiconfig/dist/Explorer").Explorer} Explorer - * @typedef {{sync: boolean; cache: boolean }} Options + * @typedef {ReturnType} Explorer + * @typedef {ReturnType} SyncExplorer + * @typedef {{sync?: boolean; cache?: boolean }} Options */ /** - * @type {(opts: Options) => Explorer} + * @template {Options} Opts + * @param {Opts} opts + * @return {Opts["sync"] extends true ? SyncExplorer : Explorer} */ const getExplorerMemoized = mem( (opts) => { @@ -67,8 +71,9 @@ const getExplorerMemoized = mem( ); /** - * @param {Options} opts - * @return {Explorer} + * @template {Options} Opts + * @param {Opts} opts + * @return {Opts["sync"] extends true ? SyncExplorer : Explorer} */ function getExplorer(opts) { // Normalize opts before passing to a memoized function @@ -85,6 +90,7 @@ function _resolveConfig(filePath, opts, sync) { }; const { load, search } = getExplorer(loadOpts); const loadEditorConfig = resolveEditorConfig.getLoadFunction(loadOpts); + /** @type {[any, any]} */ const arr = [ opts.config ? load(opts.config) : search(filePath), loadEditorConfig(filePath), @@ -169,15 +175,10 @@ function pathMatchesGlobs(filePath, patterns, excludedPatterns) { const patternList = Array.isArray(patterns) ? patterns : [patterns]; // micromatch always matches against basename when the option is enabled // use only patterns without slashes with it to match minimatch behavior - const withSlashes = []; - const withoutSlashes = []; - for (const pattern of patternList) { - if (pattern.includes("/")) { - withSlashes.push(pattern); - } else { - withoutSlashes.push(pattern); - } - } + const [withSlashes, withoutSlashes] = partition(patternList, (pattern) => + pattern.includes("/") + ); + return ( micromatch.isMatch(filePath, withoutSlashes, { ignore: excludedPatterns, diff --git a/src/index.js b/src/index.js index ed6e6884b..dae7138ec 100644 --- a/src/index.js +++ b/src/index.js @@ -24,6 +24,11 @@ function _withPlugins( }; } +/** + * @param {*} fn + * @param {*} optsArgIdx + * @returns {*} + */ function withPlugins(fn, optsArgIdx) { const resultingFn = _withPlugins(fn, optsArgIdx); if (fn.sync) { @@ -75,6 +80,7 @@ module.exports = { utils: { arrayify: require("./utils/arrayify.js"), getLast: require("./utils/get-last.js"), + partition: require("./utils/partition.js"), isNonEmptyArray: require("./common/util.js").isNonEmptyArray, }, }, diff --git a/src/main/core-options.js b/src/main/core-options.js index 5992da931..fa448b2fd 100644 --- a/src/main/core-options.js +++ b/src/main/core-options.js @@ -14,7 +14,7 @@ const CATEGORY_SPECIAL = "Special"; * @typedef {Object} OptionInfo * @property {string} [since] - available since version * @property {string} category - * @property {'int' | 'boolean' | 'choice' | 'path'} type + * @property {'int' | 'boolean' | 'choice' | 'path' | 'string' | 'flag'} type * @property {boolean} [array] - indicate it's an array of the specified type * @property {OptionValueInfo} [default] * @property {OptionRangeInfo} [range] - for type int diff --git a/src/main/multiparser.js b/src/main/multiparser.js index 3af8b24f7..0de83cd09 100644 --- a/src/main/multiparser.js +++ b/src/main/multiparser.js @@ -49,7 +49,9 @@ function textToDoc( const astComments = ast.comments; delete ast.comments; comments.attach(astComments, ast, text, nextOptions); + // @ts-expect-error -- Casting to `unique symbol` isn't allowed in JSDoc comment nextOptions[Symbol.for("comments")] = astComments || []; + // @ts-expect-error -- Casting to `unique symbol` isn't allowed in JSDoc comment nextOptions[Symbol.for("tokens")] = ast.tokens || []; const doc = printAstToDoc(ast, nextOptions); diff --git a/src/main/options-normalizer.js b/src/main/options-normalizer.js index 9fe5fe0d2..17b2eb5c3 100644 --- a/src/main/options-normalizer.js +++ b/src/main/options-normalizer.js @@ -3,6 +3,10 @@ const vnopts = require("vnopts"); const getLast = require("../utils/get-last.js"); +/** + * @typedef {import("./support").NamedOptionInfo} NamedOptionInfo + */ + const cliDescriptor = { key: (key) => (key.length === 1 ? `-${key}` : `--${key}`), value: (value) => vnopts.apiDescriptor.value(value), @@ -55,15 +59,20 @@ const getFlagSchema = ({ colorsModule, levenshteinDistance }) => let hasDeprecationWarned; +/** + * @param {*} options + * @param {*} optionInfos + * @param {{ logger?: false; isCLI?: boolean; passThrough?: boolean; colorsModule?: any; levenshteinDistance?: any }} param2 + */ function normalizeOptions( options, optionInfos, { - logger, + logger = false, isCLI = false, passThrough = false, - colorsModule, - levenshteinDistance, + colorsModule = null, + levenshteinDistance = null, } = {} ) { const unknown = !passThrough @@ -95,12 +104,14 @@ function normalizeOptions( const shouldSuppressDuplicateDeprecationWarnings = logger !== false; if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) { + // @ts-expect-error normalizer._hasDeprecationWarned = hasDeprecationWarned; } const normalized = normalizer.normalize(options); if (shouldSuppressDuplicateDeprecationWarnings) { + // @ts-expect-error hasDeprecationWarned = normalizer._hasDeprecationWarned; } @@ -134,6 +145,7 @@ function optionInfosToSchemas( if (optionInfo.alias && isCLI) { schemas.push( vnopts.AliasSchema.create({ + // @ts-expect-error name: optionInfo.alias, sourceName: optionInfo.name, }) @@ -144,6 +156,11 @@ function optionInfosToSchemas( return schemas; } +/** + * @param {NamedOptionInfo} optionInfo + * @param {any} param1 + * @returns + */ function optionInfoToSchema( optionInfo, { isCLI, optionInfos, colorsModule, levenshteinDistance } @@ -152,6 +169,7 @@ function optionInfoToSchema( if (name === "plugin-search-dir" || name === "pluginSearchDirs") { return vnopts.AnySchema.create({ + // @ts-expect-error name, preprocess(value) { if (value === false) { @@ -160,6 +178,9 @@ function optionInfoToSchema( value = Array.isArray(value) ? value : [value]; return value; }, + /** + * @param {Array | false} value + */ validate(value) { if (value === false) { return true; @@ -260,6 +281,7 @@ function optionInfoToSchema( ? vnopts.ArraySchema.create({ ...(isCLI ? { preprocess: (v) => (Array.isArray(v) ? v : [v]) } : {}), ...handlers, + // @ts-expect-error valueSchema: SchemaConstructor.create(parameters), }) : SchemaConstructor.create({ ...parameters, ...handlers }); diff --git a/src/main/support.js b/src/main/support.js index 6bf3ad8d8..c298ff180 100644 --- a/src/main/support.js +++ b/src/main/support.js @@ -9,6 +9,11 @@ const arrayify = require("../utils/arrayify.js"); const currentVersion = require("../../package.json").version; const coreOptions = require("./core-options.js").options; +/** + * @typedef {import("./core-options").OptionInfo} OptionInfo + * @typedef {{ name: string; pluginDefaults: Array } & OptionInfo} NamedOptionInfo + */ + /** * Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version * of this function created by `withPlugins`. Don't pass them here directly. @@ -18,6 +23,7 @@ const coreOptions = require("./core-options.js").options; * @param {boolean=} param0.showUnreleased * @param {boolean=} param0.showDeprecated * @param {boolean=} param0.showInternal + * @return {{ languages: Array, options: Array }} */ function getSupportInfo({ plugins = [], diff --git a/src/utils/partition.js b/src/utils/partition.js new file mode 100644 index 000000000..4d6b92a46 --- /dev/null +++ b/src/utils/partition.js @@ -0,0 +1,20 @@ +"use strict"; + +/** + * @template Element + * @param {Array} array + * @param {(value: Element) => boolean} predicate + * @returns {[Array, Array]} + */ +function partition(array, predicate) { + /** @type {[Array, Array]} */ + const result = [[], []]; + + for (const value of array) { + result[predicate(value) ? 0 : 1].push(value); + } + + return result; +} + +module.exports = partition; diff --git a/src/utils/uniq-by-key.js b/src/utils/uniq-by-key.js new file mode 100644 index 000000000..ad8b249c0 --- /dev/null +++ b/src/utils/uniq-by-key.js @@ -0,0 +1,24 @@ +"use strict"; + +/** + * @template {object} Element + * @param {Array} array + * @param {string | number | symbol} key + * @returns + */ +function uniqByKey(array, key) { + const result = []; + const seen = new Set(); + + for (const element of array) { + const value = element[key]; + if (!seen.has(value)) { + seen.add(value); + result.push(element); + } + } + + return result; +} + +module.exports = uniqByKey; diff --git a/tests/format/markdown/auto-link/jsfmt.spec.js b/tests/format/markdown/auto-link/jsfmt.spec.js index df6f3d64a..176a31f18 100644 --- a/tests/format/markdown/auto-link/jsfmt.spec.js +++ b/tests/format/markdown/auto-link/jsfmt.spec.js @@ -1,4 +1,10 @@ -const flat = require("lodash/flatten"); +/** + * @template T + * @param {Array>} array + * @returns {Array} + */ +// eslint-disable-next-line unicorn/prefer-spread +const flat = (array) => [].concat(...array); const urls = [ "http://www.example.com:80/_a", diff --git a/tests/integration/__tests__/file-info.js b/tests/integration/__tests__/file-info.js index 4ba53362c..d0d8f9938 100644 --- a/tests/integration/__tests__/file-info.js +++ b/tests/integration/__tests__/file-info.js @@ -2,7 +2,6 @@ const path = require("path"); const fs = require("fs"); -const fromPairs = require("lodash/fromPairs"); const prettier = require("prettier-local"); const runPrettier = require("../run-prettier.js"); @@ -162,7 +161,7 @@ test("API getFileInfo.sync with filepath only", () => { }); describe("API getFileInfo resolveConfig", () => { - const files = fromPairs( + const files = Object.fromEntries( ["foo", "js", "bar", "css"].map((ext) => [ ext, path.resolve( @@ -269,7 +268,7 @@ describe("API getFileInfo resolveConfig", () => { }); describe("API getFileInfo resolveConfig when no config is present", () => { - const files = fromPairs( + const files = Object.fromEntries( ["foo", "js"].map((ext) => [ ext, path.resolve(path.join(__dirname, `../cli/non-exists-dir/file.${ext}`)), diff --git a/website/playground/sidebar/SidebarOptions.js b/website/playground/sidebar/SidebarOptions.js index c41c3c484..085a5ecba 100644 --- a/website/playground/sidebar/SidebarOptions.js +++ b/website/playground/sidebar/SidebarOptions.js @@ -1,5 +1,5 @@ import * as React from "react"; -import groupBy from "lodash/groupBy"; +import { groupBy } from "../../../src/cli/utils.js"; import { SidebarCategory } from "./components.js"; import Option from "./options.js"; From 3390aa12b8f4132c9b5b67fd75efb9b634d27f03 Mon Sep 17 00:00:00 2001 From: Ansgar Prause <4215065+ansgarprause@users.noreply.github.com> Date: Sun, 10 Apr 2022 13:20:33 +0200 Subject: [PATCH 15/49] Fix groupBy usage in playground sidebar (#12642) The groupBy function added in fa3b95c2e1a3a3351dc1b0168aa2c26f0cc4e9b3 does not support the property name shorthand from lodash. --- website/playground/sidebar/SidebarOptions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/playground/sidebar/SidebarOptions.js b/website/playground/sidebar/SidebarOptions.js index 085a5ecba..d47347c71 100644 --- a/website/playground/sidebar/SidebarOptions.js +++ b/website/playground/sidebar/SidebarOptions.js @@ -10,7 +10,7 @@ export default function SidebarOptions({ optionValues, onOptionValueChange, }) { - const options = groupBy(availableOptions, "category"); + const options = groupBy(availableOptions, (option) => option.category); return categories.map((category) => options[category] ? ( From 45354643db403f950a9dfb405b3b89c769910c7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Apr 2022 19:23:44 +0800 Subject: [PATCH 16/49] Build(deps-dev): Bump eslint from 8.12.0 to 8.13.0 (#12638) Bumps [eslint](https://github.com/eslint/eslint) from 8.12.0 to 8.13.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.12.0...v8.13.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b2691d5db..9549b5aae 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "enquirer": "2.3.6", "esbuild": "0.14.34", "esbuild-visualizer": "0.3.1", - "eslint": "8.12.0", + "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-compat": "4.0.2", diff --git a/yarn.lock b/yarn.lock index 6a68c5f85..1338b439f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3114,10 +3114,10 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" - integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== +eslint@8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.13.0.tgz#6fcea43b6811e655410f5626cfcf328016badcd7" + integrity sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ== dependencies: "@eslint/eslintrc" "^1.2.1" "@humanwhocodes/config-array" "^0.9.2" From e2d698694622a1e5205f6c5389895d820e08dbda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Apr 2022 19:24:45 +0800 Subject: [PATCH 17/49] Build(deps-dev): Bump eslint-plugin-jest from 26.1.3 to 26.1.4 (#12636) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.1.3 to 26.1.4. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v26.1.3...v26.1.4) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9549b5aae..ca1b76cc9 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "eslint-formatter-friendly": "7.0.0", "eslint-plugin-compat": "4.0.2", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jest": "26.1.3", + "eslint-plugin-jest": "26.1.4", "eslint-plugin-prettier-internal-rules": "2.0.1", "eslint-plugin-react": "7.29.4", "eslint-plugin-regexp": "1.6.0", diff --git a/yarn.lock b/yarn.lock index 1338b439f..c23a06ce7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3015,10 +3015,10 @@ eslint-plugin-import@2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jest@26.1.3: - version "26.1.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.3.tgz#e722e5efeea18aa9dec7c7349987b641db19feb7" - integrity sha512-Pju+T7MFpo5VFhFlwrkK/9jRUu18r2iugvgyrWOnnGRaVTFFmFXp+xFJpHyqmjjLmGJPKLeEFLVTAxezkApcpQ== +eslint-plugin-jest@26.1.4: + version "26.1.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.4.tgz#8e3410093ff4439d0c3a371add5bf9e05623a57a" + integrity sha512-wgqxujmqc2qpvZqMFWCh6Cniqc8lWpapvXt9j/19DmBDqeDaYhJrSRezYR1SKyemvjx+9e9kny/dgRahraHImA== dependencies: "@typescript-eslint/utils" "^5.10.0" From 9942a16d68424cbd684eaa14af125c29090794f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Apr 2022 19:26:54 +0800 Subject: [PATCH 18/49] Build(deps): Bump actions/upload-artifact from 2 to 3 (#12634) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/bundler-friendly.yml | 2 +- .github/workflows/prod-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bundler-friendly.yml b/.github/workflows/bundler-friendly.yml index 710e16fcd..ded819905 100644 --- a/.github/workflows/bundler-friendly.yml +++ b/.github/workflows/bundler-friendly.yml @@ -30,7 +30,7 @@ jobs: run: yarn build - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: dist path: dist diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 79635357a..1e09859f1 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -27,7 +27,7 @@ jobs: run: yarn build - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: dist path: dist From 7673b160939e923280072b153582bb4996e737d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Apr 2022 19:28:35 +0800 Subject: [PATCH 19/49] Build(deps): Bump codecov/codecov-action from 2.1.0 to 3.0.0 (#12633) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.0.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3.0.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dev-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index c0a25e69e..1b829139c 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -60,7 +60,7 @@ jobs: run: yarn test --maxWorkers=2 - name: Upload Coverage - uses: codecov/codecov-action@v2.1.0 + uses: codecov/codecov-action@v3.0.0 if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: fail_ci_if_error: true @@ -72,7 +72,7 @@ jobs: PRETTIER_FALLBACK_RESOLVE: true - name: Upload Coverage (PRETTIER_FALLBACK_RESOLVE) - uses: codecov/codecov-action@v2.1.0 + uses: codecov/codecov-action@v3.0.0 if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: fail_ci_if_error: true From 8ac16a1af5cb514e668b117d107993ec88937a16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 00:51:16 +0800 Subject: [PATCH 20/49] Build(deps): Bump actions/download-artifact from 2 to 3 (#12632) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/bundler-friendly.yml | 2 +- .github/workflows/prod-test.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bundler-friendly.yml b/.github/workflows/bundler-friendly.yml index ded819905..063b2cfa7 100644 --- a/.github/workflows/bundler-friendly.yml +++ b/.github/workflows/bundler-friendly.yml @@ -50,7 +50,7 @@ jobs: uses: actions/setup-node@v2.5.1 - name: Download Artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: dist path: dist diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 1e09859f1..19ad0f940 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -49,7 +49,7 @@ jobs: run: yarn install --frozen-lockfile - name: Download Artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: dist path: dist @@ -107,7 +107,7 @@ jobs: run: yarn install --frozen-lockfile - name: Download Artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: dist path: dist @@ -149,7 +149,7 @@ jobs: node-version: "0.10.48" - name: Download Artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: dist path: dist From 3771cead82f854afe892f54bd493394972451da2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 00:51:46 +0800 Subject: [PATCH 21/49] Build(deps-dev): Bump cspell from 5.19.5 to 5.19.7 (#12635) Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 5.19.5 to 5.19.7. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/compare/v5.19.5...v5.19.7) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 136 +++++++++++++++++++++++++++------------------------ 2 files changed, 72 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index ca1b76cc9..c663b4ec8 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "browserslist-to-esbuild": "1.1.1", "core-js": "3.21.1", "cross-env": "7.0.3", - "cspell": "5.19.5", + "cspell": "5.19.7", "enquirer": "2.3.6", "esbuild": "0.14.34", "esbuild-visualizer": "0.3.1", diff --git a/yarn.lock b/yarn.lock index c23a06ce7..d7c5e1bd0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,16 +955,16 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cspell/cspell-bundled-dicts@^5.19.5": - version "5.19.5" - resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.19.5.tgz#09906e24a13dd919ba9e19d0b7a93e9ef2383d28" - integrity sha512-qXW99H+S/529cTOtRBTPiTV1Ay+I2+kcF5lfVblSRsij7fBM6d99dB3Fg6oL0i6okRwOUNFAV4qbxgg7zxA3wA== +"@cspell/cspell-bundled-dicts@^5.19.7": + version "5.19.7" + resolved "https://registry.yarnpkg.com/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-5.19.7.tgz#7e6f6990bbc73ff9b5c0b7ca17cb693c58ae06ee" + integrity sha512-9h2KdI3yKODc8rAxkgB5UZb6RLwwEO25Fo91vnOtM1xfwLhX/scMACU1DoqtnTVaE73HoQ46DYAZAAq/OloRFQ== dependencies: "@cspell/dict-ada" "^2.0.0" "@cspell/dict-aws" "^2.0.0" - "@cspell/dict-bash" "^2.0.1" + "@cspell/dict-bash" "^2.0.2" "@cspell/dict-companies" "^2.0.3" - "@cspell/dict-cpp" "^2.0.0" + "@cspell/dict-cpp" "^2.0.2" "@cspell/dict-cryptocurrencies" "^2.0.0" "@cspell/dict-csharp" "^2.0.1" "@cspell/dict-css" "^2.0.0" @@ -977,6 +977,7 @@ "@cspell/dict-filetypes" "^2.0.1" "@cspell/dict-fonts" "^2.0.0" "@cspell/dict-fullstack" "^2.0.4" + "@cspell/dict-git" "^1.0.1" "@cspell/dict-golang" "^2.0.0" "@cspell/dict-haskell" "^2.0.0" "@cspell/dict-html" "^3.0.1" @@ -1000,15 +1001,15 @@ "@cspell/dict-typescript" "^2.0.0" "@cspell/dict-vue" "^2.0.2" -"@cspell/cspell-pipe@^5.19.5": - version "5.19.5" - resolved "https://registry.yarnpkg.com/@cspell/cspell-pipe/-/cspell-pipe-5.19.5.tgz#e780d22523d94317f0462683ba61c39a486919a8" - integrity sha512-dNCMYDgjeWKw7KIptjxHu17UfeT3oiqQk6LkSyi3BewUxpnlLLO7EsxR6GRW+RVU/MrPXe7BF9WgF0gO8m+8cQ== +"@cspell/cspell-pipe@^5.19.7": + version "5.19.7" + resolved "https://registry.yarnpkg.com/@cspell/cspell-pipe/-/cspell-pipe-5.19.7.tgz#398bf6452ce83144f716b60f0f03bd8fb6f80774" + integrity sha512-C2+qovrXyZtoM+IcyMuwwYieoGBwwnWORat+j7bkIkVHf6Pa9spxY3D1IdLt04PqWBKWKHb1g9KzJzw5grBqZw== -"@cspell/cspell-types@^5.19.5": - version "5.19.5" - resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.19.5.tgz#10801d6298f60539d244f3256ad5b5e26f3ea5d3" - integrity sha512-tOzCzuQQ4DdgfnI6+FGBPOVL/1JbH0pWtoOinPoU93/pH29XOKGW2I24HLeESzgskfoZGK274wMFQfGp6oJw9g== +"@cspell/cspell-types@^5.19.7": + version "5.19.7" + resolved "https://registry.yarnpkg.com/@cspell/cspell-types/-/cspell-types-5.19.7.tgz#9888598b976451df61cc980f0b3cc74379d7a358" + integrity sha512-xL9a0oE8kPQ/GCkE/bxE5DTCMTctCpk7tdrhYG26wVbMK1VRGo8fv9w+vRVzXgTfF5jTxolEA1LTtfVBuik1MA== "@cspell/dict-ada@^2.0.0": version "2.0.0" @@ -1020,20 +1021,20 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-aws/-/dict-aws-2.0.0.tgz#9af72af4e59e96029dd4335271d87784843cb7dd" integrity sha512-NKz7pDZ7pwj/b33i3f4WLpC1rOOUMmENwYgftxU+giU2YBeKM2wZbMTSEIzsrel56r0UlQYmdIVlP/B4nnVaoQ== -"@cspell/dict-bash@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-2.0.1.tgz#76f6be974e9a968235d4e1b04c4ae76b16169057" - integrity sha512-pBx3T/5w7fPF8XD5cx3NwtRFvNpQYmYqzM043NKP2hDmlx4uFwbH599Lvt5mwCMZKfIoRXaNUQvq7se2gstQjw== +"@cspell/dict-bash@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@cspell/dict-bash/-/dict-bash-2.0.2.tgz#8bc3e0a6c1b9c0df1bd9a1b7694c58d9843fd16b" + integrity sha512-ASIgI/LmV2TYrD4mtk+gm4XmUSTRomOyRt7NDWyBpEww/AeawC2O2NH6FosyUT6dUU3GaXt2wgJRN7R78n1SGg== "@cspell/dict-companies@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@cspell/dict-companies/-/dict-companies-2.0.3.tgz#9e0f93a2cc884ff0b98d019123d1dbfb853da872" integrity sha512-O622rMAaHm85AmqNyMki5je8HB/1XlTKbGOXh2UUhooI5qdgdfrjTQ6VBuHwHrfEfuODBHYTNYXVB2m23XqHCg== -"@cspell/dict-cpp@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-2.0.0.tgz#d5f04b693d96d41d67050cfe3ca0d342e141347b" - integrity sha512-EflHLs2pHEEXZM6jPfTGR/KHZKQtJlvzqgkg1zaA1YKv5HQNw9Wy5KVPGEV2bjPcFsZJO3xXjO1KBZcoOPjPmA== +"@cspell/dict-cpp@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@cspell/dict-cpp/-/dict-cpp-2.0.2.tgz#201b247f4a238e891b69ff32e737332570cccfa7" + integrity sha512-2Z2mOFQ4pSBoQeUaa/Cn0KBwkcRDdWSdBMj8bjGlhl9hXI342drAJMXg8tWsQa4l6J0GJUdmxz6RHmYRSzZJoQ== "@cspell/dict-cryptocurrencies@^2.0.0": version "2.0.0" @@ -1095,6 +1096,11 @@ resolved "https://registry.yarnpkg.com/@cspell/dict-fullstack/-/dict-fullstack-2.0.4.tgz#d7d1c80863d9fd9bda51346edcc5a72de2cf81b4" integrity sha512-+JtYO58QAXnetRN+MGVzI8YbkbFTLpYfl/Cw/tmNqy7U1IDVC4sTXQ2pZvbbeKQWFHBqYvBs0YASV+mTouXYBw== +"@cspell/dict-git@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@cspell/dict-git/-/dict-git-1.0.1.tgz#9de5ab2532abcdc8b10bd83ccb1f5e5dae0b6067" + integrity sha512-Rk+eTof/9inF11lvxmkCRK+gODatA3qai8kSASv6OG/JfPvpj7fTHErx/rdgPw/LOTDUafnoTjTYmj7B2MOQXg== + "@cspell/dict-golang@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@cspell/dict-golang/-/dict-golang-2.0.0.tgz#a392533780c9fc3dc959f1358d09f7a6c6d82656" @@ -2449,42 +2455,42 @@ crypto-random-string@^4.0.0: dependencies: type-fest "^1.0.1" -cspell-gitignore@^5.19.5: - version "5.19.5" - resolved "https://registry.yarnpkg.com/cspell-gitignore/-/cspell-gitignore-5.19.5.tgz#42e1fbdeabb7bfce073a111d1d77f22dd31253d7" - integrity sha512-Wj16pnPmx7PGd2PcVAEsxWnTtfY4qNzUBtfTqo5VEd23WME6SgEtffxm4eSRpHYZmmDclir+Tbb9yQAsZajDeQ== +cspell-gitignore@^5.19.7: + version "5.19.7" + resolved "https://registry.yarnpkg.com/cspell-gitignore/-/cspell-gitignore-5.19.7.tgz#08c073fd3fda72760816c2283822170f4c102720" + integrity sha512-rEqlN6wigNj4P/4Z3QCI1P56KhKkPtXNBpGMXC5CbxIK/NTtn3cLaqHKIZp92pypEnU077lxSCSqRRYCPbg/6A== dependencies: - cspell-glob "^5.19.5" + cspell-glob "^5.19.7" find-up "^5.0.0" -cspell-glob@^5.19.5: - version "5.19.5" - resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.19.5.tgz#a25ef16ed91b876bd9764dbedf5ac3ae101bf071" - integrity sha512-fnrUNLNY9CMsr5J1wRPoGpx7aastD05wEZ/NL+Xd7uEmuU+R7gViOjyOPlUMFH+YARwY0youHRiobkl7pJNngw== +cspell-glob@^5.19.7: + version "5.19.7" + resolved "https://registry.yarnpkg.com/cspell-glob/-/cspell-glob-5.19.7.tgz#67a43c566addd2f6cba579f6eae4bbefbf9eb364" + integrity sha512-fqlF7oqYTT2A3SRfQr7gzN21fwPoRO9IGKec1L3QeGkni5UPDxGrM2a5z+oLaYs2GN5pEf29BXVlN7dq0jVxIg== dependencies: micromatch "^4.0.5" -cspell-io@^5.19.5: - version "5.19.5" - resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.19.5.tgz#e44eeda1b8083b666f4ab9940e0d167b4fa2040a" - integrity sha512-R6q1Dor6mfs1VBpuXVlcm/Vvr96GclO/BtNDK/8ppcm22Ct1VF24MG2itoYO7296dOgR1H4HkndvvEgx3p8fzw== +cspell-io@^5.19.7: + version "5.19.7" + resolved "https://registry.yarnpkg.com/cspell-io/-/cspell-io-5.19.7.tgz#ce49d4aaeae19206ccd29c5d90599fa675ea5bac" + integrity sha512-SEy8XkuOhvwleGjh336EBYj5HlH1J5FrCI5GxxGiU2g8zvWlBPQmaCfQPPO4tnDrrXtK76rZvolBu1jfCmWwQA== -cspell-lib@^5.19.5: - version "5.19.5" - resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.19.5.tgz#653242ec9b06005f478d8f8f0fdb00f4c6c1dadd" - integrity sha512-6HOJ7O+vDYzJs49fHZI5xzsL5TxeR7WsfjWvx1BwgRs1rHdA9/8KFZFX2DJazKRGm+kL1kBO0VJlaF0tvVsjzw== +cspell-lib@^5.19.7: + version "5.19.7" + resolved "https://registry.yarnpkg.com/cspell-lib/-/cspell-lib-5.19.7.tgz#91edde38af793bcfb69f5fddf59db6ce5e6fe0cb" + integrity sha512-d4ewH1RBgcBE9NqAh0FexmVQ6YvkDQv9XOysskeDH+G9wm975owENUU/mBd8AyBt2b4YXL/FoLtaKd/7MRoNDA== dependencies: - "@cspell/cspell-bundled-dicts" "^5.19.5" - "@cspell/cspell-pipe" "^5.19.5" - "@cspell/cspell-types" "^5.19.5" + "@cspell/cspell-bundled-dicts" "^5.19.7" + "@cspell/cspell-pipe" "^5.19.7" + "@cspell/cspell-types" "^5.19.7" clear-module "^4.1.2" comment-json "^4.2.2" configstore "^5.0.1" cosmiconfig "^7.0.1" - cspell-glob "^5.19.5" - cspell-io "^5.19.5" - cspell-trie-lib "^5.19.5" - fast-equals "^3.0.0" + cspell-glob "^5.19.7" + cspell-io "^5.19.7" + cspell-trie-lib "^5.19.7" + fast-equals "^3.0.1" find-up "^5.0.0" fs-extra "^10.0.1" gensequence "^3.1.1" @@ -2494,33 +2500,33 @@ cspell-lib@^5.19.5: vscode-languageserver-textdocument "^1.0.4" vscode-uri "^3.0.3" -cspell-trie-lib@^5.19.5: - version "5.19.5" - resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.19.5.tgz#e18125c3f56b280109face14c28f7137b3469895" - integrity sha512-yNOmd7uzLiu5UDpbIfJlORx8rJZltLz/ebostAV7UC3wzrOIQgS8xKoFfqiE0iWxIMwmV9eyydVcyzh5grx0gg== +cspell-trie-lib@^5.19.7: + version "5.19.7" + resolved "https://registry.yarnpkg.com/cspell-trie-lib/-/cspell-trie-lib-5.19.7.tgz#ce3841f95ace03730ce896089d34c92b5e2d343d" + integrity sha512-qr0HS2hGuyIQhDGG5li0nqIjVi039iPRHR8wpeDoSO0YIBCll22i/VlvW3CSmqXLaP5RRoAc9txiZkIGob6DkQ== dependencies: - "@cspell/cspell-pipe" "^5.19.5" + "@cspell/cspell-pipe" "^5.19.7" fs-extra "^10.0.1" gensequence "^3.1.1" -cspell@5.19.5: - version "5.19.5" - resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.19.5.tgz#5f3bad212d11509534982a1d64c6bf6592be2ee8" - integrity sha512-LFKWBBOY6s1SYJcMlWmFP2ml3kxgzUcUCOY4JYDCAzA088gbBEiSN8sM0X6MhobsMJx4MchxjwveXFRP+1umyA== +cspell@5.19.7: + version "5.19.7" + resolved "https://registry.yarnpkg.com/cspell/-/cspell-5.19.7.tgz#4f6c6ff8baac1f3ace6693c63280a3b7a6b669ff" + integrity sha512-7/y+k708tv68+5lpN23Ew1/djx/EnG838zZ8W2ZDWCc6uRHutqRhpxsjMZr/MT3RHN44iKUj2MgT5+sfnhr4eg== dependencies: - "@cspell/cspell-pipe" "^5.19.5" + "@cspell/cspell-pipe" "^5.19.7" chalk "^4.1.2" commander "^9.1.0" - cspell-gitignore "^5.19.5" - cspell-glob "^5.19.5" - cspell-lib "^5.19.5" + cspell-gitignore "^5.19.7" + cspell-glob "^5.19.7" + cspell-lib "^5.19.7" fast-json-stable-stringify "^2.1.0" file-entry-cache "^6.0.1" fs-extra "^10.0.1" get-stdin "^8.0.0" glob "^7.2.0" imurmurhash "^0.1.4" - semver "^7.3.5" + semver "^7.3.6" strip-ansi "^6.0.1" vscode-uri "^3.0.3" @@ -3275,10 +3281,10 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-equals@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-3.0.0.tgz#efbe679d4c0d74040f61d4dda3e6bcb3bdccab82" - integrity sha512-Af7nSOpf7617idrFg0MJY6x7yVDPoO80aSwtKTC0afT8B/SsmvTpA+2a+uPLmhVF5IHmY5NPuBAA3dJrp55rJA== +fast-equals@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-3.0.1.tgz#1e1ae440c04a32478faf698527315cdcf3ee7db2" + integrity sha512-J9FxqqC9E/ja0C+SYhoG3Jl6pQuhP92HNcVC75xDEhB+GUzPnjEp3vMfPIxPprYZFfXS5hpVvvPCWUMiDSMS8Q== fast-glob@3.2.11, fast-glob@^3.2.7, fast-glob@^3.2.9: version "3.2.11" @@ -5822,7 +5828,7 @@ semver@7.3.5: dependencies: lru-cache "^6.0.0" -semver@7.3.6, semver@^7.3.2, semver@^7.3.5: +semver@7.3.6, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6: version "7.3.6" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b" integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w== From ae72b47477002b3534af762c6a889b2cead3e886 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 19:51:20 +0800 Subject: [PATCH 22/49] Build(deps-dev): Bump webpack from 5.71.0 to 5.72.0 in /website (#12637) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 48f1083fc..35e4ce0af 100644 --- a/website/package.json +++ b/website/package.json @@ -20,7 +20,7 @@ "concurrently": "7.1.0", "docusaurus": "1.14.7", "js-yaml": "4.1.0", - "webpack": "5.71.0", + "webpack": "5.72.0", "webpack-cli": "4.9.2" } } diff --git a/website/yarn.lock b/website/yarn.lock index e7ed311d2..d3358a50d 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -8209,10 +8209,10 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.71.0: - version "5.71.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.71.0.tgz#b01fcf379570b8c5ee06ca06c829ca168c951884" - integrity sha512-g4dFT7CFG8LY0iU5G8nBL6VlkT21Z7dcYDpJAEJV5Q1WLb9UwnFbrem1k7K52ILqEmomN7pnzWFxxE6SlDY56A== +webpack@5.72.0: + version "5.72.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.72.0.tgz#f8bc40d9c6bb489a4b7a8a685101d6022b8b6e28" + integrity sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" From c50f2bbe3075757840bbd7ed941647a9bde84266 Mon Sep 17 00:00:00 2001 From: Szymon Dzialowski Date: Tue, 12 Apr 2022 10:47:07 +0100 Subject: [PATCH 23/49] Please describe what prettier ignores by default (#12626) Co-authored-by: Szymon Dzialowski Co-authored-by: Szymon Dzialowski Co-authored-by: fisker Cheung --- docs/ignore.md | 21 +++++++++++++++++++ .../versioned_docs/version-stable/ignore.md | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/docs/ignore.md b/docs/ignore.md index 1cca65e41..2b5b7504f 100644 --- a/docs/ignore.md +++ b/docs/ignore.md @@ -24,6 +24,27 @@ coverage It’s recommended to have a `.prettierignore` in your project! This way you can run `prettier --write .` to make sure that everything is formatted (without mangling files you don’t want, or choking on generated files). And – your editor will know which files _not_ to format! +By default prettier ignores files in version control systems directories (".git", ".svn" and ".hg") and `node_modules` (if [`--with-node-modules` CLI option](cli.md#--with-node-modules) not specified) + +So by default it will be + +```js +**/.git +**/.svn +**/.hg +**/node_modules +``` + +and + +```js +**/.git +**/.svn +**/.hg +``` + +if [`--with-node-modules` CLI option](cli.md#--with-node-modules) provided + (See also the [`--ignore-path` CLI option](cli.md#--ignore-path).) ## JavaScript diff --git a/website/versioned_docs/version-stable/ignore.md b/website/versioned_docs/version-stable/ignore.md index f62f11492..24ae1b3e4 100644 --- a/website/versioned_docs/version-stable/ignore.md +++ b/website/versioned_docs/version-stable/ignore.md @@ -25,6 +25,27 @@ coverage It’s recommended to have a `.prettierignore` in your project! This way you can run `prettier --write .` to make sure that everything is formatted (without mangling files you don’t want, or choking on generated files). And – your editor will know which files _not_ to format! +By default prettier ignores files in version control systems directories (".git", ".svn" and ".hg") and `node_modules` (if [`--with-node-modules` CLI option](cli.md#--with-node-modules) not specified) + +So by default it will be + +```js +**/.git +**/.svn +**/.hg +**/node_modules +``` + +and + +```js +**/.git +**/.svn +**/.hg +``` + +if [`--with-node-modules` CLI option](cli.md#--with-node-modules) provided + (See also the [`--ignore-path` CLI option](cli.md#--ignore-path).) ## JavaScript From 8f7ca01e68876aa05fc5e1e089b797ce1ca6757f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 02:31:13 +0000 Subject: [PATCH 24/49] Build(deps-dev): Bump rollup-plugin-license from 2.6.1 to 2.7.0 (#12658) --- package.json | 2 +- yarn.lock | 41 ++++++++++++++++++++++++----------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index c663b4ec8..e7dd9242b 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "prettier": "2.6.2", "pretty-bytes": "6.0.0", "rimraf": "3.0.2", - "rollup-plugin-license": "2.6.1", + "rollup-plugin-license": "2.7.0", "snapshot-diff": "0.9.0", "tempy": "2.0.0" }, diff --git a/yarn.lock b/yarn.lock index d7c5e1bd0..ee4cb45eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4802,7 +4802,14 @@ lru-cache@^7.4.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.0.tgz#649aaeb294a56297b5cbc5d70f198dcc5ebe5747" integrity sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg== -magic-string@0.25.7, magic-string@^0.25.3: +magic-string@0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.1.tgz#ba9b651354fa9512474199acecf9c6dbe93f97fd" + integrity sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg== + dependencies: + sourcemap-codec "^1.4.8" + +magic-string@^0.25.3: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== @@ -4915,10 +4922,10 @@ mkdirp@1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -moment@2.29.1: - version "2.29.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" - integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== +moment@2.29.2: + version "2.29.2" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4" + integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg== ms@2.0.0: version "2.0.0" @@ -5219,10 +5226,10 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-name-regex@2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/package-name-regex/-/package-name-regex-2.0.5.tgz#5e3548ffe3dba340b9779d28a024bdb4a19f055b" - integrity sha512-F0lX+FBs/Bo7KWY6EuUXj+oarXU0Og1R2Zdg3F/fVcNw3pPQAKFKxUrugno0Ds5NUztlx/gRLnQW9MF+7VTqAw== +package-name-regex@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/package-name-regex/-/package-name-regex-2.0.6.tgz#b54bcb04d950e38082b7bb38fa558e01c1679334" + integrity sha512-gFL35q7kbE/zBaPA3UKhp2vSzcPYx2ecbYuwv1ucE9Il6IIgBDweBlH8D68UFGZic2MkllKa2KHCfC1IQBQUYA== parent-module@^1.0.0: version "1.0.1" @@ -5737,18 +5744,18 @@ rollup-plugin-inject@^3.0.0: magic-string "^0.25.3" rollup-pluginutils "^2.8.1" -rollup-plugin-license@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-license/-/rollup-plugin-license-2.6.1.tgz#20f15cc37950f362f8eefdc6e3a2e659d0cad9eb" - integrity sha512-JPtlXF0tZKyHztKJsyd3HHmQFSkXei+596Xrb/a/bHIdDhvFuNSKimCKkQpoXyspfeVQk7CNay1MyGpFHAXjvg== +rollup-plugin-license@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-license/-/rollup-plugin-license-2.7.0.tgz#89551c371d50441612b9202f172b9935b4b1f7c8" + integrity sha512-0H1Fbuf85rvpadpmAaairdahzQHY0zHtcXkOFV5EStjX9aMCO2Hz5AQp/zZe+K/PB3o6As7R9uzcb8Pw1K94dg== dependencies: commenting "1.1.0" glob "7.2.0" lodash "4.17.21" - magic-string "0.25.7" + magic-string "0.26.1" mkdirp "1.0.4" - moment "2.29.1" - package-name-regex "2.0.5" + moment "2.29.2" + package-name-regex "2.0.6" spdx-expression-validate "2.0.0" spdx-satisfies "5.0.1" @@ -5940,7 +5947,7 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -sourcemap-codec@^1.4.4: +sourcemap-codec@^1.4.4, sourcemap-codec@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== From e167d450e874b9013b1ed9689431e3e0122939d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 03:01:14 +0000 Subject: [PATCH 25/49] Build(deps-dev): Bump @typescript-eslint/eslint-plugin (#12661) --- package.json | 2 +- yarn.lock | 76 +++++++++++++++++++++++++++++++++++----------------- 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index e7dd9242b..393e320be 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@glimmer/reference": "0.84.1", "@types/estree": "0.0.51", "@types/jest": "27.4.1", - "@typescript-eslint/eslint-plugin": "5.18.0", + "@typescript-eslint/eslint-plugin": "5.19.0", "babel-jest": "27.5.1", "benchmark": "2.1.4", "browserslist-to-esbuild": "1.1.1", diff --git a/yarn.lock b/yarn.lock index ee4cb45eb..375c5110d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1719,14 +1719,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz#950df411cec65f90d75d6320a03b2c98f6c3af7d" - integrity sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A== +"@typescript-eslint/eslint-plugin@5.19.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz#9608a4b6d0427104bccf132f058cba629a6553c0" + integrity sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg== dependencies: - "@typescript-eslint/scope-manager" "5.18.0" - "@typescript-eslint/type-utils" "5.18.0" - "@typescript-eslint/utils" "5.18.0" + "@typescript-eslint/scope-manager" "5.19.0" + "@typescript-eslint/type-utils" "5.19.0" + "@typescript-eslint/utils" "5.19.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -1734,20 +1734,20 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/scope-manager@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" - integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== +"@typescript-eslint/scope-manager@5.19.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz#97e59b0bcbcb54dbcdfba96fc103b9020bbe9cb4" + integrity sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g== dependencies: - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/visitor-keys" "5.18.0" + "@typescript-eslint/types" "5.19.0" + "@typescript-eslint/visitor-keys" "5.19.0" -"@typescript-eslint/type-utils@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz#62dbfc8478abf36ba94a90ddf10be3cc8e471c74" - integrity sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA== +"@typescript-eslint/type-utils@5.19.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz#80f2125b0dfe82494bbae1ea99f1c0186d420282" + integrity sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q== dependencies: - "@typescript-eslint/utils" "5.18.0" + "@typescript-eslint/utils" "5.19.0" debug "^4.3.2" tsutils "^3.21.0" @@ -1756,6 +1756,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== +"@typescript-eslint/types@5.19.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.19.0.tgz#12d3d600d754259da771806ee8b2c842d3be8d12" + integrity sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w== + "@typescript-eslint/typescript-estree@5.18.0": version "5.18.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" @@ -1769,15 +1774,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.18.0", "@typescript-eslint/utils@^5.10.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.18.0.tgz#27fc84cf95c1a96def0aae31684cb43a37e76855" - integrity sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA== +"@typescript-eslint/typescript-estree@5.19.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz#fc987b8f62883f9ea6a5b488bdbcd20d33c0025f" + integrity sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw== + dependencies: + "@typescript-eslint/types" "5.19.0" + "@typescript-eslint/visitor-keys" "5.19.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.19.0", "@typescript-eslint/utils@^5.10.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.19.0.tgz#fe87f1e3003d9973ec361ed10d36b4342f1ded1e" + integrity sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.18.0" - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/typescript-estree" "5.18.0" + "@typescript-eslint/scope-manager" "5.19.0" + "@typescript-eslint/types" "5.19.0" + "@typescript-eslint/typescript-estree" "5.19.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -1789,6 +1807,14 @@ "@typescript-eslint/types" "5.18.0" eslint-visitor-keys "^3.0.0" +"@typescript-eslint/visitor-keys@5.19.0": + version "5.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz#c84ebc7f6c744707a361ca5ec7f7f64cd85b8af6" + integrity sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ== + dependencies: + "@typescript-eslint/types" "5.19.0" + eslint-visitor-keys "^3.0.0" + abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" From 01ac16b180e32e73a638db39a6009f10b708a97f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 03:01:41 +0000 Subject: [PATCH 26/49] Build(deps): Bump flow-parser from 0.175.1 to 0.176.2 (#12662) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 393e320be..6c6568891 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "fast-glob": "3.2.11", "fast-json-stable-stringify": "2.1.0", "find-parent-dir": "0.3.1", - "flow-parser": "0.175.1", + "flow-parser": "0.176.2", "get-stdin": "8.0.0", "graphql": "15.6.1", "html-element-attributes": "3.1.0", diff --git a/yarn.lock b/yarn.lock index 375c5110d..fda5ac2fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3415,10 +3415,10 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -flow-parser@0.175.1: - version "0.175.1" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.175.1.tgz#835a0ea46346c8bdd947e70b2814c2b613beb238" - integrity sha512-gYes5/nxeLYiu02MMb+WH4KaOIYrVcTVIuV9M4aP/4hqJ+zULxxS/In+WEj/tEBsQ+8/wSHo9IDWKQL1FhrLmA== +flow-parser@0.176.2: + version "0.176.2" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.176.2.tgz#e04ac9f766ea9491fd515c84a82ef360e3a0c659" + integrity sha512-unqoh60i18C67h2rvK0SCFUBac/waUcx7CF1a5E4D0Cwj1NErTP42RF7yb7+dy25Tpyzt7uwVtXw13Wr17VzWA== form-data@^3.0.0: version "3.0.1" From fd4dc4592e3a7f3513209afd1db173eb12955e8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 03:26:26 +0000 Subject: [PATCH 27/49] Build(deps): Bump @glimmer/syntax from 0.84.1 to 0.84.2 (#12664) --- package.json | 2 +- yarn.lock | 28 ++++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6c6568891..30233e9fb 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@angular/compiler": "12.2.16", "@babel/code-frame": "7.16.7", "@babel/parser": "7.17.9", - "@glimmer/syntax": "0.84.1", + "@glimmer/syntax": "0.84.2", "@iarna/toml": "2.2.5", "@typescript-eslint/typescript-estree": "5.18.0", "acorn": "8.7.0", diff --git a/yarn.lock b/yarn.lock index fda5ac2fd..6570beab1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1253,6 +1253,13 @@ dependencies: "@simple-dom/interface" "^1.4.0" +"@glimmer/interfaces@0.84.2": + version "0.84.2" + resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.84.2.tgz#764cf92c954adcd1a851e5dc68ec1f6b654dc3bd" + integrity sha512-tMZxQpOddUVmHEOuripkNqVR7ba0K4doiYnFd4WyswqoHPlxqpBujbIamQ+bWCWEF0U4yxsXKa31ekS/JHkiBQ== + dependencies: + "@simple-dom/interface" "^1.4.0" + "@glimmer/reference@0.84.1": version "0.84.1" resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.84.1.tgz#27a78b6c99bb3e9d89b16b2bed53ee4be68e56f6" @@ -1264,13 +1271,13 @@ "@glimmer/util" "0.84.1" "@glimmer/validator" "0.84.1" -"@glimmer/syntax@0.84.1": - version "0.84.1" - resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.84.1.tgz#6140b42180f45a6824c1d0813e2e9bfe1b4e13e1" - integrity sha512-Gbq5a2joOgQPSuiGgDhlymV3rhmgP8Z8stdmoSZHfGq2e5k7sv0if6/9+9/IQO3WPncL8i3aSKX6IBN3lOn/EA== +"@glimmer/syntax@0.84.2": + version "0.84.2" + resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.84.2.tgz#a3f65e51eec20f6adb79c6159d1ad1166fa5bccd" + integrity sha512-SPBd1tpIR9XeaXsXsMRCnKz63eLnIZ0d5G9QC4zIBFBC3pQdtG0F5kWeuRVCdfTIFuR+5WBMfk5jvg+3gbQhjg== dependencies: - "@glimmer/interfaces" "0.84.1" - "@glimmer/util" "0.84.1" + "@glimmer/interfaces" "0.84.2" + "@glimmer/util" "0.84.2" "@handlebars/parser" "~2.0.0" simple-html-tokenizer "^0.5.11" @@ -1283,6 +1290,15 @@ "@glimmer/interfaces" "0.84.1" "@simple-dom/interface" "^1.4.0" +"@glimmer/util@0.84.2": + version "0.84.2" + resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.84.2.tgz#2711ba40f25f44b2ea309cad49f5c2622c6211bc" + integrity sha512-VbhzE2s4rmU+qJF3gGBTL1IDjq+/G2Th51XErS8MQVMCmE4CU2pdwSzec8PyOowqCGUOrVIWuMzEI6VoPM4L4w== + dependencies: + "@glimmer/env" "0.1.7" + "@glimmer/interfaces" "0.84.2" + "@simple-dom/interface" "^1.4.0" + "@glimmer/validator@0.84.1": version "0.84.1" resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.84.1.tgz#648c9e84f0cfe72de295c8b1a3f588aa35ac5afb" From b3fae6736bcccb341a1cf63b19dfe35658632fa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 03:27:50 +0000 Subject: [PATCH 28/49] Build(deps-dev): Bump core-js from 3.21.1 to 3.22.0 (#12665) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 30233e9fb..6b36ffb7b 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "babel-jest": "27.5.1", "benchmark": "2.1.4", "browserslist-to-esbuild": "1.1.1", - "core-js": "3.21.1", + "core-js": "3.22.0", "cross-env": "7.0.3", "cspell": "5.19.7", "enquirer": "2.3.6", diff --git a/yarn.lock b/yarn.lock index 6570beab1..21b3b6d4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2437,10 +2437,10 @@ core-js-compat@^3.20.2, core-js-compat@^3.21.0: browserslist "^4.19.1" semver "7.0.0" -core-js@3.21.1, core-js@^3.16.2: - version "3.21.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.21.1.tgz#f2e0ddc1fc43da6f904706e8e955bc19d06a0d94" - integrity sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig== +core-js@3.22.0, core-js@^3.16.2: + version "3.22.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.0.tgz#b52007870c5e091517352e833b77f0b2d2b259f3" + integrity sha512-8h9jBweRjMiY+ORO7bdWSeWfHhLPO7whobj7Z2Bl0IDo00C228EdGgH7FE4jGumbEjzcFfkfW8bXgdkEDhnwHQ== core-util-is@^1.0.3: version "1.0.3" From a4cba80dc038cf46cc74f2ff9f16b3b13084026b Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Sun, 17 Apr 2022 13:12:19 +0900 Subject: [PATCH 29/49] Allow formatting for Vue template expression written in TypeScript (#12584) * Support TS expression in vue SFC * Add changelog * Add `__ts_expression` * Add `__vue_ts_expression` * Add tests * Do not use `ast.walk` * Address review * Add `__vue_ts_event_binding` * Fix --- changelog_unreleased/vue/12584.md | 31 +++++++++++++ src/language-html/embed.js | 13 ++++-- src/language-html/print-preprocess.js | 17 +++++++ src/language-html/utils/index.js | 5 +++ src/language-js/parse/babel.js | 13 +++++- src/language-js/parse/parsers.js | 6 +++ src/language-js/print-preprocess.js | 1 + src/language-js/printer-estree.js | 5 ++- src/main/comments.js | 3 +- .../__snapshots__/jsfmt.spec.js.snap | 43 ++++++++++++++++++ tests/format/vue/ts-event-binding/basic.vue | 10 +++++ .../format/vue/ts-event-binding/jsfmt.spec.js | 1 + .../__snapshots__/jsfmt.spec.js.snap | 45 +++++++++++++++++++ tests/format/vue/ts-expression/basic.vue | 5 +++ tests/format/vue/ts-expression/jsfmt.spec.js | 1 + .../not-working-with-non-ts-script.vue | 5 +++ 16 files changed, 197 insertions(+), 7 deletions(-) create mode 100644 changelog_unreleased/vue/12584.md create mode 100644 tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap create mode 100644 tests/format/vue/ts-event-binding/basic.vue create mode 100644 tests/format/vue/ts-event-binding/jsfmt.spec.js create mode 100644 tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap create mode 100644 tests/format/vue/ts-expression/basic.vue create mode 100644 tests/format/vue/ts-expression/jsfmt.spec.js create mode 100644 tests/format/vue/ts-expression/not-working-with-non-ts-script.vue diff --git a/changelog_unreleased/vue/12584.md b/changelog_unreleased/vue/12584.md new file mode 100644 index 000000000..1bada237f --- /dev/null +++ b/changelog_unreleased/vue/12584.md @@ -0,0 +1,31 @@ +#### Allow formatting for Vue template expression written in TypeScript (#12584 by @sosukesuzuki) + + +```vue + + + + + + + + + + + + + + +``` diff --git a/src/language-html/embed.js b/src/language-html/embed.js index ef83e6364..44fbba81d 100644 --- a/src/language-html/embed.js +++ b/src/language-html/embed.js @@ -127,11 +127,14 @@ function printEmbeddedAttributeValue(node, htmlTextToDoc, options) { if (isKeyMatched(vueEventBindingPatterns)) { const value = getValue(); + const parser = isVueEventBindingExpression(value) + ? "__js_expression" + : options.__should_parse_vue_template_with_ts + ? "__vue_ts_event_binding" + : "__vue_event_binding"; return printMaybeHug( attributeTextToDoc(value, { - parser: isVueEventBindingExpression(value) - ? "__js_expression" - : "__vue_event_binding", + parser, }) ); } @@ -318,7 +321,9 @@ function embed(path, print, textToDoc, options) { textToDocOptions.parser = "__ng_interpolation"; textToDocOptions.trailingComma = "none"; } else if (options.parser === "vue") { - textToDocOptions.parser = "__vue_expression"; + textToDocOptions.parser = options.__should_parse_vue_template_with_ts + ? "__vue_ts_expression" + : "__vue_expression"; } else { textToDocOptions.parser = "__js_expression"; } diff --git a/src/language-html/print-preprocess.js b/src/language-html/print-preprocess.js index 0add77b63..789ab7e56 100644 --- a/src/language-html/print-preprocess.js +++ b/src/language-html/print-preprocess.js @@ -14,6 +14,7 @@ const { isLeadingSpaceSensitiveNode, isTrailingSpaceSensitiveNode, isWhitespaceSensitiveNode, + isVueScriptTag, } = require("./utils/index.js"); const PREPROCESS_PIPELINE = [ @@ -27,6 +28,7 @@ const PREPROCESS_PIPELINE = [ addHasHtmComponentClosingTag, addIsSpaceSensitive, mergeSimpleElementIntoText, + markTsScript, ]; function preprocess(ast, options) { @@ -408,4 +410,19 @@ function addIsSpaceSensitive(ast, options) { }); } +function markTsScript(ast, options) { + if (options.parser === "vue") { + const vueScriptTag = ast.children.find((child) => + isVueScriptTag(child, options) + ); + if (!vueScriptTag) { + return; + } + const { lang } = vueScriptTag.attrMap; + if (lang === "ts" || lang === "typescript") { + options.__should_parse_vue_template_with_ts = true; + } + } +} + module.exports = preprocess; diff --git a/src/language-html/utils/index.js b/src/language-html/utils/index.js index 18b46cedf..e3c962e32 100644 --- a/src/language-html/utils/index.js +++ b/src/language-html/utils/index.js @@ -638,6 +638,10 @@ function getTextValueParts(node, value = node.value) { : getDocParts(join(line, splitByHtmlWhitespace(value))); } +function isVueScriptTag(node, options) { + return isVueSfcBlock(node, options) && node.name === "script"; +} + module.exports = { htmlTrim, htmlTrimPreserveIndentation, @@ -657,6 +661,7 @@ module.exports = { inferScriptParser, isVueCustomBlock, isVueNonHtmlBlock, + isVueScriptTag, isVueSlotAttribute, isVueSfcBindingsAttribute, isDanglingSpaceSensitiveNode, diff --git a/src/language-js/parse/babel.js b/src/language-js/parse/babel.js index b6a290d6b..5f79257ac 100644 --- a/src/language-js/parse/babel.js +++ b/src/language-js/parse/babel.js @@ -170,6 +170,11 @@ const parseEstree = createParse( ); const parseExpression = createParse("parseExpression", appendPlugins(["jsx"])); +const parseTSExpression = createParse( + "parseExpression", + appendPlugins(["typescript"]) +); + // Error codes are defined in // - https://github.com/babel/babel/blob/v7.14.0/packages/babel-parser/src/parser/error-message.js // - https://github.com/babel/babel/blob/v7.14.0/packages/babel-parser/src/plugins/typescript/index.js#L69-L153 @@ -228,21 +233,27 @@ const allowedMessageCodes = new Set([ ]); const babel = createParser(parse); +const babelTs = createParser(parseTypeScript); const babelExpression = createParser(parseExpression); +const babelTSExpression = createParser(parseTSExpression); // Export as a plugin so we can reuse the same bundle for UMD loading module.exports = { parsers: { babel, "babel-flow": createParser(parseFlow), - "babel-ts": createParser(parseTypeScript), + "babel-ts": babelTs, ...jsonParsers, /** @internal */ __js_expression: babelExpression, /** for vue filter */ __vue_expression: babelExpression, + /** for vue filter written in TS */ + __vue_ts_expression: babelTSExpression, /** for vue event binding to handle semicolon */ __vue_event_binding: babel, + /** for vue event binding written in TS to handle semicolon */ + __vue_ts_event_binding: babelTs, /** verify that we can print this AST */ __babel_estree: createParser(parseEstree), }, diff --git a/src/language-js/parse/parsers.js b/src/language-js/parse/parsers.js index eef5cddeb..5878696cf 100644 --- a/src/language-js/parse/parsers.js +++ b/src/language-js/parse/parsers.js @@ -26,9 +26,15 @@ module.exports = { get __vue_expression() { return require("./babel.js").parsers.__vue_expression; }, + get __vue_ts_expression() { + return require("./babel.js").parsers.__vue_ts_expression; + }, get __vue_event_binding() { return require("./babel.js").parsers.__vue_event_binding; }, + get __vue_ts_event_binding() { + return require("./babel.js").parsers.__vue_ts_event_binding; + }, // JS - Flow get flow() { return require("./flow.js").parsers.flow; diff --git a/src/language-js/print-preprocess.js b/src/language-js/print-preprocess.js index b776cab9b..190dc68e5 100644 --- a/src/language-js/print-preprocess.js +++ b/src/language-js/print-preprocess.js @@ -7,6 +7,7 @@ function preprocess(ast, options) { case "json-stringify": case "__js_expression": case "__vue_expression": + case "__vue_ts_expression": return { ...ast, type: options.parser.startsWith("__") ? "JsExpressionRoot" : "JsonRoot", diff --git a/src/language-js/printer-estree.js b/src/language-js/printer-estree.js index e4fcc925d..c01338f8b 100644 --- a/src/language-js/printer-estree.js +++ b/src/language-js/printer-estree.js @@ -218,7 +218,10 @@ function printPathNoParens(path, options, print, args) { return [printDirective(node.expression, options), semi]; } - if (options.parser === "__vue_event_binding") { + if ( + options.parser === "__vue_event_binding" || + options.parser === "__vue_ts_event_binding" + ) { const parent = path.getParentNode(); if ( parent.type === "Program" && diff --git a/src/main/comments.js b/src/main/comments.js index 77d961586..baee3614c 100644 --- a/src/main/comments.js +++ b/src/main/comments.js @@ -200,7 +200,8 @@ function attach(comments, ast, text, options) { options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || - options.parser === "__vue_expression" + options.parser === "__vue_expression" || + options.parser === "__vue_ts_expression" ) { if (locStart(comment) - locStart(ast) <= 0) { addLeadingComment(ast, comment); diff --git a/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..d5c639848 --- /dev/null +++ b/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + +=====================================output===================================== + + + + +================================================================================ +`; diff --git a/tests/format/vue/ts-event-binding/basic.vue b/tests/format/vue/ts-event-binding/basic.vue new file mode 100644 index 000000000..4eff06dda --- /dev/null +++ b/tests/format/vue/ts-event-binding/basic.vue @@ -0,0 +1,10 @@ + + + diff --git a/tests/format/vue/ts-event-binding/jsfmt.spec.js b/tests/format/vue/ts-event-binding/jsfmt.spec.js new file mode 100644 index 000000000..2fd7eede9 --- /dev/null +++ b/tests/format/vue/ts-event-binding/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..004db1fc1 --- /dev/null +++ b/tests/format/vue/ts-expression/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,45 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + +=====================================output===================================== + + + + +================================================================================ +`; + +exports[`not-working-with-non-ts-script.vue format 1`] = ` +====================================options===================================== +parsers: ["vue"] +printWidth: 80 + | printWidth +=====================================input====================================== + + + + +=====================================output===================================== + + + + +================================================================================ +`; diff --git a/tests/format/vue/ts-expression/basic.vue b/tests/format/vue/ts-expression/basic.vue new file mode 100644 index 000000000..397f810cc --- /dev/null +++ b/tests/format/vue/ts-expression/basic.vue @@ -0,0 +1,5 @@ + + + diff --git a/tests/format/vue/ts-expression/jsfmt.spec.js b/tests/format/vue/ts-expression/jsfmt.spec.js new file mode 100644 index 000000000..2fd7eede9 --- /dev/null +++ b/tests/format/vue/ts-expression/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["vue"]); diff --git a/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue b/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue new file mode 100644 index 000000000..06afe1962 --- /dev/null +++ b/tests/format/vue/ts-expression/not-working-with-non-ts-script.vue @@ -0,0 +1,5 @@ + + + From 10277ecf2f43666bebc88ba294c50f653b5bba32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 06:32:06 +0000 Subject: [PATCH 30/49] Build(deps): Bump semver from 7.3.5 to 7.3.7 in /scripts/release (#12667) --- scripts/release/package.json | 2 +- scripts/release/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/release/package.json b/scripts/release/package.json index ea33a56c3..a1bd2cdfc 100644 --- a/scripts/release/package.json +++ b/scripts/release/package.json @@ -11,7 +11,7 @@ "minimist": "1.2.6", "node-fetch": "3.2.3", "outdent": "0.8.0", - "semver": "7.3.5", + "semver": "7.3.7", "string-width": "5.1.2" }, "devDependencies": { diff --git a/scripts/release/yarn.lock b/scripts/release/yarn.lock index 96914c343..c74d948b0 100644 --- a/scripts/release/yarn.lock +++ b/scripts/release/yarn.lock @@ -2261,10 +2261,10 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -semver@7.3.5, semver@^7.3.2: - version "7.3.5" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@7.3.7, semver@^7.3.2: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" From 3f151deed4e7ae744f4b01aaff13e3fb9de3706a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 06:54:00 +0000 Subject: [PATCH 31/49] Build(deps-dev): Bump esbuild from 0.14.34 to 0.14.36 (#12663) --- package.json | 2 +- yarn.lock | 208 +++++++++++++++++++++++++-------------------------- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index 6b36ffb7b..b0962154d 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "cross-env": "7.0.3", "cspell": "5.19.7", "enquirer": "2.3.6", - "esbuild": "0.14.34", + "esbuild": "0.14.36", "esbuild-visualizer": "0.3.1", "eslint": "8.13.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 21b3b6d4b..bc6116042 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2826,90 +2826,90 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild-android-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.34.tgz#46bc4327dd0809937912346244eaffdb9bfc980d" - integrity sha512-XfxcfJqmMYsT/LXqrptzFxmaR3GWzXHDLdFNIhm6S00zPaQF1TBBWm+9t0RZ6LRR7iwH57DPjaOeW20vMqI4Yw== +esbuild-android-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.36.tgz#fc5f95ce78c8c3d790fa16bc71bd904f2bb42aa1" + integrity sha512-jwpBhF1jmo0tVCYC/ORzVN+hyVcNZUWuozGcLHfod0RJCedTDTvR4nwlTXdx1gtncDqjk33itjO+27OZHbiavw== -esbuild-android-arm64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.34.tgz#a3f7e1ad84b8a7dcb39b5e132768b56ee7133656" - integrity sha512-T02+NXTmSRL1Mc6puz+R9CB54rSPICkXKq6+tw8B6vxZFnCPzbJxgwIX4kcluz9p8nYBjF3+lSilTGWb7+Xgew== +esbuild-android-arm64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.36.tgz#44356fbb9f8de82a5cdf11849e011dfb3ad0a8a8" + integrity sha512-/hYkyFe7x7Yapmfv4X/tBmyKnggUmdQmlvZ8ZlBnV4+PjisrEhAvC3yWpURuD9XoB8Wa1d5dGkTsF53pIvpjsg== -esbuild-darwin-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.34.tgz#a0e4ab7a0cddf76761f1fb5d6bf552a376beb16e" - integrity sha512-pLRip2Bh4Ng7Bf6AMgCrSp3pPe/qZyf11h5Qo2mOfJqLWzSVjxrXW+CFRJfrOVP7TCnh/gmZSM2AFdCPB72vtw== +esbuild-darwin-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.36.tgz#3d9324b21489c70141665c2e740d6e84f16f725d" + integrity sha512-kkl6qmV0dTpyIMKagluzYqlc1vO0ecgpviK/7jwPbRDEv5fejRTaBBEE2KxEQbTHcLhiiDbhG7d5UybZWo/1zQ== -esbuild-darwin-arm64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.34.tgz#54c35461f82f83a7f5169d9a6a54201798977b07" - integrity sha512-vpidSJEBxx6lf1NWgXC+DCmGqesJuZ5Y8aQVVsaoO4i8tRXbXb0whChRvop/zd3nfNM4dIl5EXAky0knRX5I6w== +esbuild-darwin-arm64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.36.tgz#2a8040c2e465131e5281034f3c72405e643cb7b2" + integrity sha512-q8fY4r2Sx6P0Pr3VUm//eFYKVk07C5MHcEinU1BjyFnuYz4IxR/03uBbDwluR6ILIHnZTE7AkTUWIdidRi1Jjw== -esbuild-freebsd-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.34.tgz#aebb50248f5874d04ffeab2db8ee1ed6037e2654" - integrity sha512-m0HBjePhe0hAQJgtMRMNV9kMgIyV4/qSnzPx42kRMQBcPhgjAq1JRu4Il26czC+9FgpMbFkUktb07f/Lwnc6CA== +esbuild-freebsd-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.36.tgz#d82c387b4d01fe9e8631f97d41eb54f2dbeb68a3" + integrity sha512-Hn8AYuxXXRptybPqoMkga4HRFE7/XmhtlQjXFHoAIhKUPPMeJH35GYEUWGbjteai9FLFvBAjEAlwEtSGxnqWww== -esbuild-freebsd-arm64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.34.tgz#09bef288e29f18b38b0c70a9827b6ee718e36c7f" - integrity sha512-cpRc2B94L1KvMPPYB4D6G39jLqpKlD3noAMY4/e86iXXXkhUYJJEtTuyNFTa9JRpWM0xCAp4mxjHjoIiLuoCLA== +esbuild-freebsd-arm64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.36.tgz#e8ce2e6c697da6c7ecd0cc0ac821d47c5ab68529" + integrity sha512-S3C0attylLLRiCcHiJd036eDEMOY32+h8P+jJ3kTcfhJANNjP0TNBNL30TZmEdOSx/820HJFgRrqpNAvTbjnDA== -esbuild-linux-32@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.34.tgz#67790061758e008e919e65bbc34549f55dadaca7" - integrity sha512-8nQaEaoW7MH/K/RlozJa+lE1ejHIr8fuPIHhc513UebRav7HtXgQvxHQ6VZRUkWtep23M6dd7UqhwO1tMOfzQQ== +esbuild-linux-32@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.36.tgz#a4a261e2af91986ea62451f2db712a556cb38a15" + integrity sha512-Eh9OkyTrEZn9WGO4xkI3OPPpUX7p/3QYvdG0lL4rfr73Ap2HAr6D9lP59VMF64Ex01LhHSXwIsFG/8AQjh6eNw== -esbuild-linux-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.34.tgz#b9b19d4ac07e37495dd2508ec843418aa71c98d6" - integrity sha512-Y3of4qQoLLlAgf042MlrY1P+7PnN9zWj8nVtw9XQG5hcLOZLz7IKpU35oeu7n4wvyaZHwvQqDJ93gRLqdJekcQ== +esbuild-linux-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.36.tgz#4a9500f9197e2c8fcb884a511d2c9d4c2debde72" + integrity sha512-vFVFS5ve7PuwlfgoWNyRccGDi2QTNkQo/2k5U5ttVD0jRFaMlc8UQee708fOZA6zTCDy5RWsT5MJw3sl2X6KDg== -esbuild-linux-arm64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.34.tgz#fd84b11a6ccfe9e83e00d0c45890e9fb3a7248c1" - integrity sha512-IlWaGtj9ir7+Nrume1DGcyzBDlK8GcnJq0ANKwcI9pVw8tqr+6GD0eqyF9SF1mR8UmAp+odrx1H5NdR2cHdFHA== +esbuild-linux-arm64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.36.tgz#c91c21e25b315464bd7da867365dd1dae14ca176" + integrity sha512-24Vq1M7FdpSmaTYuu1w0Hdhiqkbto1I5Pjyi+4Cdw5fJKGlwQuw+hWynTcRI/cOZxBcBpP21gND7W27gHAiftw== -esbuild-linux-arm@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.34.tgz#c89d4714b05265a315a97c8933508cc73950e683" - integrity sha512-9lpq1NcJqssAF7alCO6zL3gvBVVt/lKw4oetUM7OgNnRX0OWpB+ZIO9FwCrSj/dMdmgDhPLf+119zB8QxSMmAg== +esbuild-linux-arm@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.36.tgz#90e23bca2e6e549affbbe994f80ba3bb6c4d934a" + integrity sha512-NhgU4n+NCsYgt7Hy61PCquEz5aevI6VjQvxwBxtxrooXsxt5b2xtOUXYZe04JxqQo+XZk3d1gcr7pbV9MAQ/Lg== -esbuild-linux-mips64le@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.34.tgz#d60752c3fb1260dd0737532af2de2a9521656456" - integrity sha512-k3or+01Rska1AjUyNjA4buEwB51eyN/xPQAoOx1CjzAQC3l8rpjUDw55kXyL63O/1MUi4ISvtNtl8gLwdyEcxw== +esbuild-linux-mips64le@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.36.tgz#40e11afb08353ff24709fc89e4db0f866bc131d2" + integrity sha512-hZUeTXvppJN+5rEz2EjsOFM9F1bZt7/d2FUM1lmQo//rXh1RTFYzhC0txn7WV0/jCC7SvrGRaRz0NMsRPf8SIA== -esbuild-linux-ppc64le@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.34.tgz#f4c6229269956564f0c6f9825f5e717c2cfc22b3" - integrity sha512-+qxb8M9FfM2CJaVU7GgYpJOHM1ngQOx+/VrtBjb4C8oVqaPcESCeg2anjl+HRZy8VpYc71q/iBYausPPbJ+Keg== +esbuild-linux-ppc64le@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.36.tgz#9e8a588c513d06cc3859f9dcc52e5fdfce8a1a5e" + integrity sha512-1Bg3QgzZjO+QtPhP9VeIBhAduHEc2kzU43MzBnMwpLSZ890azr4/A9Dganun8nsqD/1TBcqhId0z4mFDO8FAvg== -esbuild-linux-riscv64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.34.tgz#549bd18a9eba3135b67f7b742730b5343a1be35d" - integrity sha512-Y717ltBdQ5j5sZIHdy1DV9kieo0wMip0dCmVSTceowCPYSn1Cg33Kd6981+F/3b9FDMzNWldZFOBRILViENZSA== +esbuild-linux-riscv64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.36.tgz#e578c09b23b3b97652e60e3692bfda628b541f06" + integrity sha512-dOE5pt3cOdqEhaufDRzNCHf5BSwxgygVak9UR7PH7KPVHwSTDAZHDoEjblxLqjJYpc5XaU9+gKJ9F8mp9r5I4A== -esbuild-linux-s390x@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.34.tgz#2a6b577c437f94c2b37623c755ff5215a05c12bc" - integrity sha512-bDDgYO4LhL4+zPs+WcBkXph+AQoPcQRTv18FzZS0WhjfH8TZx2QqlVPGhmhZ6WidrY+jKthUqO6UhGyIb4MpmA== +esbuild-linux-s390x@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.36.tgz#3c9dab40d0d69932ffded0fd7317bb403626c9bc" + integrity sha512-g4FMdh//BBGTfVHjF6MO7Cz8gqRoDPzXWxRvWkJoGroKA18G9m0wddvPbEqcQf5Tbt2vSc1CIgag7cXwTmoTXg== -esbuild-netbsd-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.34.tgz#7f0b73229157975eb35597207723df52ba21722a" - integrity sha512-cfaFGXdRt0+vHsjNPyF0POM4BVSHPSbhLPe8mppDc7GDDxjIl08mV1Zou14oDWMp/XZMjYN1kWYRSfftiD0vvQ== +esbuild-netbsd-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.36.tgz#e27847f6d506218291619b8c1e121ecd97628494" + integrity sha512-UB2bVImxkWk4vjnP62ehFNZ73lQY1xcnL5ZNYF3x0AG+j8HgdkNF05v67YJdCIuUJpBuTyCK8LORCYo9onSW+A== -esbuild-openbsd-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.34.tgz#b9bc44b4f70031fb01b173b279daeffc4d4f54b7" - integrity sha512-vmy9DxXVnRiI14s8GKuYBtess+EVcDALkbpTqd5jw4XITutIzyB7n4x0Tj5utAkKsgZJB22lLWGekr0ABnSLow== +esbuild-openbsd-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.36.tgz#c94c04c557fae516872a586eae67423da6d2fabb" + integrity sha512-NvGB2Chf8GxuleXRGk8e9zD3aSdRO5kLt9coTQbCg7WMGXeX471sBgh4kSg8pjx0yTXRt0MlrUDnjVYnetyivg== -esbuild-sunos-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.34.tgz#512dd6085ac1a0dccc20c5f932f16a618bea409c" - integrity sha512-eNPVatNET1F7tRMhii7goL/eptfxc0ALRjrj9SPFNqp0zmxrehBFD6BaP3R4LjMn6DbMO0jOAnTLFKr8NqcJAA== +esbuild-sunos-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.36.tgz#9b79febc0df65a30f1c9bd63047d1675511bf99d" + integrity sha512-VkUZS5ftTSjhRjuRLp+v78auMO3PZBXu6xl4ajomGenEm2/rGuWlhFSjB7YbBNErOchj51Jb2OK8lKAo8qdmsQ== esbuild-visualizer@0.3.1: version "0.3.1" @@ -2920,46 +2920,46 @@ esbuild-visualizer@0.3.1: open "^7.4.2" yargs "^16.2.0" -esbuild-windows-32@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.34.tgz#3ff1afd5cac08050c7c7140a59e343b06f6b037c" - integrity sha512-EFhpXyHEcnqWYe2rAHFd8dRw8wkrd9U+9oqcyoEL84GbanAYjiiIjBZsnR8kl0sCQ5w6bLpk7vCEIA2VS32Vcg== +esbuild-windows-32@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.36.tgz#910d11936c8d2122ffdd3275e5b28d8a4e1240ec" + integrity sha512-bIar+A6hdytJjZrDxfMBUSEHHLfx3ynoEZXx/39nxy86pX/w249WZm8Bm0dtOAByAf4Z6qV0LsnTIJHiIqbw0w== -esbuild-windows-64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.34.tgz#66f7b43d2a0b132f6748dfa3edac4fc939a99be0" - integrity sha512-a8fbl8Ky7PxNEjf1aJmtxdDZj32/hC7S1OcA2ckEpCJRTjiKslI9vAdPpSjrKIWhws4Galpaawy0nB7fjHYf5Q== +esbuild-windows-64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.36.tgz#21b4ce8b42a4efc63f4b58ec617f1302448aad26" + integrity sha512-+p4MuRZekVChAeueT1Y9LGkxrT5x7YYJxYE8ZOTcEfeUUN43vktSn6hUNsvxzzATrSgq5QqRdllkVBxWZg7KqQ== -esbuild-windows-arm64@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.34.tgz#b74a6395b7b7e53dba70b71b39542afd83352473" - integrity sha512-EYvmKbSa2B3sPnpC28UEu9jBK5atGV4BaVRE7CYGUci2Hlz4AvtV/LML+TcDMT6gBgibnN2gcltWclab3UutMg== +esbuild-windows-arm64@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.36.tgz#ba21546fecb7297667d0052d00150de22c044b24" + integrity sha512-fBB4WlDqV1m18EF/aheGYQkQZHfPHiHJSBYzXIo8yKehek+0BtBwo/4PNwKGJ5T0YK0oc8pBKjgwPbzSrPLb+Q== -esbuild@0.14.34: - version "0.14.34" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.34.tgz#3610056f0a57bcfd0b63ddaafdb2e3bef1cf96e4" - integrity sha512-QIWdPT/gFF6hCaf4m7kP0cJ+JIuFkdHibI7vVFvu3eJS1HpVmYHWDulyN5WXwbRA0SX/7ZDaJ/1DH8SdY9xOJg== +esbuild@0.14.36: + version "0.14.36" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.36.tgz#0023a73eab57886ac5605df16ee421e471a971b3" + integrity sha512-HhFHPiRXGYOCRlrhpiVDYKcFJRdO0sBElZ668M4lh2ER0YgnkLxECuFe7uWCf23FrcLc59Pqr7dHkTqmRPDHmw== optionalDependencies: - esbuild-android-64 "0.14.34" - esbuild-android-arm64 "0.14.34" - esbuild-darwin-64 "0.14.34" - esbuild-darwin-arm64 "0.14.34" - esbuild-freebsd-64 "0.14.34" - esbuild-freebsd-arm64 "0.14.34" - esbuild-linux-32 "0.14.34" - esbuild-linux-64 "0.14.34" - esbuild-linux-arm "0.14.34" - esbuild-linux-arm64 "0.14.34" - esbuild-linux-mips64le "0.14.34" - esbuild-linux-ppc64le "0.14.34" - esbuild-linux-riscv64 "0.14.34" - esbuild-linux-s390x "0.14.34" - esbuild-netbsd-64 "0.14.34" - esbuild-openbsd-64 "0.14.34" - esbuild-sunos-64 "0.14.34" - esbuild-windows-32 "0.14.34" - esbuild-windows-64 "0.14.34" - esbuild-windows-arm64 "0.14.34" + esbuild-android-64 "0.14.36" + esbuild-android-arm64 "0.14.36" + esbuild-darwin-64 "0.14.36" + esbuild-darwin-arm64 "0.14.36" + esbuild-freebsd-64 "0.14.36" + esbuild-freebsd-arm64 "0.14.36" + esbuild-linux-32 "0.14.36" + esbuild-linux-64 "0.14.36" + esbuild-linux-arm "0.14.36" + esbuild-linux-arm64 "0.14.36" + esbuild-linux-mips64le "0.14.36" + esbuild-linux-ppc64le "0.14.36" + esbuild-linux-riscv64 "0.14.36" + esbuild-linux-s390x "0.14.36" + esbuild-netbsd-64 "0.14.36" + esbuild-openbsd-64 "0.14.36" + esbuild-sunos-64 "0.14.36" + esbuild-windows-32 "0.14.36" + esbuild-windows-64 "0.14.36" + esbuild-windows-arm64 "0.14.36" escalade@^3.1.1: version "3.1.1" From c5ccff6aa36572b29948e6335b5ed1b87b5ef125 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Apr 2022 07:03:25 +0000 Subject: [PATCH 32/49] Build(deps-dev): Bump @glimmer/reference from 0.84.1 to 0.84.2 (#12666) --- package.json | 2 +- yarn.lock | 50 +++++++++++++++++--------------------------------- 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index b0962154d..59aa6d25d 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "@babel/preset-env": "7.16.11", "@babel/types": "7.17.0", "@esbuild-plugins/node-modules-polyfill": "0.1.4", - "@glimmer/reference": "0.84.1", + "@glimmer/reference": "0.84.2", "@types/estree": "0.0.51", "@types/jest": "27.4.1", "@typescript-eslint/eslint-plugin": "5.19.0", diff --git a/yarn.lock b/yarn.lock index bc6116042..c459c0638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1239,20 +1239,13 @@ resolved "https://registry.yarnpkg.com/@glimmer/env/-/env-0.1.7.tgz#fd2d2b55a9029c6b37a6c935e8c8871ae70dfa07" integrity sha1-/S0rVakCnGs3psk16MiHGucN+gc= -"@glimmer/global-context@0.84.1": - version "0.84.1" - resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.84.1.tgz#2126f5dcf9b36e972e970df43c4068c470b275bf" - integrity sha512-8/BxRRNJ3L//4A4KyMSGu4F0qz2z1D6KCzrenuxg5G4NDtd7NALTH4F28FXBkRstDfg4ic5yg/OqdyjDVyUyOQ== +"@glimmer/global-context@0.84.2": + version "0.84.2" + resolved "https://registry.yarnpkg.com/@glimmer/global-context/-/global-context-0.84.2.tgz#cd4612925dbd68787b9270e91b213691150c307f" + integrity sha512-6FycLh/Eq0P3LA94bJL6WHPJyOTKeQD4KBWhowZ9TbeO3p4/WUr+POKPVEyfIx6YHybhpL9MGj45Y2r0hqVigw== dependencies: "@glimmer/env" "^0.1.7" -"@glimmer/interfaces@0.84.1": - version "0.84.1" - resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.84.1.tgz#ab7afe6212469639e1f1b7eb75e712c193414df1" - integrity sha512-157vdjSe7ts6LO3iltz2OckDIt7BbDnOP6PfxopJOrIQuqUEHUvwtDipgBjibm/2ejM+UP35i6YgrMj8O8V09Q== - dependencies: - "@simple-dom/interface" "^1.4.0" - "@glimmer/interfaces@0.84.2": version "0.84.2" resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.84.2.tgz#764cf92c954adcd1a851e5dc68ec1f6b654dc3bd" @@ -1260,16 +1253,16 @@ dependencies: "@simple-dom/interface" "^1.4.0" -"@glimmer/reference@0.84.1": - version "0.84.1" - resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.84.1.tgz#27a78b6c99bb3e9d89b16b2bed53ee4be68e56f6" - integrity sha512-X0XHH2xgDWiY4DuW1fxtGWi4D2aMPj5UEE6vRNhMQ/rsPi1R3wEGRKujFrIzttYdYhZXi7N7ETrBzCGRN0/HFA== +"@glimmer/reference@0.84.2": + version "0.84.2" + resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.84.2.tgz#c8d91a3ba0b92a9430b6023d7b6f39dd56c79af1" + integrity sha512-hH0VD76OXMsGSHbqaqD64u1aBEqy//jhZtIaHGwAHNpTEX+zDtW3ka298KbAn2CZyDDrNAnuc2U1Vy4COR3zlA== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.84.1" - "@glimmer/interfaces" "0.84.1" - "@glimmer/util" "0.84.1" - "@glimmer/validator" "0.84.1" + "@glimmer/global-context" "0.84.2" + "@glimmer/interfaces" "0.84.2" + "@glimmer/util" "0.84.2" + "@glimmer/validator" "0.84.2" "@glimmer/syntax@0.84.2": version "0.84.2" @@ -1281,15 +1274,6 @@ "@handlebars/parser" "~2.0.0" simple-html-tokenizer "^0.5.11" -"@glimmer/util@0.84.1": - version "0.84.1" - resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.84.1.tgz#62ff98f5a3c9bc5a31af2d9d9c4c8c9708b90e69" - integrity sha512-6cEGBo/NienZAO3nZTQfj57LBtABtlYLDjRuivIhSws3SkIFJsmLp2GcHuQw4vpuZfClyWAz1/W04B5xFX3C8w== - dependencies: - "@glimmer/env" "0.1.7" - "@glimmer/interfaces" "0.84.1" - "@simple-dom/interface" "^1.4.0" - "@glimmer/util@0.84.2": version "0.84.2" resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.84.2.tgz#2711ba40f25f44b2ea309cad49f5c2622c6211bc" @@ -1299,13 +1283,13 @@ "@glimmer/interfaces" "0.84.2" "@simple-dom/interface" "^1.4.0" -"@glimmer/validator@0.84.1": - version "0.84.1" - resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.84.1.tgz#648c9e84f0cfe72de295c8b1a3f588aa35ac5afb" - integrity sha512-ihgVtv0Sot7rm3AJvOH01tKFW/y2Ou2WDfuS3K8Sas2xPd6HLGSc7elNlzux6QXUjUVX6ICyFiS0jL12uoUIdw== +"@glimmer/validator@0.84.2": + version "0.84.2" + resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.84.2.tgz#29394d262cf8373fe20f4e225c1adc9857a4164b" + integrity sha512-9tpSmwiktsJDqriNEiFfyP+9prMSdk08THA6Ik71xS/sudBKxoDpul678uvyEYST/+Z23F8MxwKccC+QxCMXNA== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/global-context" "0.84.1" + "@glimmer/global-context" "0.84.2" "@handlebars/parser@~2.0.0": version "2.0.0" From e6334a3607f2c5966bb292f525b30502464b636a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 08:02:54 +0800 Subject: [PATCH 33/49] Build(deps): Bump semver from 7.3.6 to 7.3.7 (#12660) Bumps [semver](https://github.com/npm/node-semver) from 7.3.6 to 7.3.7. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v7.3.6...v7.3.7) --- updated-dependencies: - dependency-name: semver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 59aa6d25d..bf2fd3dd8 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "remark-math": "3.0.1", "remark-parse": "8.0.3", "resolve": "1.22.0", - "semver": "7.3.6", + "semver": "7.3.7", "string-width": "5.0.1", "strip-ansi": "7.0.1", "typescript": "4.6.3", diff --git a/yarn.lock b/yarn.lock index c459c0638..d1c1e5375 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4823,11 +4823,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.4.0: - version "7.8.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.0.tgz#649aaeb294a56297b5cbc5d70f198dcc5ebe5747" - integrity sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg== - magic-string@0.26.1: version "0.26.1" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.1.tgz#ba9b651354fa9512474199acecf9c6dbe93f97fd" @@ -5861,12 +5856,12 @@ semver@7.3.5: dependencies: lru-cache "^6.0.0" -semver@7.3.6, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6: - version "7.3.6" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b" - integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w== +semver@7.3.7, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: - lru-cache "^7.4.0" + lru-cache "^6.0.0" semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" From 5b043a2432dab28656562723afde8b64fec8af2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 21:23:44 +0800 Subject: [PATCH 34/49] Build(deps): Bump @typescript-eslint/typescript-estree from 5.18.0 to 5.20.0 (#12671) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index bf2fd3dd8..6fd2a2f6f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@babel/parser": "7.17.9", "@glimmer/syntax": "0.84.2", "@iarna/toml": "2.2.5", - "@typescript-eslint/typescript-estree": "5.18.0", + "@typescript-eslint/typescript-estree": "5.20.0", "acorn": "8.7.0", "acorn-jsx": "5.3.2", "angular-estree-parser": "2.5.0", diff --git a/yarn.lock b/yarn.lock index d1c1e5375..69278c122 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1751,28 +1751,15 @@ debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" - integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== - "@typescript-eslint/types@5.19.0": version "5.19.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.19.0.tgz#12d3d600d754259da771806ee8b2c842d3be8d12" integrity sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w== -"@typescript-eslint/typescript-estree@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" - integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== - dependencies: - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/visitor-keys" "5.18.0" - debug "^4.3.2" - globby "^11.0.4" - is-glob "^4.0.3" - semver "^7.3.5" - tsutils "^3.21.0" +"@typescript-eslint/types@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.20.0.tgz#fa39c3c2aa786568302318f1cb51fcf64258c20c" + integrity sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg== "@typescript-eslint/typescript-estree@5.19.0": version "5.19.0" @@ -1787,6 +1774,19 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz#ab73686ab18c8781bbf249c9459a55dc9417d6b0" + integrity sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w== + dependencies: + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/visitor-keys" "5.20.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.19.0", "@typescript-eslint/utils@^5.10.0": version "5.19.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.19.0.tgz#fe87f1e3003d9973ec361ed10d36b4342f1ded1e" @@ -1799,14 +1799,6 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" - integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== - dependencies: - "@typescript-eslint/types" "5.18.0" - eslint-visitor-keys "^3.0.0" - "@typescript-eslint/visitor-keys@5.19.0": version "5.19.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz#c84ebc7f6c744707a361ca5ec7f7f64cd85b8af6" @@ -1815,6 +1807,14 @@ "@typescript-eslint/types" "5.19.0" eslint-visitor-keys "^3.0.0" +"@typescript-eslint/visitor-keys@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz#70236b5c6b67fbaf8b2f58bf3414b76c1e826c2a" + integrity sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg== + dependencies: + "@typescript-eslint/types" "5.20.0" + eslint-visitor-keys "^3.0.0" + abab@^2.0.3, abab@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" From 56b3c6c7e48ba15b5eec3e8b447168949f220227 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 22 Apr 2022 18:49:27 +0800 Subject: [PATCH 35/49] Run tests on Node.js v18 (#12674) --- .github/workflows/dev-test.yml | 13 +++++++------ .github/workflows/prod-test.yml | 7 ++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index 1b829139c..a517d2f54 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -18,20 +18,21 @@ jobs: - "macos-latest" - "windows-latest" node: + - "18" - "16" - "14" include: # only enable coverage on the fastest job - os: "ubuntu-latest" - node: "16" + node: "18" ENABLE_CODE_COVERAGE: true FULL_TEST: true CHECK_TEST_PARSERS: true - # exclude: - # - os: "macos-latest" - # node: "14" - # - os: "windows-latest" - # node: "14" + exclude: + - os: "macos-latest" + node: "16" + - os: "windows-latest" + node: "16" env: ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }} FULL_TEST: ${{ matrix.FULL_TEST }} diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 19ad0f940..70f721f9a 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -67,19 +67,24 @@ jobs: - "macos-latest" - "windows-latest" node: + - "18" - "16" - "14" - "12" - "10" include: - os: "ubuntu-latest" - node: "16" + node: "18" FULL_TEST: true exclude: + - os: "macos-latest" + node: "16" - os: "macos-latest" node: "14" - os: "macos-latest" node: "12" + - os: "windows-latest" + node: "16" - os: "windows-latest" node: "14" - os: "windows-latest" From 29c4a3e559c2183dea89109c7274ca69db8008df Mon Sep 17 00:00:00 2001 From: chimurai <655241+chimurai@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:38:44 +0200 Subject: [PATCH 36/49] bugfix(graphql): Fix single line and empty description formatting (#12608) Co-authored-by: Harry Hopkinson <63599884+Harry-Hopkinson@users.noreply.github.com> Co-authored-by: fisker Cheung --- changelog_unreleased/graphql/12608.md | 59 ++++++++++ src/language-graphql/printer-graphql.js | 22 ++-- .../string/__snapshots__/jsfmt.spec.js.snap | 108 ++++++++++++++++++ .../format/graphql/string/description.graphql | 25 ++++ tests/format/graphql/string/string.graphql | 8 ++ 5 files changed, 215 insertions(+), 7 deletions(-) create mode 100644 changelog_unreleased/graphql/12608.md create mode 100644 tests/format/graphql/string/description.graphql diff --git a/changelog_unreleased/graphql/12608.md b/changelog_unreleased/graphql/12608.md new file mode 100644 index 000000000..3e6c2ac4c --- /dev/null +++ b/changelog_unreleased/graphql/12608.md @@ -0,0 +1,59 @@ +#### Fix single line and empty description formatting (#12608 by @chimurai, @fisker) + + +```graphql +# Input +""" Customer """ +type Person { + name: String +} + +"""""" +type Person { + name: String +} + +# Prettier 2.6.2 +""" + Customer +""" +type Person { + name: String +} + +""" + +""" +type Person { + name: String +} + +# Prettier 2.6.2 (second format) +""" +Customer +""" +type Person { + name: String +} + +""" + +""" +type Person { + name: String +} + +# Prettier main +""" +Customer +""" +type Person { + name: String +} + +""" +""" +type Person { + name: String +} +``` diff --git a/src/language-graphql/printer-graphql.js b/src/language-graphql/printer-graphql.js index e6838813c..a948880bc 100644 --- a/src/language-graphql/printer-graphql.js +++ b/src/language-graphql/printer-graphql.js @@ -125,13 +125,15 @@ function genericPrint(path, options, print) { } case "StringValue": { if (node.block) { - return [ - '"""', + const lines = node.value.replace(/"""/g, "\\$&").split("\n"); + if (lines.length === 1) { + lines[0] = lines[0].trim(); + } + + return join( hardline, - join(hardline, node.value.replace(/"""/g, "\\$&").split("\n")), - hardline, - '"""', - ]; + ['"""', ...(lines.length > 0 ? lines : []), '"""'].filter(Boolean) + ); } return [ '"', @@ -572,7 +574,13 @@ function printInterfaces(path, options, print) { return parts; } -function clean(/*node, newNode , parent*/) {} +function clean(node, newNode /* , parent */) { + // We print single line `""" string """` as multiple line string, + // and the parser ignores space in multiple line string + if (node.kind === "StringValue" && node.block && !node.value.includes("\n")) { + newNode.value = newNode.value.trim(); + } +} clean.ignoredProperties = new Set(["loc", "comments"]); function hasPrettierIgnore(path) { diff --git a/tests/format/graphql/string/__snapshots__/jsfmt.spec.js.snap b/tests/format/graphql/string/__snapshots__/jsfmt.spec.js.snap index 0ecf89041..c33b4febc 100644 --- a/tests/format/graphql/string/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/graphql/string/__snapshots__/jsfmt.spec.js.snap @@ -1,5 +1,82 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`description.graphql format 1`] = ` +====================================options===================================== +parsers: ["graphql"] +printWidth: 80 + | printWidth +=====================================input====================================== +""" Customer """ +type Person {name: String} + +""" Customer """ +type Person {name: String} + +""" + + Customer + + +""" +type Person {name: String} + +"""""" +type Person {name: String} + +""" """ +type Person {name: String} + +""" + 1 + 2 +""" +type Person {name: String} + +=====================================output===================================== +""" +Customer +""" +type Person { + name: String +} + +""" +Customer +""" +type Person { + name: String +} + +""" +Customer +""" +type Person { + name: String +} + +""" +""" +type Person { + name: String +} + +""" +""" +type Person { + name: String +} + +""" + 1 +2 +""" +type Person { + name: String +} + +================================================================================ +`; + exports[`string.graphql format 1`] = ` ====================================options===================================== parsers: ["graphql"] @@ -59,6 +136,14 @@ one: string foo(input: {multiline: "ab\\ncd"}) { id } } +{ + foo(input: {multiline: """ foo """}) { id } +} + +{ + foo(input: {multiline: """ """}) { id } +} + =====================================output===================================== query X($a: Int) @relay(meta: "{\\"lowPri\\": true}") { a @@ -129,5 +214,28 @@ input Input { } } +{ + foo( + input: { + multiline: """ + foo + """ + } + ) { + id + } +} + +{ + foo( + input: { + multiline: """ + """ + } + ) { + id + } +} + ================================================================================ `; diff --git a/tests/format/graphql/string/description.graphql b/tests/format/graphql/string/description.graphql new file mode 100644 index 000000000..c4f44850a --- /dev/null +++ b/tests/format/graphql/string/description.graphql @@ -0,0 +1,25 @@ +""" Customer """ +type Person {name: String} + +""" Customer """ +type Person {name: String} + +""" + + Customer + + +""" +type Person {name: String} + +"""""" +type Person {name: String} + +""" """ +type Person {name: String} + +""" + 1 + 2 +""" +type Person {name: String} diff --git a/tests/format/graphql/string/string.graphql b/tests/format/graphql/string/string.graphql index edf808a7b..d6b8ceb44 100644 --- a/tests/format/graphql/string/string.graphql +++ b/tests/format/graphql/string/string.graphql @@ -50,3 +50,11 @@ one: string { foo(input: {multiline: "ab\ncd"}) { id } } + +{ + foo(input: {multiline: """ foo """}) { id } +} + +{ + foo(input: {multiline: """ """}) { id } +} From 66585d9f250f11569456421e66a2407397e98f69 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 22 Apr 2022 20:51:41 +0800 Subject: [PATCH 37/49] Refactor JS utils (#12623) --- jest.config.js | 9 + src/language-js/clean.js | 16 +- src/language-js/utils/index.js | 225 +++++++++------------- src/language-js/utils/is-block-comment.js | 15 +- 4 files changed, 118 insertions(+), 147 deletions(-) diff --git a/jest.config.js b/jest.config.js index 4916c5915..39f8dc0dc 100644 --- a/jest.config.js +++ b/jest.config.js @@ -8,6 +8,9 @@ const isProduction = process.env.NODE_ENV === "production"; const ENABLE_CODE_COVERAGE = Boolean(process.env.ENABLE_CODE_COVERAGE); const TEST_STANDALONE = Boolean(process.env.TEST_STANDALONE); const INSTALL_PACKAGE = Boolean(process.env.INSTALL_PACKAGE); +const SKIP_TESTS_WITH_NEW_SYNTAX = + process.versions.node.startsWith("10.") || + process.versions.node.startsWith("12."); let PRETTIER_DIR = isProduction ? path.join(PROJECT_ROOT, "dist") @@ -52,6 +55,12 @@ if (isProduction) { ); } +if (SKIP_TESTS_WITH_NEW_SYNTAX) { + testPathIgnorePatterns.push( + "/tests/integration/__tests__/help-options.js" + ); +} + module.exports = { setupFiles: ["/tests/config/setup.js"], snapshotSerializers: [ diff --git a/src/language-js/clean.js b/src/language-js/clean.js index fa706ef35..f8b165e63 100644 --- a/src/language-js/clean.js +++ b/src/language-js/clean.js @@ -177,15 +177,13 @@ function clean(ast, newObj, parent) { // we will not trim the comment value and we will expect exactly one space on // either side of the GraphQL string // Also see ./embed.js - const hasLanguageComment = - ast.leadingComments && - ast.leadingComments.some( - (comment) => - isBlockComment(comment) && - ["GraphQL", "HTML"].some( - (languageName) => comment.value === ` ${languageName} ` - ) - ); + const hasLanguageComment = ast.leadingComments?.some( + (comment) => + isBlockComment(comment) && + ["GraphQL", "HTML"].some( + (languageName) => comment.value === ` ${languageName} ` + ) + ); if ( hasLanguageComment || (parent.type === "CallExpression" && parent.callee.name === "graphql") || diff --git a/src/language-js/utils/index.js b/src/language-js/utils/index.js index b005897e4..2c8238ec2 100644 --- a/src/language-js/utils/index.js +++ b/src/language-js/utils/index.js @@ -53,10 +53,8 @@ function hasFlowShorthandAnnotationComment(node) { // Syntax example: const r = new (window.Request /*: Class */)(""); return ( - node.extra && - node.extra.parenthesized && - isNonEmptyArray(node.trailingComments) && - isBlockComment(node.trailingComments[0]) && + node.extra?.parenthesized && + isBlockComment(node.trailingComments?.[0]) && FLOW_SHORTHAND_ANNOTATION.test(node.trailingComments[0].value) ); } @@ -66,10 +64,9 @@ function hasFlowShorthandAnnotationComment(node) { * @returns {boolean} */ function hasFlowAnnotationComment(comments) { + const firstComment = comments?.[0]; return ( - isNonEmptyArray(comments) && - isBlockComment(comments[0]) && - FLOW_ANNOTATION.test(comments[0].value) + isBlockComment(firstComment) && FLOW_ANNOTATION.test(firstComment.value) ); } @@ -118,12 +115,12 @@ function getLeftSide(node) { return node.expressions[0]; } return ( - node.left || - node.test || - node.callee || - node.object || - node.tag || - node.argument || + node.left ?? + node.test ?? + node.callee ?? + node.object ?? + node.tag ?? + node.argument ?? node.expression ); } @@ -156,37 +153,36 @@ function getLeftSidePathName(path, node) { throw new Error("Unexpected node has no left side."); } +function createTypeCheckFunction(types) { + types = new Set(types); + return (node) => types.has(node?.type); +} + /** * @param {Comment} comment * @returns {boolean} */ -function isLineComment(comment) { - return ( - comment.type === "Line" || - comment.type === "CommentLine" || - // `meriyah` has `SingleLine`, `HashbangComment`, `HTMLOpen`, and `HTMLClose` - comment.type === "SingleLine" || - comment.type === "HashbangComment" || - comment.type === "HTMLOpen" || - comment.type === "HTMLClose" - ); -} - -const exportDeclarationTypes = new Set([ - "ExportDefaultDeclaration", - "ExportDefaultSpecifier", - "DeclareExportDeclaration", - "ExportNamedDeclaration", - "ExportAllDeclaration", +const isLineComment = createTypeCheckFunction([ + "Line", + "CommentLine", + // `meriyah` has `SingleLine`, `HashbangComment`, `HTMLOpen`, and `HTMLClose` + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", ]); /** * @param {Node} node * @returns {boolean} */ -function isExportDeclaration(node) { - return node && exportDeclarationTypes.has(node.type); -} +const isExportDeclaration = createTypeCheckFunction([ + "ExportDefaultDeclaration", + "ExportDefaultSpecifier", + "DeclareExportDeclaration", + "ExportNamedDeclaration", + "ExportAllDeclaration", +]); /** * @param {AstPath} path @@ -205,22 +201,20 @@ function getParentExportDeclaration(path) { * @param {Node} node * @returns {boolean} */ -function isLiteral(node) { - return ( - node.type === "BooleanLiteral" || - node.type === "DirectiveLiteral" || - node.type === "Literal" || - node.type === "NullLiteral" || - node.type === "NumericLiteral" || - node.type === "BigIntLiteral" || - node.type === "DecimalLiteral" || - node.type === "RegExpLiteral" || - node.type === "StringLiteral" || - node.type === "TemplateLiteral" || - node.type === "TSTypeLiteral" || - node.type === "JSXText" - ); -} +const isLiteral = createTypeCheckFunction([ + "BooleanLiteral", + "DirectiveLiteral", + "Literal", + "NullLiteral", + "NumericLiteral", + "BigIntLiteral", + "DecimalLiteral", + "RegExpLiteral", + "StringLiteral", + "TemplateLiteral", + "TSTypeLiteral", + "JSXText", +]); /** * @param {Node} node @@ -256,24 +250,20 @@ function isStringLiteral(node) { * @param {Node} node * @returns {boolean} */ -function isObjectType(node) { - return ( - node.type === "ObjectTypeAnnotation" || - node.type === "TSTypeLiteral" || - node.type === "TSMappedType" - ); -} +const isObjectType = createTypeCheckFunction([ + "ObjectTypeAnnotation", + "TSTypeLiteral", + "TSMappedType", +]); /** * @param {Node} node * @returns {boolean} */ -function isFunctionOrArrowExpression(node) { - return ( - node.type === "FunctionExpression" || - node.type === "ArrowFunctionExpression" - ); -} +const isFunctionOrArrowExpression = createTypeCheckFunction([ + "FunctionExpression", + "ArrowFunctionExpression", +]); /** * @param {Node} node @@ -287,14 +277,6 @@ function isFunctionOrArrowExpressionWithBody(node) { ); } -/** - * @param {Node} node - * @returns {boolean} - */ -function isTemplateLiteral(node) { - return node.type === "TemplateLiteral"; -} - /** * Note: `inject` is used in AngularJS 1.x, `async` and `fakeAsync` in * Angular 2+, although `async` is deprecated and replaced by `waitForAsync` @@ -317,9 +299,7 @@ function isAngularTestWrapper(node) { * @param {Node} node * @returns {boolean} */ -function isJsxNode(node) { - return node.type === "JSXElement" || node.type === "JSXFragment"; -} +const isJsxNode = createTypeCheckFunction(["JSXElement", "JSXFragment"]); function isTheOnlyJsxElementInMarkdown(options, path) { if (options.parentParser !== "markdown" && options.parentParser !== "mdx") { @@ -376,19 +356,15 @@ function isTypeAnnotationAFunction(node) { ); } -const binaryishNodeTypes = new Set([ - "BinaryExpression", - "LogicalExpression", - "NGPipeExpression", -]); - /** * @param {Node} node * @returns {boolean} */ -function isBinaryish(node) { - return binaryishNodeTypes.has(node.type); -} +const isBinaryish = createTypeCheckFunction([ + "BinaryExpression", + "LogicalExpression", + "NGPipeExpression", +]); /** * @param {Node} node @@ -517,7 +493,7 @@ function isTestCall(node, parent) { ((node.callee.type === "Identifier" && unitTestRe.test(node.callee.name)) || isSkipOrOnlyBlock(node)) && - (isTemplateLiteral(node.arguments[0]) || + (node.arguments[0].type === "TemplateLiteral" || isStringLiteral(node.arguments[0])) ) { // it("name", () => { ... }, 2500) @@ -540,24 +516,19 @@ function isTestCall(node, parent) { * @param {Node} node * @returns {boolean} */ -function isCallExpression(node) { - return ( - node && - (node.type === "CallExpression" || node.type === "OptionalCallExpression") - ); -} +const isCallExpression = createTypeCheckFunction([ + "CallExpression", + "OptionalCallExpression", +]); /** * @param {Node} node * @returns {boolean} */ -function isMemberExpression(node) { - return ( - node && - (node.type === "MemberExpression" || - node.type === "OptionalMemberExpression") - ); -} +const isMemberExpression = createTypeCheckFunction([ + "MemberExpression", + "OptionalMemberExpression", +]); /** * @@ -621,12 +592,8 @@ function isSimpleTemplateLiteral(node) { * @returns {string} */ function getTypeScriptMappedTypeModifier(tokenNode, keyword) { - if (tokenNode === "+") { - return "+" + keyword; - } - - if (tokenNode === "-") { - return "-" + keyword; + if (tokenNode === "+" || tokenNode === "-") { + return tokenNode + keyword; } return keyword; @@ -919,7 +886,7 @@ function isSimpleCallArgument(node, depth) { } function rawText(node) { - return node.extra ? node.extra.raw : node.raw; + return node.extra?.raw ?? node.raw; } function identity(x) { @@ -1072,29 +1039,27 @@ function shouldFlatten(parentOp, nodeOp) { return true; } -const PRECEDENCE = {}; -for (const [i, tier] of [ - ["|>"], - ["??"], - ["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"], - ["**"], -].entries()) { - for (const op of tier) { - PRECEDENCE[op] = i; - } -} - -function getPrecedence(op) { - return PRECEDENCE[op]; +const PRECEDENCE = new Map( + [ + ["|>"], + ["??"], + ["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"], + ["**"], + ].flatMap((operators, index) => + operators.map((operator) => [operator, index]) + ) +); +function getPrecedence(operator) { + return PRECEDENCE.get(operator); } function getLeftMost(node) { @@ -1118,7 +1083,7 @@ function hasRestParameter(node) { return true; } const parameters = getFunctionParameters(node); - return parameters.length > 0 && getLast(parameters).type === "RestElement"; + return getLast(parameters)?.type === "RestElement"; } const functionParametersCache = new WeakMap(); @@ -1256,7 +1221,7 @@ const getCommentTestFunction = (flags, fn) => { * @returns {boolean} */ function hasComment(node, flags, fn) { - if (!node || !isNonEmptyArray(node.comments)) { + if (!isNonEmptyArray(node?.comments)) { return false; } const test = getCommentTestFunction(flags, fn); @@ -1270,7 +1235,7 @@ function hasComment(node, flags, fn) { * @returns {Comment[]} */ function getComments(node, flags, fn) { - if (!node || !Array.isArray(node.comments)) { + if (!Array.isArray(node?.comments)) { return []; } const test = getCommentTestFunction(flags, fn); diff --git a/src/language-js/utils/is-block-comment.js b/src/language-js/utils/is-block-comment.js index 00a1c122c..278760583 100644 --- a/src/language-js/utils/is-block-comment.js +++ b/src/language-js/utils/is-block-comment.js @@ -4,17 +4,16 @@ * @typedef {import("../types/estree").Comment} Comment */ +const BLOCK_COMMENT_TYPES = new Set([ + "Block", + "CommentBlock", + // `meriyah` + "MultiLine", +]); /** * @param {Comment} comment * @returns {boolean} */ -function isBlockComment(comment) { - return ( - comment.type === "Block" || - comment.type === "CommentBlock" || - // `meriyah` - comment.type === "MultiLine" - ); -} +const isBlockComment = (comment) => BLOCK_COMMENT_TYPES.has(comment?.type); module.exports = isBlockComment; From b77555bf6a9f2d96e428579b3dbc64ebf10a7bc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 10:25:25 +0800 Subject: [PATCH 38/49] Build(deps): Bump codecov/codecov-action from 3.0.0 to 3.1.0 (#12685) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dev-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index a517d2f54..44d7e7289 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -61,7 +61,7 @@ jobs: run: yarn test --maxWorkers=2 - name: Upload Coverage - uses: codecov/codecov-action@v3.0.0 + uses: codecov/codecov-action@v3.1.0 if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: fail_ci_if_error: true @@ -73,7 +73,7 @@ jobs: PRETTIER_FALLBACK_RESOLVE: true - name: Upload Coverage (PRETTIER_FALLBACK_RESOLVE) - uses: codecov/codecov-action@v3.0.0 + uses: codecov/codecov-action@v3.1.0 if: ${{ matrix.ENABLE_CODE_COVERAGE }} with: fail_ci_if_error: true From 59200a78ab5add184222e3566f0d84381593c942 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 10:25:56 +0800 Subject: [PATCH 39/49] Build(deps-dev): Bump eslint-plugin-regexp from 1.6.0 to 1.7.0 (#12689) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 6fd2a2f6f..de49d6440 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "eslint-plugin-jest": "26.1.4", "eslint-plugin-prettier-internal-rules": "2.0.1", "eslint-plugin-react": "7.29.4", - "eslint-plugin-regexp": "1.6.0", + "eslint-plugin-regexp": "1.7.0", "eslint-plugin-unicorn": "42.0.0", "esm-utils": "3.0.0", "execa": "6.1.0", diff --git a/yarn.lock b/yarn.lock index 69278c122..f86f77a4a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3079,17 +3079,17 @@ eslint-plugin-react@7.29.4: semver "^6.3.0" string.prototype.matchall "^4.0.6" -eslint-plugin-regexp@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-1.6.0.tgz#d757e40e53b51b67b84194387495e346774eca86" - integrity sha512-xkaQOzyY4PUukRd8b6zTq+QTtg0dePlCP2dZiM+XGSmvlpDeYiPJHfRDpAfS/sP9YtK6q7DGes1smCyPTD3Lkg== +eslint-plugin-regexp@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-1.7.0.tgz#19b3c98f4f4d5314242ecc8936346b1936de523e" + integrity sha512-nmhXqrEP+O+dz2z5MSkc41u/4fA8oakweoCUdfYwox7DBhzadEqZz8T+s6/UiY0NIU0kv+3UrzBfhPp4wUxbaA== dependencies: comment-parser "^1.1.2" eslint-utils "^3.0.0" grapheme-splitter "^1.0.4" jsdoctypeparser "^9.0.0" refa "^0.9.0" - regexp-ast-analysis "^0.3.0" + regexp-ast-analysis "^0.5.1" regexpp "^3.2.0" scslre "^0.1.6" @@ -5599,10 +5599,10 @@ regexp-ast-analysis@^0.2.3: refa "^0.9.0" regexpp "^3.2.0" -regexp-ast-analysis@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.3.0.tgz#386f177dfe5abc5ac58b51eb5962beac64e898ce" - integrity sha512-11PlbBSUxwWpdj6BdZUKfhDdV9g+cveqHB+BqBQDBD7ZermDBVgtyowUaXTvT0dO3tZYo2bDIr/GoED6X1aYSA== +regexp-ast-analysis@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.5.1.tgz#f7c94e6199d6752f3430ae7a1d7a5978114197fb" + integrity sha512-Ca/g9gaTNuMewLuu+mBIq4vCrGRSO8AE9bP32NMQjJ/wBTdWq0g96qLkBb0NbGwEbp7S/q+NQF3o7veeuRfg0g== dependencies: refa "^0.9.0" regexpp "^3.2.0" From a9de2a128cc8eea84ddd90efdc210378a894ab6b Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Sun, 24 Apr 2022 10:28:20 +0800 Subject: [PATCH 40/49] Minor refactor (#12681) --- src/language-graphql/printer-graphql.js | 6 ++---- src/language-handlebars/parser-glimmer.js | 2 +- src/language-handlebars/printer-glimmer.js | 6 +++--- src/language-handlebars/utils.js | 10 +++++----- src/language-markdown/pragma.js | 2 +- src/language-markdown/printer-markdown.js | 10 ++++------ src/language-markdown/utils.js | 10 +++------- src/language-yaml/parser-yaml.js | 2 +- src/language-yaml/printer-yaml.js | 2 +- src/language-yaml/utils.js | 10 +++++----- 10 files changed, 26 insertions(+), 34 deletions(-) diff --git a/src/language-graphql/printer-graphql.js b/src/language-graphql/printer-graphql.js index a948880bc..fb70c360a 100644 --- a/src/language-graphql/printer-graphql.js +++ b/src/language-graphql/printer-graphql.js @@ -585,10 +585,8 @@ clean.ignoredProperties = new Set(["loc", "comments"]); function hasPrettierIgnore(path) { const node = path.getValue(); - return ( - node && - Array.isArray(node.comments) && - node.comments.some((comment) => comment.value.trim() === "prettier-ignore") + return node?.comments?.some( + (comment) => comment.value.trim() === "prettier-ignore" ); } diff --git a/src/language-handlebars/parser-glimmer.js b/src/language-handlebars/parser-glimmer.js index 191cc494a..c214b47d5 100644 --- a/src/language-handlebars/parser-glimmer.js +++ b/src/language-handlebars/parser-glimmer.js @@ -13,7 +13,7 @@ function addBackslash(/* options*/) { name: "addBackslash", visitor: { All(node) { - const childrenOrBody = node.children || node.body; + const childrenOrBody = node.children ?? node.body; if (childrenOrBody) { for (let i = 0; i < childrenOrBody.length - 1; i++) { if ( diff --git a/src/language-handlebars/printer-glimmer.js b/src/language-handlebars/printer-glimmer.js index 49df8a0c9..6310f4fd1 100644 --- a/src/language-handlebars/printer-glimmer.js +++ b/src/language-handlebars/printer-glimmer.js @@ -735,14 +735,14 @@ function needsOppositeQuote(path) { /* SubExpression print helpers */ function printSubExpressionPathAndParams(path, print) { - const p = printPath(path, print); + const printed = printPath(path, print); const params = printParams(path, print); if (!params) { - return p; + return printed; } - return indent([p, line, group(params)]); + return indent([printed, line, group(params)]); } /* misc. print helpers */ diff --git a/src/language-handlebars/utils.js b/src/language-handlebars/utils.js index b6bc2f57f..07e4c5754 100644 --- a/src/language-handlebars/utils.js +++ b/src/language-handlebars/utils.js @@ -32,7 +32,7 @@ function isGlimmerComponent(node) { return ( isNodeOfSomeType(node, ["ElementNode"]) && typeof node.tag === "string" && - node.tag[0] !== ":" && + !node.tag.startsWith(":") && (isUppercase(node.tag[0]) || node.tag.includes(".")) ); } @@ -40,9 +40,9 @@ function isGlimmerComponent(node) { const voidTags = new Set(htmlVoidElements); function isVoid(node) { return ( + voidTags.has(node.tag) || (isGlimmerComponent(node) && - node.children.every((node) => isWhitespaceNode(node))) || - voidTags.has(node.tag) + node.children.every((node) => isWhitespaceNode(node))) ); } @@ -71,9 +71,9 @@ function isNextNodeOfSomeType(path, types) { function getSiblingNode(path, offset) { const node = path.getValue(); - const parentNode = path.getParentNode(0) || {}; + const parentNode = path.getParentNode(0) ?? {}; const children = - parentNode.children || parentNode.body || parentNode.parts || []; + parentNode.children ?? parentNode.body ?? parentNode.parts ?? []; const index = children.indexOf(node); return index !== -1 && children[index + offset]; } diff --git a/src/language-markdown/pragma.js b/src/language-markdown/pragma.js index 463751b8d..5fe995b14 100644 --- a/src/language-markdown/pragma.js +++ b/src/language-markdown/pragma.js @@ -15,7 +15,7 @@ function startWithPragma(text) { "m" ); const matched = text.match(regex); - return matched && matched.index === 0; + return matched?.index === 0; } module.exports = { diff --git a/src/language-markdown/printer-markdown.js b/src/language-markdown/printer-markdown.js index 1cd5f82ca..f13f116bd 100644 --- a/src/language-markdown/printer-markdown.js +++ b/src/language-markdown/printer-markdown.js @@ -782,7 +782,7 @@ function isPrettierIgnore(node) { } } - return match ? (match[1] ? match[1] : "next") : false; + return match ? match[1] || "next" : false; } function shouldPrePrintHardline(node, data) { @@ -804,21 +804,19 @@ function shouldPrePrintDoubleHardline(node, data) { data.parentNode.type === "listItem" && !data.parentNode.loose; const isPrevNodeLooseListItem = - data.prevNode && data.prevNode.type === "listItem" && data.prevNode.loose; + data.prevNode?.type === "listItem" && data.prevNode.loose; const isPrevNodePrettierIgnore = isPrettierIgnore(data.prevNode) === "next"; const isBlockHtmlWithoutBlankLineBetweenPrevHtml = node.type === "html" && - data.prevNode && - data.prevNode.type === "html" && + data.prevNode?.type === "html" && data.prevNode.position.end.line + 1 === node.position.start.line; const isHtmlDirectAfterListItem = node.type === "html" && data.parentNode.type === "listItem" && - data.prevNode && - data.prevNode.type === "paragraph" && + data.prevNode?.type === "paragraph" && data.prevNode.position.end.line + 1 === node.position.start.line; return ( diff --git a/src/language-markdown/utils.js b/src/language-markdown/utils.js index 1cc85e2bf..9d42a43ef 100644 --- a/src/language-markdown/utils.js +++ b/src/language-markdown/utils.js @@ -221,15 +221,11 @@ function mapAst(ast, handler) { } function isAutolink(node) { - if (!node || node.type !== "link" || node.children.length !== 1) { + if (node?.type !== "link" || node.children.length !== 1) { return false; } - const child = node.children[0]; - return ( - child && - locStart(node) === locStart(child) && - locEnd(node) === locEnd(child) - ); + const [child] = node.children; + return locStart(node) === locStart(child) && locEnd(node) === locEnd(child); } module.exports = { diff --git a/src/language-yaml/parser-yaml.js b/src/language-yaml/parser-yaml.js index d89995a34..993976008 100644 --- a/src/language-yaml/parser-yaml.js +++ b/src/language-yaml/parser-yaml.js @@ -20,7 +20,7 @@ function parse(text) { return root; } catch (error) { - if (error && error.position) { + if (error?.position) { throw createError(error.message, error.position); } diff --git a/src/language-yaml/printer-yaml.js b/src/language-yaml/printer-yaml.js index 272eb97ba..9ba7ccf74 100644 --- a/src/language-yaml/printer-yaml.js +++ b/src/language-yaml/printer-yaml.js @@ -329,7 +329,7 @@ function printNode(node, parentNode, path, options, print) { case "sequence": return join(hardline, path.map(print, "children")); case "sequenceItem": - return ["- ", alignWithSpaces(2, !node.content ? "" : print("content"))]; + return ["- ", alignWithSpaces(2, node.content ? print("content") : "")]; case "mappingKey": case "mappingValue": return !node.content ? "" : print("content"); diff --git a/src/language-yaml/utils.js b/src/language-yaml/utils.js index 39b768fcc..c441126ba 100644 --- a/src/language-yaml/utils.js +++ b/src/language-yaml/utils.js @@ -138,23 +138,23 @@ function hasComments(node) { } function hasLeadingComments(node) { - return node && isNonEmptyArray(node.leadingComments); + return isNonEmptyArray(node?.leadingComments); } function hasMiddleComments(node) { - return node && isNonEmptyArray(node.middleComments); + return isNonEmptyArray(node?.middleComments); } function hasIndicatorComment(node) { - return node && node.indicatorComment; + return node?.indicatorComment; } function hasTrailingComment(node) { - return node && node.trailingComment; + return node?.trailingComment; } function hasEndComments(node) { - return node && isNonEmptyArray(node.endComments); + return isNonEmptyArray(node?.endComments); } /** From f7c0a02ddcd31d8f13eacb83d0aaf446fc8477ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:53:55 +0800 Subject: [PATCH 41/49] Build(deps-dev): Bump eslint from 8.13.0 to 8.14.0 (#12687) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index de49d6440..6bc2395be 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "enquirer": "2.3.6", "esbuild": "0.14.36", "esbuild-visualizer": "0.3.1", - "eslint": "8.13.0", + "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", "eslint-formatter-friendly": "7.0.0", "eslint-plugin-compat": "4.0.2", diff --git a/yarn.lock b/yarn.lock index f86f77a4a..cc4cdeabb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1219,10 +1219,10 @@ escape-string-regexp "^4.0.0" rollup-plugin-node-polyfills "^0.2.1" -"@eslint/eslintrc@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.1.tgz#8b5e1c49f4077235516bc9ec7d41378c0f69b8c6" - integrity sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ== +"@eslint/eslintrc@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.2.tgz#4989b9e8c0216747ee7cca314ae73791bb281aae" + integrity sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -3146,12 +3146,12 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.13.0.tgz#6fcea43b6811e655410f5626cfcf328016badcd7" - integrity sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ== +eslint@8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.14.0.tgz#62741f159d9eb4a79695b28ec4989fcdec623239" + integrity sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw== dependencies: - "@eslint/eslintrc" "^1.2.1" + "@eslint/eslintrc" "^1.2.2" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" From 3b8655b11bffc506921b59da74b54a51551ed62a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:54:19 +0800 Subject: [PATCH 42/49] Build(deps-dev): Bump eslint-plugin-jest from 26.1.4 to 26.1.5 (#12686) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6bc2395be..433d40d23 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "eslint-formatter-friendly": "7.0.0", "eslint-plugin-compat": "4.0.2", "eslint-plugin-import": "2.26.0", - "eslint-plugin-jest": "26.1.4", + "eslint-plugin-jest": "26.1.5", "eslint-plugin-prettier-internal-rules": "2.0.1", "eslint-plugin-react": "7.29.4", "eslint-plugin-regexp": "1.7.0", diff --git a/yarn.lock b/yarn.lock index cc4cdeabb..5d5b45f58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3047,10 +3047,10 @@ eslint-plugin-import@2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jest@26.1.4: - version "26.1.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.4.tgz#8e3410093ff4439d0c3a371add5bf9e05623a57a" - integrity sha512-wgqxujmqc2qpvZqMFWCh6Cniqc8lWpapvXt9j/19DmBDqeDaYhJrSRezYR1SKyemvjx+9e9kny/dgRahraHImA== +eslint-plugin-jest@26.1.5: + version "26.1.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.5.tgz#6cfca264818d6d6aa120b019dab4d62b6aa8e775" + integrity sha512-su89aDuljL9bTjEufTXmKUMSFe2kZUL9bi7+woq+C2ukHZordhtfPm4Vg+tdioHBaKf8v3/FXW9uV0ksqhYGFw== dependencies: "@typescript-eslint/utils" "^5.10.0" From 728b7a0b627d0e8c587fa22e030a896e638e5bd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:56:38 +0800 Subject: [PATCH 43/49] Build(deps-dev): Bump core-js from 3.22.0 to 3.22.2 (#12693) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 433d40d23..2f5220c7b 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "babel-jest": "27.5.1", "benchmark": "2.1.4", "browserslist-to-esbuild": "1.1.1", - "core-js": "3.22.0", + "core-js": "3.22.2", "cross-env": "7.0.3", "cspell": "5.19.7", "enquirer": "2.3.6", diff --git a/yarn.lock b/yarn.lock index 5d5b45f58..146a95288 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2421,10 +2421,10 @@ core-js-compat@^3.20.2, core-js-compat@^3.21.0: browserslist "^4.19.1" semver "7.0.0" -core-js@3.22.0, core-js@^3.16.2: - version "3.22.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.0.tgz#b52007870c5e091517352e833b77f0b2d2b259f3" - integrity sha512-8h9jBweRjMiY+ORO7bdWSeWfHhLPO7whobj7Z2Bl0IDo00C228EdGgH7FE4jGumbEjzcFfkfW8bXgdkEDhnwHQ== +core-js@3.22.2, core-js@^3.16.2: + version "3.22.2" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.2.tgz#3ea0a245b0895fa39d1faa15fe75d91ade504a01" + integrity sha512-Z5I2vzDnEIqO2YhELVMFcL1An2CIsFe9Q7byZhs8c/QxummxZlAHw33TUHbIte987LkisOgL0LwQ1P9D6VISnA== core-util-is@^1.0.3: version "1.0.3" From c46b3ea033dce9b02731ddcbced41bf2f0612519 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:57:58 +0800 Subject: [PATCH 44/49] Build(deps-dev): Bump esbuild from 0.14.36 to 0.14.38 (#12692) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 208 +++++++++++++++++++++++++-------------------------- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index 2f5220c7b..7d73276e1 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "cross-env": "7.0.3", "cspell": "5.19.7", "enquirer": "2.3.6", - "esbuild": "0.14.36", + "esbuild": "0.14.38", "esbuild-visualizer": "0.3.1", "eslint": "8.14.0", "eslint-config-prettier": "8.5.0", diff --git a/yarn.lock b/yarn.lock index 146a95288..a0ff333e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2810,90 +2810,90 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild-android-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.36.tgz#fc5f95ce78c8c3d790fa16bc71bd904f2bb42aa1" - integrity sha512-jwpBhF1jmo0tVCYC/ORzVN+hyVcNZUWuozGcLHfod0RJCedTDTvR4nwlTXdx1gtncDqjk33itjO+27OZHbiavw== +esbuild-android-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.38.tgz#5b94a1306df31d55055f64a62ff6b763a47b7f64" + integrity sha512-aRFxR3scRKkbmNuGAK+Gee3+yFxkTJO/cx83Dkyzo4CnQl/2zVSurtG6+G86EQIZ+w+VYngVyK7P3HyTBKu3nw== -esbuild-android-arm64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.36.tgz#44356fbb9f8de82a5cdf11849e011dfb3ad0a8a8" - integrity sha512-/hYkyFe7x7Yapmfv4X/tBmyKnggUmdQmlvZ8ZlBnV4+PjisrEhAvC3yWpURuD9XoB8Wa1d5dGkTsF53pIvpjsg== +esbuild-android-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.38.tgz#78acc80773d16007de5219ccce544c036abd50b8" + integrity sha512-L2NgQRWuHFI89IIZIlpAcINy9FvBk6xFVZ7xGdOwIm8VyhX1vNCEqUJO3DPSSy945Gzdg98cxtNt8Grv1CsyhA== -esbuild-darwin-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.36.tgz#3d9324b21489c70141665c2e740d6e84f16f725d" - integrity sha512-kkl6qmV0dTpyIMKagluzYqlc1vO0ecgpviK/7jwPbRDEv5fejRTaBBEE2KxEQbTHcLhiiDbhG7d5UybZWo/1zQ== +esbuild-darwin-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.38.tgz#e02b1291f629ebdc2aa46fabfacc9aa28ff6aa46" + integrity sha512-5JJvgXkX87Pd1Og0u/NJuO7TSqAikAcQQ74gyJ87bqWRVeouky84ICoV4sN6VV53aTW+NE87qLdGY4QA2S7KNA== -esbuild-darwin-arm64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.36.tgz#2a8040c2e465131e5281034f3c72405e643cb7b2" - integrity sha512-q8fY4r2Sx6P0Pr3VUm//eFYKVk07C5MHcEinU1BjyFnuYz4IxR/03uBbDwluR6ILIHnZTE7AkTUWIdidRi1Jjw== +esbuild-darwin-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.38.tgz#01eb6650ec010b18c990e443a6abcca1d71290a9" + integrity sha512-eqF+OejMI3mC5Dlo9Kdq/Ilbki9sQBw3QlHW3wjLmsLh+quNfHmGMp3Ly1eWm981iGBMdbtSS9+LRvR2T8B3eQ== -esbuild-freebsd-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.36.tgz#d82c387b4d01fe9e8631f97d41eb54f2dbeb68a3" - integrity sha512-Hn8AYuxXXRptybPqoMkga4HRFE7/XmhtlQjXFHoAIhKUPPMeJH35GYEUWGbjteai9FLFvBAjEAlwEtSGxnqWww== +esbuild-freebsd-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.38.tgz#790b8786729d4aac7be17648f9ea8e0e16475b5e" + integrity sha512-epnPbhZUt93xV5cgeY36ZxPXDsQeO55DppzsIgWM8vgiG/Rz+qYDLmh5ts3e+Ln1wA9dQ+nZmVHw+RjaW3I5Ig== -esbuild-freebsd-arm64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.36.tgz#e8ce2e6c697da6c7ecd0cc0ac821d47c5ab68529" - integrity sha512-S3C0attylLLRiCcHiJd036eDEMOY32+h8P+jJ3kTcfhJANNjP0TNBNL30TZmEdOSx/820HJFgRrqpNAvTbjnDA== +esbuild-freebsd-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.38.tgz#b66340ab28c09c1098e6d9d8ff656db47d7211e6" + integrity sha512-/9icXUYJWherhk+y5fjPI5yNUdFPtXHQlwP7/K/zg8t8lQdHVj20SqU9/udQmeUo5pDFHMYzcEFfJqgOVeKNNQ== -esbuild-linux-32@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.36.tgz#a4a261e2af91986ea62451f2db712a556cb38a15" - integrity sha512-Eh9OkyTrEZn9WGO4xkI3OPPpUX7p/3QYvdG0lL4rfr73Ap2HAr6D9lP59VMF64Ex01LhHSXwIsFG/8AQjh6eNw== +esbuild-linux-32@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.38.tgz#7927f950986fd39f0ff319e92839455912b67f70" + integrity sha512-QfgfeNHRFvr2XeHFzP8kOZVnal3QvST3A0cgq32ZrHjSMFTdgXhMhmWdKzRXP/PKcfv3e2OW9tT9PpcjNvaq6g== -esbuild-linux-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.36.tgz#4a9500f9197e2c8fcb884a511d2c9d4c2debde72" - integrity sha512-vFVFS5ve7PuwlfgoWNyRccGDi2QTNkQo/2k5U5ttVD0jRFaMlc8UQee708fOZA6zTCDy5RWsT5MJw3sl2X6KDg== +esbuild-linux-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.38.tgz#4893d07b229d9cfe34a2b3ce586399e73c3ac519" + integrity sha512-uuZHNmqcs+Bj1qiW9k/HZU3FtIHmYiuxZ/6Aa+/KHb/pFKr7R3aVqvxlAudYI9Fw3St0VCPfv7QBpUITSmBR1Q== -esbuild-linux-arm64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.36.tgz#c91c21e25b315464bd7da867365dd1dae14ca176" - integrity sha512-24Vq1M7FdpSmaTYuu1w0Hdhiqkbto1I5Pjyi+4Cdw5fJKGlwQuw+hWynTcRI/cOZxBcBpP21gND7W27gHAiftw== +esbuild-linux-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.38.tgz#8442402e37d0b8ae946ac616784d9c1a2041056a" + integrity sha512-HlMGZTEsBrXrivr64eZ/EO0NQM8H8DuSENRok9d+Jtvq8hOLzrxfsAT9U94K3KOGk2XgCmkaI2KD8hX7F97lvA== -esbuild-linux-arm@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.36.tgz#90e23bca2e6e549affbbe994f80ba3bb6c4d934a" - integrity sha512-NhgU4n+NCsYgt7Hy61PCquEz5aevI6VjQvxwBxtxrooXsxt5b2xtOUXYZe04JxqQo+XZk3d1gcr7pbV9MAQ/Lg== +esbuild-linux-arm@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.38.tgz#d5dbf32d38b7f79be0ec6b5fb2f9251fd9066986" + integrity sha512-FiFvQe8J3VKTDXG01JbvoVRXQ0x6UZwyrU4IaLBZeq39Bsbatd94Fuc3F1RGqPF5RbIWW7RvkVQjn79ejzysnA== -esbuild-linux-mips64le@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.36.tgz#40e11afb08353ff24709fc89e4db0f866bc131d2" - integrity sha512-hZUeTXvppJN+5rEz2EjsOFM9F1bZt7/d2FUM1lmQo//rXh1RTFYzhC0txn7WV0/jCC7SvrGRaRz0NMsRPf8SIA== +esbuild-linux-mips64le@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.38.tgz#95081e42f698bbe35d8ccee0e3a237594b337eb5" + integrity sha512-qd1dLf2v7QBiI5wwfil9j0HG/5YMFBAmMVmdeokbNAMbcg49p25t6IlJFXAeLzogv1AvgaXRXvgFNhScYEUXGQ== -esbuild-linux-ppc64le@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.36.tgz#9e8a588c513d06cc3859f9dcc52e5fdfce8a1a5e" - integrity sha512-1Bg3QgzZjO+QtPhP9VeIBhAduHEc2kzU43MzBnMwpLSZ890azr4/A9Dganun8nsqD/1TBcqhId0z4mFDO8FAvg== +esbuild-linux-ppc64le@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.38.tgz#dceb0a1b186f5df679618882a7990bd422089b47" + integrity sha512-mnbEm7o69gTl60jSuK+nn+pRsRHGtDPfzhrqEUXyCl7CTOCLtWN2bhK8bgsdp6J/2NyS/wHBjs1x8aBWwP2X9Q== -esbuild-linux-riscv64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.36.tgz#e578c09b23b3b97652e60e3692bfda628b541f06" - integrity sha512-dOE5pt3cOdqEhaufDRzNCHf5BSwxgygVak9UR7PH7KPVHwSTDAZHDoEjblxLqjJYpc5XaU9+gKJ9F8mp9r5I4A== +esbuild-linux-riscv64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.38.tgz#61fb8edb75f475f9208c4a93ab2bfab63821afd2" + integrity sha512-+p6YKYbuV72uikChRk14FSyNJZ4WfYkffj6Af0/Tw63/6TJX6TnIKE+6D3xtEc7DeDth1fjUOEqm+ApKFXbbVQ== -esbuild-linux-s390x@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.36.tgz#3c9dab40d0d69932ffded0fd7317bb403626c9bc" - integrity sha512-g4FMdh//BBGTfVHjF6MO7Cz8gqRoDPzXWxRvWkJoGroKA18G9m0wddvPbEqcQf5Tbt2vSc1CIgag7cXwTmoTXg== +esbuild-linux-s390x@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.38.tgz#34c7126a4937406bf6a5e69100185fd702d12fe0" + integrity sha512-0zUsiDkGJiMHxBQ7JDU8jbaanUY975CdOW1YDrurjrM0vWHfjv9tLQsW9GSyEb/heSK1L5gaweRjzfUVBFoybQ== -esbuild-netbsd-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.36.tgz#e27847f6d506218291619b8c1e121ecd97628494" - integrity sha512-UB2bVImxkWk4vjnP62ehFNZ73lQY1xcnL5ZNYF3x0AG+j8HgdkNF05v67YJdCIuUJpBuTyCK8LORCYo9onSW+A== +esbuild-netbsd-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.38.tgz#322ea9937d9e529183ee281c7996b93eb38a5d95" + integrity sha512-cljBAApVwkpnJZfnRVThpRBGzCi+a+V9Ofb1fVkKhtrPLDYlHLrSYGtmnoTVWDQdU516qYI8+wOgcGZ4XIZh0Q== -esbuild-openbsd-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.36.tgz#c94c04c557fae516872a586eae67423da6d2fabb" - integrity sha512-NvGB2Chf8GxuleXRGk8e9zD3aSdRO5kLt9coTQbCg7WMGXeX471sBgh4kSg8pjx0yTXRt0MlrUDnjVYnetyivg== +esbuild-openbsd-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.38.tgz#1ca29bb7a2bf09592dcc26afdb45108f08a2cdbd" + integrity sha512-CDswYr2PWPGEPpLDUO50mL3WO/07EMjnZDNKpmaxUPsrW+kVM3LoAqr/CE8UbzugpEiflYqJsGPLirThRB18IQ== -esbuild-sunos-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.36.tgz#9b79febc0df65a30f1c9bd63047d1675511bf99d" - integrity sha512-VkUZS5ftTSjhRjuRLp+v78auMO3PZBXu6xl4ajomGenEm2/rGuWlhFSjB7YbBNErOchj51Jb2OK8lKAo8qdmsQ== +esbuild-sunos-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.38.tgz#c9446f7d8ebf45093e7bb0e7045506a88540019b" + integrity sha512-2mfIoYW58gKcC3bck0j7lD3RZkqYA7MmujFYmSn9l6TiIcAMpuEvqksO+ntBgbLep/eyjpgdplF7b+4T9VJGOA== esbuild-visualizer@0.3.1: version "0.3.1" @@ -2904,46 +2904,46 @@ esbuild-visualizer@0.3.1: open "^7.4.2" yargs "^16.2.0" -esbuild-windows-32@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.36.tgz#910d11936c8d2122ffdd3275e5b28d8a4e1240ec" - integrity sha512-bIar+A6hdytJjZrDxfMBUSEHHLfx3ynoEZXx/39nxy86pX/w249WZm8Bm0dtOAByAf4Z6qV0LsnTIJHiIqbw0w== +esbuild-windows-32@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.38.tgz#f8e9b4602fd0ccbd48e5c8d117ec0ba4040f2ad1" + integrity sha512-L2BmEeFZATAvU+FJzJiRLFUP+d9RHN+QXpgaOrs2klshoAm1AE6Us4X6fS9k33Uy5SzScn2TpcgecbqJza1Hjw== -esbuild-windows-64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.36.tgz#21b4ce8b42a4efc63f4b58ec617f1302448aad26" - integrity sha512-+p4MuRZekVChAeueT1Y9LGkxrT5x7YYJxYE8ZOTcEfeUUN43vktSn6hUNsvxzzATrSgq5QqRdllkVBxWZg7KqQ== +esbuild-windows-64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.38.tgz#280f58e69f78535f470905ce3e43db1746518107" + integrity sha512-Khy4wVmebnzue8aeSXLC+6clo/hRYeNIm0DyikoEqX+3w3rcvrhzpoix0S+MF9vzh6JFskkIGD7Zx47ODJNyCw== -esbuild-windows-arm64@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.36.tgz#ba21546fecb7297667d0052d00150de22c044b24" - integrity sha512-fBB4WlDqV1m18EF/aheGYQkQZHfPHiHJSBYzXIo8yKehek+0BtBwo/4PNwKGJ5T0YK0oc8pBKjgwPbzSrPLb+Q== +esbuild-windows-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.38.tgz#d97e9ac0f95a4c236d9173fa9f86c983d6a53f54" + integrity sha512-k3FGCNmHBkqdJXuJszdWciAH77PukEyDsdIryEHn9cKLQFxzhT39dSumeTuggaQcXY57UlmLGIkklWZo2qzHpw== -esbuild@0.14.36: - version "0.14.36" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.36.tgz#0023a73eab57886ac5605df16ee421e471a971b3" - integrity sha512-HhFHPiRXGYOCRlrhpiVDYKcFJRdO0sBElZ668M4lh2ER0YgnkLxECuFe7uWCf23FrcLc59Pqr7dHkTqmRPDHmw== +esbuild@0.14.38: + version "0.14.38" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.38.tgz#99526b778cd9f35532955e26e1709a16cca2fb30" + integrity sha512-12fzJ0fsm7gVZX1YQ1InkOE5f9Tl7cgf6JPYXRJtPIoE0zkWAbHdPHVPPaLi9tYAcEBqheGzqLn/3RdTOyBfcA== optionalDependencies: - esbuild-android-64 "0.14.36" - esbuild-android-arm64 "0.14.36" - esbuild-darwin-64 "0.14.36" - esbuild-darwin-arm64 "0.14.36" - esbuild-freebsd-64 "0.14.36" - esbuild-freebsd-arm64 "0.14.36" - esbuild-linux-32 "0.14.36" - esbuild-linux-64 "0.14.36" - esbuild-linux-arm "0.14.36" - esbuild-linux-arm64 "0.14.36" - esbuild-linux-mips64le "0.14.36" - esbuild-linux-ppc64le "0.14.36" - esbuild-linux-riscv64 "0.14.36" - esbuild-linux-s390x "0.14.36" - esbuild-netbsd-64 "0.14.36" - esbuild-openbsd-64 "0.14.36" - esbuild-sunos-64 "0.14.36" - esbuild-windows-32 "0.14.36" - esbuild-windows-64 "0.14.36" - esbuild-windows-arm64 "0.14.36" + esbuild-android-64 "0.14.38" + esbuild-android-arm64 "0.14.38" + esbuild-darwin-64 "0.14.38" + esbuild-darwin-arm64 "0.14.38" + esbuild-freebsd-64 "0.14.38" + esbuild-freebsd-arm64 "0.14.38" + esbuild-linux-32 "0.14.38" + esbuild-linux-64 "0.14.38" + esbuild-linux-arm "0.14.38" + esbuild-linux-arm64 "0.14.38" + esbuild-linux-mips64le "0.14.38" + esbuild-linux-ppc64le "0.14.38" + esbuild-linux-riscv64 "0.14.38" + esbuild-linux-s390x "0.14.38" + esbuild-netbsd-64 "0.14.38" + esbuild-openbsd-64 "0.14.38" + esbuild-sunos-64 "0.14.38" + esbuild-windows-32 "0.14.38" + esbuild-windows-64 "0.14.38" + esbuild-windows-arm64 "0.14.38" escalade@^3.1.1: version "3.1.1" From 757aaf0ec87a5b74f7f97ad5567f6c0e66c04fe3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 10:00:07 +0000 Subject: [PATCH 45/49] Build(deps): Bump flow-parser from 0.176.2 to 0.176.3 (#12691) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7d73276e1..b6adfbd77 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "fast-glob": "3.2.11", "fast-json-stable-stringify": "2.1.0", "find-parent-dir": "0.3.1", - "flow-parser": "0.176.2", + "flow-parser": "0.176.3", "get-stdin": "8.0.0", "graphql": "15.6.1", "html-element-attributes": "3.1.0", diff --git a/yarn.lock b/yarn.lock index a0ff333e1..eea877b22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3415,10 +3415,10 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== -flow-parser@0.176.2: - version "0.176.2" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.176.2.tgz#e04ac9f766ea9491fd515c84a82ef360e3a0c659" - integrity sha512-unqoh60i18C67h2rvK0SCFUBac/waUcx7CF1a5E4D0Cwj1NErTP42RF7yb7+dy25Tpyzt7uwVtXw13Wr17VzWA== +flow-parser@0.176.3: + version "0.176.3" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.176.3.tgz#a12d9c79ff1e857b70c9574c3e88be06d2f96181" + integrity sha512-KDzHEoEtc/kbW7NzujhfFkcTCdNi6VK91UpcdT3tc3yEAQdh4JXAEY/0TVJKipjRuVm8E2FxX/3B5Xpm3EFWXA== form-data@^3.0.0: version "3.0.1" From 5024adb9d732e872bdf0d1613ff47545af8d4ca9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 18:00:46 +0800 Subject: [PATCH 46/49] Build(deps-dev): Bump babel-loader from 8.2.4 to 8.2.5 in /website (#12690) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/package.json | 2 +- website/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package.json b/website/package.json index 35e4ce0af..e5dced196 100644 --- a/website/package.json +++ b/website/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@babel/preset-react": "7.16.7", "@sandhose/prettier-animated-logo": "1.0.3", - "babel-loader": "8.2.4", + "babel-loader": "8.2.5", "concurrently": "7.1.0", "docusaurus": "1.14.7", "js-yaml": "4.1.0", diff --git a/website/yarn.lock b/website/yarn.lock index d3358a50d..3ccb5204f 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1767,10 +1767,10 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -babel-loader@8.2.4: - version "8.2.4" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.4.tgz#95f5023c791b2e9e2ca6f67b0984f39c82ff384b" - integrity sha512-8dytA3gcvPPPv4Grjhnt8b5IIiTcq/zeXOPk4iTYI0SVXcsmuGg7JtBRDp8S9X+gJfhQ8ektjXZlDu1Bb33U8A== +babel-loader@8.2.5: + version "8.2.5" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e" + integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== dependencies: find-cache-dir "^3.3.1" loader-utils "^2.0.0" From 2ef33f143d6d158fe8b88b91a6254716d3ecca67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 18:08:57 +0000 Subject: [PATCH 47/49] Build(deps-dev): Bump @typescript-eslint/eslint-plugin (#12694) --- package.json | 2 +- yarn.lock | 76 +++++++++++++++++----------------------------------- 2 files changed, 26 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index b6adfbd77..c20bcf5e4 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@glimmer/reference": "0.84.2", "@types/estree": "0.0.51", "@types/jest": "27.4.1", - "@typescript-eslint/eslint-plugin": "5.19.0", + "@typescript-eslint/eslint-plugin": "5.20.0", "babel-jest": "27.5.1", "benchmark": "2.1.4", "browserslist-to-esbuild": "1.1.1", diff --git a/yarn.lock b/yarn.lock index eea877b22..8b4262519 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1719,14 +1719,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz#9608a4b6d0427104bccf132f058cba629a6553c0" - integrity sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg== +"@typescript-eslint/eslint-plugin@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz#022531a639640ff3faafaf251d1ce00a2ef000a1" + integrity sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q== dependencies: - "@typescript-eslint/scope-manager" "5.19.0" - "@typescript-eslint/type-utils" "5.19.0" - "@typescript-eslint/utils" "5.19.0" + "@typescript-eslint/scope-manager" "5.20.0" + "@typescript-eslint/type-utils" "5.20.0" + "@typescript-eslint/utils" "5.20.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -1734,46 +1734,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/scope-manager@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz#97e59b0bcbcb54dbcdfba96fc103b9020bbe9cb4" - integrity sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g== +"@typescript-eslint/scope-manager@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz#79c7fb8598d2942e45b3c881ced95319818c7980" + integrity sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg== dependencies: - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/visitor-keys" "5.19.0" + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/visitor-keys" "5.20.0" -"@typescript-eslint/type-utils@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz#80f2125b0dfe82494bbae1ea99f1c0186d420282" - integrity sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q== +"@typescript-eslint/type-utils@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz#151c21cbe9a378a34685735036e5ddfc00223be3" + integrity sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw== dependencies: - "@typescript-eslint/utils" "5.19.0" + "@typescript-eslint/utils" "5.20.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.19.0.tgz#12d3d600d754259da771806ee8b2c842d3be8d12" - integrity sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w== - "@typescript-eslint/types@5.20.0": version "5.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.20.0.tgz#fa39c3c2aa786568302318f1cb51fcf64258c20c" integrity sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg== -"@typescript-eslint/typescript-estree@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz#fc987b8f62883f9ea6a5b488bdbcd20d33c0025f" - integrity sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw== - dependencies: - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/visitor-keys" "5.19.0" - debug "^4.3.2" - globby "^11.0.4" - is-glob "^4.0.3" - semver "^7.3.5" - tsutils "^3.21.0" - "@typescript-eslint/typescript-estree@5.20.0": version "5.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz#ab73686ab18c8781bbf249c9459a55dc9417d6b0" @@ -1787,26 +1769,18 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.19.0", "@typescript-eslint/utils@^5.10.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.19.0.tgz#fe87f1e3003d9973ec361ed10d36b4342f1ded1e" - integrity sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ== +"@typescript-eslint/utils@5.20.0", "@typescript-eslint/utils@^5.10.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.20.0.tgz#b8e959ed11eca1b2d5414e12417fd94cae3517a5" + integrity sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.19.0" - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/typescript-estree" "5.19.0" + "@typescript-eslint/scope-manager" "5.20.0" + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/typescript-estree" "5.20.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz#c84ebc7f6c744707a361ca5ec7f7f64cd85b8af6" - integrity sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ== - dependencies: - "@typescript-eslint/types" "5.19.0" - eslint-visitor-keys "^3.0.0" - "@typescript-eslint/visitor-keys@5.20.0": version "5.20.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz#70236b5c6b67fbaf8b2f58bf3414b76c1e826c2a" From 85e6e4f73f9c26ea7282fc328561da725ebd5c18 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Mon, 25 Apr 2022 08:44:22 +0800 Subject: [PATCH 48/49] CLI: Skip print code or write file when performance flags found (#12682) --- changelog_unreleased/cli/12682.md | 3 + src/cli/format.js | 32 +++++++++- .../__tests__/performance-flags.js | 63 +++++++++++++++++++ .../cli/performance-flags/fixture.js | 1 + 4 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 changelog_unreleased/cli/12682.md create mode 100644 tests/integration/__tests__/performance-flags.js create mode 100644 tests/integration/cli/performance-flags/fixture.js diff --git a/changelog_unreleased/cli/12682.md b/changelog_unreleased/cli/12682.md new file mode 100644 index 000000000..135d87bb8 --- /dev/null +++ b/changelog_unreleased/cli/12682.md @@ -0,0 +1,3 @@ +#### Skip print code or write file when performance flags found (#12682 by @fisker) + +When `--debug-benchmark` or `--debug-repeat` is used, the CLI will skip print the formatted code to the screen or write files. diff --git a/src/cli/format.js b/src/cli/format.js index 5e25bd4ca..5f41e5aec 100644 --- a/src/cli/format.js +++ b/src/cli/format.js @@ -103,6 +103,16 @@ function listDifferent(context, input, options, filename) { return true; } +function getPerformanceTestFlag(context) { + if (context.argv.debugBenchmark) { + return "--debug-benchmark"; + } + + if (context.argv.debugRepeat > 0) { + return "--debug-repeat"; + } +} + function format(context, input, opt) { if (!opt.parser && !opt.filepath) { throw new errors.UndefinedParserError( @@ -267,7 +277,17 @@ async function formatStdin(context) { return; } - writeOutput(context, format(context, input, options), options); + const formatted = format(context, input, options); + + const performanceTestFlag = getPerformanceTestFlag(context); + if (performanceTestFlag) { + context.logger.log( + `'${performanceTestFlag}' option found, skipped print code to screen.` + ); + return; + } + + writeOutput(context, formatted, options); } catch (error) { handleError(context, relativeFilepath || "stdin", error); } @@ -280,7 +300,7 @@ async function formatFiles(context) { let numberOfUnformattedFilesFound = 0; - if (context.argv.check) { + if (context.argv.check && !getPerformanceTestFlag(context)) { context.logger.log("Checking formatting..."); } @@ -369,6 +389,14 @@ async function formatFiles(context) { printedFilename.clear(); } + const performanceTestFlag = getPerformanceTestFlag(context); + if (performanceTestFlag) { + context.logger.log( + `'${performanceTestFlag}' option found, skipped print code or write files.` + ); + return; + } + if (context.argv.write) { // Don't write the file if it won't change in order not to invalidate // mtime based caches. diff --git a/tests/integration/__tests__/performance-flags.js b/tests/integration/__tests__/performance-flags.js new file mode 100644 index 000000000..bf6dd34e8 --- /dev/null +++ b/tests/integration/__tests__/performance-flags.js @@ -0,0 +1,63 @@ +"use strict"; + +const runPrettier = require("../run-prettier.js"); + +describe("should not write file or print code when `--debug-benchmark` or `--debug-repeat` found", () => { + // Can't test `--debug-benchmark`, since it requires `benchmark` package + runPrettier( + "cli/performance-flags", + ["--debug-repeat", "2", "--parser", "babel"], + { + input: "foo( bar )", + } + ).test({ + stderr: "", + status: 0, + stdout: "'--debug-repeat' option found, skipped print code to screen.\n", + write: [], + }); + + runPrettier("cli/performance-flags", [ + "fixture.js", + "--debug-repeat", + "2", + "--parser", + "babel", + ]).test({ + stderr: "", + status: 0, + stdout: + "'--debug-repeat' option found, skipped print code or write files.\n", + write: [], + }); + + runPrettier("cli/performance-flags", [ + "fixture.js", + "--debug-repeat", + "2", + "--parser", + "babel", + "--write", + ]).test({ + stderr: "", + status: 0, + stdout: + "'--debug-repeat' option found, skipped print code or write files.\n", + write: [], + }); + + runPrettier("cli/performance-flags", [ + "fixture.js", + "--debug-repeat", + "2", + "--parser", + "babel", + "--check", + ]).test({ + stderr: "", + status: 0, + stdout: + "'--debug-repeat' option found, skipped print code or write files.\n", + write: [], + }); +}); diff --git a/tests/integration/cli/performance-flags/fixture.js b/tests/integration/cli/performance-flags/fixture.js new file mode 100644 index 000000000..a994de17a --- /dev/null +++ b/tests/integration/cli/performance-flags/fixture.js @@ -0,0 +1 @@ +foo( bar ) From 586a4b2a871b9026519fbf201cb678eb3b556343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:02:59 +0800 Subject: [PATCH 49/49] Build(deps): Bump css-units-list from 0.0.5 to 1.1.0 (#12684) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fisker Cheung --- package.json | 2 +- scripts/vendors/vendor-meta.json | 18 ++ scripts/vendors/vendors.mjs | 1 + src/language-css/utils/css-units.evaluate.js | 2 +- vendors/css-units-list.json | 166 +++++++++++++++++++ yarn.lock | 8 +- 6 files changed, 191 insertions(+), 6 deletions(-) create mode 100644 vendors/css-units-list.json diff --git a/package.json b/package.json index c20bcf5e4..095acb094 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "ci-info": "3.3.0", "cjk-regex": "2.0.1", "cosmiconfig": "7.0.1", - "css-units-list": "0.0.5", + "css-units-list": "1.1.0", "dashify": "2.0.0", "diff": "5.0.0", "editorconfig": "0.15.3", diff --git a/scripts/vendors/vendor-meta.json b/scripts/vendors/vendor-meta.json index ddd3695d3..0a5c00b08 100644 --- a/scripts/vendors/vendor-meta.json +++ b/scripts/vendors/vendor-meta.json @@ -1,6 +1,7 @@ { "entries": { "chalk": "chalk.js", + "css-units-list": "css-units-list.json", "escape-string-regexp": "escape-string-regexp.js", "execa": "execa.js", "html-element-attributes": "html-element-attributes.json", @@ -25,6 +26,23 @@ "author": null, "contributors": [] }, + { + "name": "css-units-list", + "maintainers": [], + "version": "1.1.0", + "description": "List of CSS:Cascading Style Sheets Units", + "repository": "fisker/css-units-list", + "homepage": "https://github.com/fisker/css-units-list#readme", + "private": false, + "license": "MIT", + "licenseText": "MIT License\n\nCopyright (c) fisker Cheung (https://www.fiskercheung.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "author": { + "name": "fisker Cheung", + "email": "lionkay@gmail.com", + "url": "https://www.fiskercheung.com/" + }, + "contributors": [] + }, { "name": "escape-string-regexp", "maintainers": [], diff --git a/scripts/vendors/vendors.mjs b/scripts/vendors/vendors.mjs index bea6f7929..c477dd756 100644 --- a/scripts/vendors/vendors.mjs +++ b/scripts/vendors/vendors.mjs @@ -1,5 +1,6 @@ const vendors = [ "chalk", + "css-units-list", "escape-string-regexp", "execa", "html-element-attributes", diff --git a/src/language-css/utils/css-units.evaluate.js b/src/language-css/utils/css-units.evaluate.js index fe62f34fe..25f8e5add 100644 --- a/src/language-css/utils/css-units.evaluate.js +++ b/src/language-css/utils/css-units.evaluate.js @@ -1,6 +1,6 @@ "use strict"; -const cssUnits = require("css-units-list"); +const { default: cssUnits } = require("../../../vendors/css-units-list.json"); const CSS_UNITS = Object.fromEntries( cssUnits.map((unit) => [unit.toLowerCase(), unit]) diff --git a/vendors/css-units-list.json b/vendors/css-units-list.json new file mode 100644 index 000000000..ca86a44bc --- /dev/null +++ b/vendors/css-units-list.json @@ -0,0 +1,166 @@ +{ + "absoluteLengths": [ + "cm", + "mm", + "Q", + "in", + "pt", + "pc", + "px" + ], + "angleUnits": [ + "deg", + "grad", + "rad", + "turn" + ], + "default": [ + "em", + "rem", + "ex", + "rex", + "cap", + "rcap", + "ch", + "rch", + "ic", + "ric", + "lh", + "rlh", + "vw", + "svw", + "lvw", + "dvw", + "vh", + "svh", + "lvh", + "dvh", + "vi", + "svi", + "lvi", + "dvi", + "vb", + "svb", + "lvb", + "dvb", + "vmin", + "svmin", + "lvmin", + "dvmin", + "vmax", + "svmax", + "lvmax", + "dvmax", + "cm", + "mm", + "Q", + "in", + "pt", + "pc", + "px", + "deg", + "grad", + "rad", + "turn", + "s", + "ms", + "Hz", + "kHz", + "dpi", + "dpcm", + "dppx", + "x" + ], + "durationUnits": [ + "s", + "ms" + ], + "fontRelativeLengths": [ + "em", + "rem", + "ex", + "rex", + "cap", + "rcap", + "ch", + "rch", + "ic", + "ric", + "lh", + "rlh" + ], + "frequencyUnits": [ + "Hz", + "kHz" + ], + "relativeLengths": [ + "em", + "rem", + "ex", + "rex", + "cap", + "rcap", + "ch", + "rch", + "ic", + "ric", + "lh", + "rlh", + "vw", + "svw", + "lvw", + "dvw", + "vh", + "svh", + "lvh", + "dvh", + "vi", + "svi", + "lvi", + "dvi", + "vb", + "svb", + "lvb", + "dvb", + "vmin", + "svmin", + "lvmin", + "dvmin", + "vmax", + "svmax", + "lvmax", + "dvmax" + ], + "resolutionUnits": [ + "dpi", + "dpcm", + "dppx", + "x" + ], + "viewportPercentageLengths": [ + "vw", + "svw", + "lvw", + "dvw", + "vh", + "svh", + "lvh", + "dvh", + "vi", + "svi", + "lvi", + "dvi", + "vb", + "svb", + "lvb", + "dvb", + "vmin", + "svmin", + "lvmin", + "dvmin", + "vmax", + "svmax", + "lvmax", + "dvmax" + ] +} diff --git a/yarn.lock b/yarn.lock index 8b4262519..938522638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2530,10 +2530,10 @@ cspell@5.19.7: strip-ansi "^6.0.1" vscode-uri "^3.0.3" -css-units-list@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/css-units-list/-/css-units-list-0.0.5.tgz#a1aa9318ccd2f64dcda5c3336c5261d1f729cade" - integrity sha512-CDr8YQugedUsousq/G3ZSrod3XH0qGKk09MwahvDhwg72p+bBi068B2EJxuOhhePQdypxCFcbmMIyhQleUxq4A== +css-units-list@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/css-units-list/-/css-units-list-1.1.0.tgz#46cfb7022c9eb626d9a62589372b8439e1ddb91e" + integrity sha512-WnbCcmr1rHeUb5JbpIWyBjH0HiW6RIZRujOzVvwyE2aZGqtjLFUfiqB9nYmAPlYHNgvqvjhX8YeJv0uF25QoHg== cssom@^0.4.4: version "0.4.4"