From 3f37b7f341f27acca5eb95a50a0860421192aa30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 03:57:43 +0000 Subject: [PATCH 01/12] Build(deps): Bump string-width from 5.1.0 to 5.1.2 in /scripts/release (#12405) --- 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 36ecb1f8b..d54b797af 100644 --- a/scripts/release/package.json +++ b/scripts/release/package.json @@ -11,7 +11,7 @@ "node-fetch": "3.2.1", "outdent": "0.8.0", "semver": "7.3.5", - "string-width": "5.1.0" + "string-width": "5.1.2" }, "devDependencies": { "@jest/globals": "27.5.1", diff --git a/scripts/release/yarn.lock b/scripts/release/yarn.lock index 566d83d3b..4ac9c97f6 100644 --- a/scripts/release/yarn.lock +++ b/scripts/release/yarn.lock @@ -2555,10 +2555,10 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.0.tgz#5ab00980cfb29f43e736b113a120a73a0fb569d3" - integrity sha512-7x54QnN21P+XL/v8SuNKvfgsUre6PXpN7mc77N3HlZv+f1SBRGmjxtOud2Z6FZ8DmdkD/IdjCaf9XXbnqmTZGQ== +string-width@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== dependencies: eastasianwidth "^0.2.0" emoji-regex "^9.2.2" From 97566ddde3d2b824ca21f35b446f80f613c9232e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 22:54:43 +0900 Subject: [PATCH 02/12] Build(deps): Bump @typescript-eslint/typescript-estree (#12403) Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 5.12.1 to 5.13.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.13.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 ea8a29204..03bd19857 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@babel/parser": "7.17.3", "@glimmer/syntax": "0.84.0", "@iarna/toml": "2.2.5", - "@typescript-eslint/typescript-estree": "5.12.1", + "@typescript-eslint/typescript-estree": "5.13.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 a09224e02..96448f63e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1725,29 +1725,11 @@ debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.12.1": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.12.1.tgz#46a36a28ff4d946821b58fe5a73c81dc2e12aa89" - integrity sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA== - "@typescript-eslint/types@5.13.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.13.0.tgz#da1de4ae905b1b9ff682cab0bed6b2e3be9c04e5" integrity sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg== -"@typescript-eslint/typescript-estree@5.12.1": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz#6a9425b9c305bcbc38e2d1d9a24c08e15e02b722" - integrity sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw== - dependencies: - "@typescript-eslint/types" "5.12.1" - "@typescript-eslint/visitor-keys" "5.12.1" - 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.13.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz#b37c07b748ff030a3e93d87c842714e020b78141" @@ -1773,14 +1755,6 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.12.1": - version "5.12.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz#f722da106c8f9695ae5640574225e45af3e52ec3" - integrity sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A== - dependencies: - "@typescript-eslint/types" "5.12.1" - eslint-visitor-keys "^3.0.0" - "@typescript-eslint/visitor-keys@5.13.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz#f45ff55bcce16403b221ac9240fbeeae4764f0fd" From e8b7c5c68fd8ad099799f8e05ce054ce34a18d4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 22:54:58 +0900 Subject: [PATCH 03/12] Build(deps): Bump typescript from 4.5.5 to 4.6.2 (#12400) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.5 to 4.6.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.5...v4.6.2) --- updated-dependencies: - dependency-name: typescript 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 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 03bd19857..cae1dfcb2 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "semver": "7.3.5", "string-width": "5.0.1", "strip-ansi": "6.0.0", - "typescript": "4.5.5", + "typescript": "4.6.2", "unicode-regex": "3.0.0", "unified": "9.2.1", "vnopts": "1.0.2", diff --git a/yarn.lock b/yarn.lock index 96448f63e..4e3c52daf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6403,10 +6403,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@4.5.5: - version "4.5.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" - integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== +typescript@4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" + integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== unbox-primitive@^1.0.1: version "1.0.1" From 1f9973e6911af556543017ff698d30a13f230201 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 13:55:18 +0000 Subject: [PATCH 04/12] Build(deps): Bump flow-parser from 0.172.0 to 0.173.0 (#12402) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cae1dfcb2..93376816c 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "fast-glob": "3.2.11", "fast-json-stable-stringify": "2.1.0", "find-parent-dir": "0.3.1", - "flow-parser": "0.172.0", + "flow-parser": "0.173.0", "get-stdin": "8.0.0", "graphql": "15.6.1", "html-element-attributes": "2.3.0", diff --git a/yarn.lock b/yarn.lock index 4e3c52daf..37eb6f124 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3362,10 +3362,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.172.0: - version "0.172.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.172.0.tgz#9f5ee62ebf6bad689d5de0b6b98445d8cf030a2f" - integrity sha512-WWqgvuJgD9Y1n2su9D73m0g5kQ4XVl8Dwk6DeW5V6bjt4XMtVLzSHg35s3iiZOvShY+7w7l8FzlK81PGXRcIYQ== +flow-parser@0.173.0: + version "0.173.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.173.0.tgz#992539fe87b4448a660ac1c54ffa358301e7110b" + integrity sha512-gikomjo+jzdehhOCHP2Ca5y1HGK3jkODhUdTxk4a3SdyLAMBsEwb7KJETHzB4KQs7HhHcqhyT7mGmd9iT8B5Hg== form-data@^3.0.0: version "3.0.1" From 2ce43dc71a66b5fa550fbd6e580bf5b5c8d628f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 13:55:37 +0000 Subject: [PATCH 05/12] Build(deps): Bump actions/checkout from 2.4.0 to 3 (#12396) --- .github/workflows/dev-package-test.yml | 2 +- .github/workflows/dev-test.yml | 2 +- .github/workflows/eslint-rules.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/prod-test.yml | 6 +++--- .github/workflows/release-script-test.yml | 2 +- .github/workflows/validate-vendor-versions.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dev-package-test.yml b/.github/workflows/dev-package-test.yml index bcf5686d9..7b4270853 100644 --- a/.github/workflows/dev-package-test.yml +++ b/.github/workflows/dev-package-test.yml @@ -31,7 +31,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml index f39f2ba39..ebb91356b 100644 --- a/.github/workflows/dev-test.yml +++ b/.github/workflows/dev-test.yml @@ -41,7 +41,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 # `codecov/codecov-action` require depth to be at least `2`, see #10219 with: fetch-depth: 2 diff --git a/.github/workflows/eslint-rules.yml b/.github/workflows/eslint-rules.yml index c404e2f5b..248dec720 100644 --- a/.github/workflows/eslint-rules.yml +++ b/.github/workflows/eslint-rules.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 82c690072..136bb7571 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index d3db39feb..f62a34f63 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 @@ -48,7 +48,7 @@ jobs: needs: [build] steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 @@ -101,7 +101,7 @@ jobs: needs: [build] steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/release-script-test.yml b/.github/workflows/release-script-test.yml index b52f188d9..d4bb762fe 100644 --- a/.github/workflows/release-script-test.yml +++ b/.github/workflows/release-script-test.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/validate-vendor-versions.yml b/.github/workflows/validate-vendor-versions.yml index 39c938a6d..329d56b27 100644 --- a/.github/workflows/validate-vendor-versions.yml +++ b/.github/workflows/validate-vendor-versions.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 From 097dba95160f66413cf6ee99c99d141e44f08bea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 00:49:48 +0800 Subject: [PATCH 06/12] Build(deps-dev): Bump node-fetch from 3.2.1 to 3.2.2 (#12411) Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](https://github.com/node-fetch/node-fetch/compare/v3.2.1...v3.2.2) --- updated-dependencies: - dependency-name: node-fetch 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 93376816c..6d1769ba4 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "jest-snapshot-serializer-raw": "1.2.0", "jest-watch-typeahead": "1.0.0", "node-actionlint": "1.2.2", - "node-fetch": "3.2.1", + "node-fetch": "3.2.2", "npm-run-all": "4.1.5", "path-browserify": "1.0.1", "prettier": "2.5.1", diff --git a/yarn.lock b/yarn.lock index 37eb6f124..344103b21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4953,10 +4953,10 @@ node-domexception@^1.0.0: resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -node-fetch@3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.1.tgz#002177382810cfb77858857f69a3621a86c45f26" - integrity sha512-Ef3SPFtRWFCDyhvcwCSvacLpkwmYZcD57mmZzAsMiks9TpHpIghe32U9H06tMICnr+X7YCpzH7WvUlUoml2urA== +node-fetch@3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.2.tgz#16d33fbe32ca7c6ca1ca8ba5dfea1dd885c59f04" + integrity sha512-Cwhq1JFIoon15wcIkFzubVNFE5GvXGV82pKf4knXXjvGmn7RJKcypeuqcVNZMGDZsAFWyIRya/anwAJr7TWJ7w== dependencies: data-uri-to-buffer "^4.0.0" fetch-blob "^3.1.4" From 20cc23ba35453126ec8f8069b2696ee422b38049 Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Mon, 7 Mar 2022 19:08:35 +0200 Subject: [PATCH 07/12] Fix idempotence issues caused by eol comments after = in assignments (#12349) --- changelog_unreleased/javascript/12349.md | 23 +++++++++ src/language-js/print/assignment.js | 3 +- .../__snapshots__/jsfmt.spec.js.snap | 51 +++++++++++++++++-- tests/format/js/assignment-comments/call.js | 7 +++ tests/format/js/assignment-comments/call2.js | 2 + 5 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 changelog_unreleased/javascript/12349.md create mode 100644 tests/format/js/assignment-comments/call.js create mode 100644 tests/format/js/assignment-comments/call2.js diff --git a/changelog_unreleased/javascript/12349.md b/changelog_unreleased/javascript/12349.md new file mode 100644 index 000000000..35bf9cba2 --- /dev/null +++ b/changelog_unreleased/javascript/12349.md @@ -0,0 +1,23 @@ +#### Fix idempotence issues caused by line comments after `=` in assignments (#12349 by @thorn0) + + +```jsx +// Input +const kochabCooieGameOnOboleUnweave = // !!! + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); + +// Prettier stable, first format +const kochabCooieGameOnOboleUnweave = rhubarbRhubarb( // !!! + annularCooeedSplicesWalksWayWay +); + +// Prettier stable, second format +const kochabCooieGameOnOboleUnweave = rhubarbRhubarb( + // !!! + annularCooeedSplicesWalksWayWay +); + +// Prettier main +const kochabCooieGameOnOboleUnweave = // !!! + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); +``` diff --git a/src/language-js/print/assignment.js b/src/language-js/print/assignment.js index 1cb8bc81c..972c2f58a 100644 --- a/src/language-js/print/assignment.js +++ b/src/language-js/print/assignment.js @@ -2,7 +2,7 @@ const { isNonEmptyArray, getStringWidth } = require("../../common/util.js"); const { - builders: { line, group, indent, indentIfBreak }, + builders: { line, group, indent, indentIfBreak, lineSuffixBoundary }, utils: { cleanDoc, willBreak, canBreak }, } = require("../../document/index.js"); const { @@ -50,6 +50,7 @@ function printAssignment( group(leftDoc), operator, group(indent(line), { id: groupId }), + lineSuffixBoundary, indentIfBreak(rightDoc, { groupId }), ]); } diff --git a/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap index 5bac54654..84351ac84 100644 --- a/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/js/assignment-comments/__snapshots__/jsfmt.spec.js.snap @@ -1,5 +1,47 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`call.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +if (true) + if (true) + if (true) + if (true) + if (true) + longVariableName1 = // @ts-ignore + (variable01 + veryLongVariableNameNumber2).method(); + +=====================================output===================================== +if (true) + if (true) + if (true) + if (true) + if (true) + longVariableName1 = // @ts-ignore + (variable01 + veryLongVariableNameNumber2).method(); + +================================================================================ +`; + +exports[`call2.js format 1`] = ` +====================================options===================================== +parsers: ["babel", "flow", "typescript"] +printWidth: 80 + | printWidth +=====================================input====================================== +const kochabCooieGameOnOboleUnweave = // ??? + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); + +=====================================output===================================== +const kochabCooieGameOnOboleUnweave = // ??? + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); + +================================================================================ +`; + exports[`function.js format 1`] = ` ====================================options===================================== parsers: ["babel", "flow", "typescript"] @@ -82,7 +124,8 @@ f3 = ( a = b //comment ) => {}; -f4 = () => {}; // Comment +f4 = // Comment + () => {}; f5 = // Comment @@ -109,7 +152,8 @@ let f3 = ( a = b //comment ) => {}; -let f4 = () => {}; // Comment +let f4 = // Comment + () => {}; let f5 = // Comment @@ -141,7 +185,8 @@ const bifornCringerMoshedPerplexSawder = // !!! anodyneCondosMalateOverateRetinol; =====================================output===================================== -const kochabCooieGameOnOboleUnweave = annularCooeedSplicesWalksWayWay; // ??? +const kochabCooieGameOnOboleUnweave = // ??? + annularCooeedSplicesWalksWayWay; const bifornCringerMoshedPerplexSawder = // !!! glimseGlyphsHazardNoopsTieTie + diff --git a/tests/format/js/assignment-comments/call.js b/tests/format/js/assignment-comments/call.js new file mode 100644 index 000000000..e78303905 --- /dev/null +++ b/tests/format/js/assignment-comments/call.js @@ -0,0 +1,7 @@ +if (true) + if (true) + if (true) + if (true) + if (true) + longVariableName1 = // @ts-ignore + (variable01 + veryLongVariableNameNumber2).method(); diff --git a/tests/format/js/assignment-comments/call2.js b/tests/format/js/assignment-comments/call2.js new file mode 100644 index 000000000..e0956821e --- /dev/null +++ b/tests/format/js/assignment-comments/call2.js @@ -0,0 +1,2 @@ +const kochabCooieGameOnOboleUnweave = // ??? + rhubarbRhubarb(annularCooeedSplicesWalksWayWay); From 737dd536c789365d2e35a1d9c2d774da63c09d11 Mon Sep 17 00:00:00 2001 From: Niklas Vatn <55627591+niklasvatn@users.noreply.github.com> Date: Tue, 8 Mar 2022 23:36:14 +0100 Subject: [PATCH 08/12] Fix lowercasing postcss values (#12393) Co-authored-by: HallvardMM no-reply Co-authored-by: fisker Cheung --- changelog_unreleased/css/12393.md | 27 +++++ package.json | 3 +- src/language-css/printer-postcss.js | 3 +- src/language-css/utils/css-units.evaluate.js | 9 ++ src/language-css/utils/print-unit.js | 13 +++ .../units/__snapshots__/jsfmt.spec.js.snap | 107 ++++++++++++++++++ tests/format/css/units/jsfmt.spec.js | 1 + tests/format/css/units/values.css | 47 ++++++++ yarn.lock | 5 + 9 files changed, 213 insertions(+), 2 deletions(-) create mode 100644 changelog_unreleased/css/12393.md create mode 100644 src/language-css/utils/css-units.evaluate.js create mode 100644 src/language-css/utils/print-unit.js create mode 100644 tests/format/css/units/__snapshots__/jsfmt.spec.js.snap create mode 100644 tests/format/css/units/jsfmt.spec.js create mode 100644 tests/format/css/units/values.css diff --git a/changelog_unreleased/css/12393.md b/changelog_unreleased/css/12393.md new file mode 100644 index 000000000..897502a16 --- /dev/null +++ b/changelog_unreleased/css/12393.md @@ -0,0 +1,27 @@ +#### Fix lowercasing postcss values (#12393 by @niklasvatn) + +PostCSS values can start with digits. Prettier interprets this as a number followed by a unit in the example below. + + +```css +// Input +@value 4XLarge 28/36px; + +.test { + font: 4XLarge Helvetica; +} + +// Prettier stable +@value 4XLarge 28/36px; + +.test { + font: 4xlarge Helvetica; +} + +// Prettier main +@value 4XLarge 28/36px; + +.test { + font: 4XLarge Helvetica; +} +``` diff --git a/package.json b/package.json index 6d1769ba4..d44cca335 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "ci-info": "3.3.0", "cjk-regex": "2.0.1", "cosmiconfig": "7.0.1", + "css-units-list": "0.0.5", "dashify": "2.0.0", "diff": "5.0.0", "editorconfig": "0.15.3", @@ -119,8 +120,8 @@ "eslint-plugin-regexp": "1.5.1", "eslint-plugin-unicorn": "41.0.0", "esm-utils": "3.0.0", - "jest": "27.5.1", "execa": "6.1.0", + "jest": "27.5.1", "jest-snapshot-serializer-ansi": "1.0.0", "jest-snapshot-serializer-raw": "1.2.0", "jest-watch-typeahead": "1.0.0", diff --git a/src/language-css/printer-postcss.js b/src/language-css/printer-postcss.js index 1ede6c67a..3f69fd812 100644 --- a/src/language-css/printer-postcss.js +++ b/src/language-css/printer-postcss.js @@ -78,6 +78,7 @@ const { const { locStart, locEnd } = require("./loc.js"); const isLessParser = require("./utils/is-less-parser.js"); const isSCSS = require("./utils/is-scss.js"); +const printUnit = require("./utils/print-unit.js"); function shouldPrintComma(options) { return options.trailingComma === "es5" || options.trailingComma === "all"; @@ -969,7 +970,7 @@ function genericPrint(path, options, print) { return node.value; } case "value-number": { - return [printCssNumber(node.value), maybeToLowerCase(node.unit)]; + return [printCssNumber(node.value), printUnit(node.unit)]; } case "value-operator": { return node.value; diff --git a/src/language-css/utils/css-units.evaluate.js b/src/language-css/utils/css-units.evaluate.js new file mode 100644 index 000000000..fe62f34fe --- /dev/null +++ b/src/language-css/utils/css-units.evaluate.js @@ -0,0 +1,9 @@ +"use strict"; + +const cssUnits = require("css-units-list"); + +const CSS_UNITS = Object.fromEntries( + cssUnits.map((unit) => [unit.toLowerCase(), unit]) +); + +module.exports = CSS_UNITS; diff --git a/src/language-css/utils/print-unit.js b/src/language-css/utils/print-unit.js new file mode 100644 index 000000000..0c1d5b32b --- /dev/null +++ b/src/language-css/utils/print-unit.js @@ -0,0 +1,13 @@ +"use strict"; + +const CSS_UNITS = require("./css-units.evaluate.js"); + +function printUnit(unit) { + const lowercased = unit.toLowerCase(); + + return Object.prototype.hasOwnProperty.call(CSS_UNITS, lowercased) + ? CSS_UNITS[lowercased] + : unit; +} + +module.exports = printUnit; diff --git a/tests/format/css/units/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/units/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..2e2d19bb0 --- /dev/null +++ b/tests/format/css/units/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,107 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`values.css format 1`] = ` +====================================options===================================== +parsers: ["css"] +printWidth: 80 + | printWidth +=====================================input====================================== +@value 4XLarge 28/36px; + +.postCssLowerCasingValueName { + font: 4XLarge Helvetica; +} + +.cssUnits { + a: 5EM; + a: 5REM; + a: 5EX; + a: 5REX; + a: 5CAP; + a: 5RCAP; + a: 5CH; + a: 5RCH; + a: 5IC; + a: 5RIC; + a: 5LH; + a: 5RLH; + a: 5VH; + a: 5VW; + a: 5VI; + a: 5VB; + a: 5VMIN; + a: 5VMAX; + a: 5CM; + a: 5MM; + a: 5q; + a: 5IN; + a: 5PT; + a: 5PC; + a: 5PX; + a: 5DEG; + a: 5GRAD; + a: 5RAD; + a: 5S; + a: 5MS; + a: 5hZ; + a: 5KhZ; + a: 5DPI; + a: 5DPCM; + a: 5DPPX; + a: 5X; + + a: 5PROTOTYPE; + a: 5constructoR; +} + +=====================================output===================================== +@value 4XLarge 28/36px; + +.postCssLowerCasingValueName { + font: 4XLarge Helvetica; +} + +.cssUnits { + a: 5em; + a: 5rem; + a: 5ex; + a: 5rex; + a: 5cap; + a: 5rcap; + a: 5ch; + a: 5rch; + a: 5ic; + a: 5ric; + a: 5lh; + a: 5rlh; + a: 5vh; + a: 5vw; + a: 5vi; + a: 5vb; + a: 5vmin; + a: 5vmax; + a: 5cm; + a: 5mm; + a: 5Q; + a: 5in; + a: 5pt; + a: 5pc; + a: 5px; + a: 5deg; + a: 5grad; + a: 5rad; + a: 5s; + a: 5ms; + a: 5Hz; + a: 5kHz; + a: 5dpi; + a: 5dpcm; + a: 5dppx; + a: 5x; + + a: 5PROTOTYPE; + a: 5constructoR; +} + +================================================================================ +`; diff --git a/tests/format/css/units/jsfmt.spec.js b/tests/format/css/units/jsfmt.spec.js new file mode 100644 index 000000000..7d3726c81 --- /dev/null +++ b/tests/format/css/units/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, ["css"]); diff --git a/tests/format/css/units/values.css b/tests/format/css/units/values.css new file mode 100644 index 000000000..0d7d458c2 --- /dev/null +++ b/tests/format/css/units/values.css @@ -0,0 +1,47 @@ +@value 4XLarge 28/36px; + +.postCssLowerCasingValueName { + font: 4XLarge Helvetica; +} + +.cssUnits { + a: 5EM; + a: 5REM; + a: 5EX; + a: 5REX; + a: 5CAP; + a: 5RCAP; + a: 5CH; + a: 5RCH; + a: 5IC; + a: 5RIC; + a: 5LH; + a: 5RLH; + a: 5VH; + a: 5VW; + a: 5VI; + a: 5VB; + a: 5VMIN; + a: 5VMAX; + a: 5CM; + a: 5MM; + a: 5q; + a: 5IN; + a: 5PT; + a: 5PC; + a: 5PX; + a: 5DEG; + a: 5GRAD; + a: 5RAD; + a: 5S; + a: 5MS; + a: 5hZ; + a: 5KhZ; + a: 5DPI; + a: 5DPCM; + a: 5DPPX; + a: 5X; + + a: 5PROTOTYPE; + a: 5constructoR; +} diff --git a/yarn.lock b/yarn.lock index 344103b21..b39a575b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2498,6 +2498,11 @@ cspell@5.18.5: 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== + cssom@^0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" From 02c17f131ba2f3b522c323c6edc42b03e87c6e8d Mon Sep 17 00:00:00 2001 From: HallvardMM <49036938+HallvardMM@users.noreply.github.com> Date: Tue, 8 Mar 2022 23:37:16 +0100 Subject: [PATCH 09/12] Allow `lang` attribute of ` + + + + =====================================output===================================== + + + + ================================================================================ `; @@ -4203,6 +4235,22 @@ trailingComma: "none" some-component(tag='') + + + + =====================================output===================================== + + + + ================================================================================ `; @@ -4251,6 +4315,22 @@ printWidth: 80 some-component(tag='') + + + + =====================================output===================================== + + + + ================================================================================ `; diff --git a/tests/format/vue/vue/template-lang.vue b/tests/format/vue/vue/template-lang.vue index 55bf0c2fb..b53b7646e 100644 --- a/tests/format/vue/vue/template-lang.vue +++ b/tests/format/vue/vue/template-lang.vue @@ -18,3 +18,19 @@ #container some-component(tag='') + + + + From 77396c4c916250dac22bc76c476e1b6560d3a594 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Mar 2022 12:46:59 +0800 Subject: [PATCH 10/12] Build(deps): Bump @typescript-eslint/typescript-estree (#12416) Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 5.13.0 to 5.14.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.14.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, 27 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d44cca335..dac0385ac 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@babel/parser": "7.17.3", "@glimmer/syntax": "0.84.0", "@iarna/toml": "2.2.5", - "@typescript-eslint/typescript-estree": "5.13.0", + "@typescript-eslint/typescript-estree": "5.14.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 b39a575b4..8ad8626f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1730,6 +1730,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.13.0.tgz#da1de4ae905b1b9ff682cab0bed6b2e3be9c04e5" integrity sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg== +"@typescript-eslint/types@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.14.0.tgz#96317cf116cea4befabc0defef371a1013f8ab11" + integrity sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw== + "@typescript-eslint/typescript-estree@5.13.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz#b37c07b748ff030a3e93d87c842714e020b78141" @@ -1743,6 +1748,19 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz#78b7f7385d5b6f2748aacea5c9b7f6ae62058314" + integrity sha512-QGnxvROrCVtLQ1724GLTHBTR0lZVu13izOp9njRvMkCBgWX26PKvmMP8k82nmXBRD3DQcFFq2oj3cKDwr0FaUA== + dependencies: + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/visitor-keys" "5.14.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.13.0", "@typescript-eslint/utils@^5.10.0": version "5.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.13.0.tgz#2328feca700eb02837298339a2e49c46b41bd0af" @@ -1763,6 +1781,14 @@ "@typescript-eslint/types" "5.13.0" eslint-visitor-keys "^3.0.0" +"@typescript-eslint/visitor-keys@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz#1927005b3434ccd0d3ae1b2ecf60e65943c36986" + integrity sha512-yL0XxfzR94UEkjBqyymMLgCBdojzEuy/eim7N9/RIcTNxpJudAcqsU8eRyfzBbcEzGoPWfdM3AGak3cN08WOIw== + dependencies: + "@typescript-eslint/types" "5.14.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 c228f7f6b557a1ae4480494059ca7883282e4bb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Mar 2022 05:18:28 +0000 Subject: [PATCH 11/12] Build(deps-dev): Bump @typescript-eslint/eslint-plugin (#12419) --- package.json | 2 +- yarn.lock | 76 +++++++++++++++++----------------------------------- 2 files changed, 26 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index dac0385ac..3f25ea037 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@glimmer/reference": "0.84.0", "@types/estree": "0.0.51", "@types/jest": "27.4.1", - "@typescript-eslint/eslint-plugin": "5.13.0", + "@typescript-eslint/eslint-plugin": "5.14.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 8ad8626f7..9cf04bd35 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1693,14 +1693,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.13.0.tgz#2809052b85911ced9c54a60dac10e515e9114497" - integrity sha512-vLktb2Uec81fxm/cfz2Hd6QaWOs8qdmVAZXLdOBX6JFJDhf6oDZpMzZ4/LZ6SFM/5DgDcxIMIvy3F+O9yZBuiQ== +"@typescript-eslint/eslint-plugin@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.14.0.tgz#5119b67152356231a0e24b998035288a9cd21335" + integrity sha512-ir0wYI4FfFUDfLcuwKzIH7sMVA+db7WYen47iRSaCGl+HMAZI9fpBwfDo45ZALD3A45ZGyHWDNLhbg8tZrMX4w== dependencies: - "@typescript-eslint/scope-manager" "5.13.0" - "@typescript-eslint/type-utils" "5.13.0" - "@typescript-eslint/utils" "5.13.0" + "@typescript-eslint/scope-manager" "5.14.0" + "@typescript-eslint/type-utils" "5.14.0" + "@typescript-eslint/utils" "5.14.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -1708,46 +1708,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/scope-manager@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.13.0.tgz#cf6aff61ca497cb19f0397eea8444a58f46156b6" - integrity sha512-T4N8UvKYDSfVYdmJq7g2IPJYCRzwtp74KyDZytkR4OL3NRupvswvmJQJ4CX5tDSurW2cvCc1Ia1qM7d0jpa7IA== +"@typescript-eslint/scope-manager@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.14.0.tgz#ea518962b42db8ed0a55152ea959c218cb53ca7b" + integrity sha512-LazdcMlGnv+xUc5R4qIlqH0OWARyl2kaP8pVCS39qSL3Pd1F7mI10DbdXeARcE62sVQE4fHNvEqMWsypWO+yEw== dependencies: - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/visitor-keys" "5.13.0" + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/visitor-keys" "5.14.0" -"@typescript-eslint/type-utils@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.13.0.tgz#b0efd45c85b7bab1125c97b752cab3a86c7b615d" - integrity sha512-/nz7qFizaBM1SuqAKb7GLkcNn2buRdDgZraXlkhz+vUGiN1NZ9LzkA595tHHeduAiS2MsHqMNhE2zNzGdw43Yg== +"@typescript-eslint/type-utils@5.14.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.14.0.tgz#711f08105860b12988454e91df433567205a8f0b" + integrity sha512-d4PTJxsqaUpv8iERTDSQBKUCV7Q5yyXjqXUl3XF7Sd9ogNLuKLkxz82qxokqQ4jXdTPZudWpmNtr/JjbbvUixw== dependencies: - "@typescript-eslint/utils" "5.13.0" + "@typescript-eslint/utils" "5.14.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.13.0.tgz#da1de4ae905b1b9ff682cab0bed6b2e3be9c04e5" - integrity sha512-LmE/KO6DUy0nFY/OoQU0XelnmDt+V8lPQhh8MOVa7Y5k2gGRd6U9Kp3wAjhB4OHg57tUO0nOnwYQhRRyEAyOyg== - "@typescript-eslint/types@5.14.0": version "5.14.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.14.0.tgz#96317cf116cea4befabc0defef371a1013f8ab11" integrity sha512-BR6Y9eE9360LNnW3eEUqAg6HxS9Q35kSIs4rp4vNHRdfg0s+/PgHgskvu5DFTM7G5VKAVjuyaN476LCPrdA7Mw== -"@typescript-eslint/typescript-estree@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.13.0.tgz#b37c07b748ff030a3e93d87c842714e020b78141" - integrity sha512-Q9cQow0DeLjnp5DuEDjLZ6JIkwGx3oYZe+BfcNuw/POhtpcxMTy18Icl6BJqTSd+3ftsrfuVb7mNHRZf7xiaNA== - dependencies: - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/visitor-keys" "5.13.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.14.0": version "5.14.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.14.0.tgz#78b7f7385d5b6f2748aacea5c9b7f6ae62058314" @@ -1761,26 +1743,18 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.13.0", "@typescript-eslint/utils@^5.10.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.13.0.tgz#2328feca700eb02837298339a2e49c46b41bd0af" - integrity sha512-+9oHlPWYNl6AwwoEt5TQryEHwiKRVjz7Vk6kaBeD3/kwHE5YqTGHtm/JZY8Bo9ITOeKutFaXnBlMgSATMJALUQ== +"@typescript-eslint/utils@5.14.0", "@typescript-eslint/utils@^5.10.0": + version "5.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.14.0.tgz#6c8bc4f384298cbbb32b3629ba7415f9f80dc8c4" + integrity sha512-EHwlII5mvUA0UsKYnVzySb/5EE/t03duUTweVy8Zqt3UQXBrpEVY144OTceFKaOe4xQXZJrkptCf7PjEBeGK4w== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.13.0" - "@typescript-eslint/types" "5.13.0" - "@typescript-eslint/typescript-estree" "5.13.0" + "@typescript-eslint/scope-manager" "5.14.0" + "@typescript-eslint/types" "5.14.0" + "@typescript-eslint/typescript-estree" "5.14.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.13.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.13.0.tgz#f45ff55bcce16403b221ac9240fbeeae4764f0fd" - integrity sha512-HLKEAS/qA1V7d9EzcpLFykTePmOQqOFim8oCvhY3pZgQ8Hi38hYpHd9e5GN6nQBFQNecNhws5wkS9Y5XIO0s/g== - dependencies: - "@typescript-eslint/types" "5.13.0" - eslint-visitor-keys "^3.0.0" - "@typescript-eslint/visitor-keys@5.14.0": version "5.14.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.14.0.tgz#1927005b3434ccd0d3ae1b2ecf60e65943c36986" From 4364ea2cc92d2febef7ad6f310669a6360b0ec1a Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 10 Mar 2022 08:04:57 +0800 Subject: [PATCH 12/12] CI: Use `node-version` instead of deprecated `version` (#12422) --- .github/workflows/release-script-test.yml | 2 +- .github/workflows/validate-vendor-versions.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-script-test.yml b/.github/workflows/release-script-test.yml index d4bb762fe..232979f74 100644 --- a/.github/workflows/release-script-test.yml +++ b/.github/workflows/release-script-test.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - version: "14" + node-version: "14" cache: "yarn" - name: Install Dependencies diff --git a/.github/workflows/validate-vendor-versions.yml b/.github/workflows/validate-vendor-versions.yml index 329d56b27..50ed758d4 100644 --- a/.github/workflows/validate-vendor-versions.yml +++ b/.github/workflows/validate-vendor-versions.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - version: "14" + node-version: "14" cache: "yarn" - name: Install Dependencies