From cd9eb7f23e0a86bd0a0dc90968d6d531ce9b382e Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Fri, 28 Nov 2025 01:27:07 +0000 Subject: [PATCH 01/11] fill in missing range --- package.json | 2 +- pnpm-lock.yaml | 17 ++++++++++++----- src/parse/index.ts | 9 +++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 21d10036..956a680d 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.2.0", - "prettier": "^3.5.3", + "prettier": "3.6.0", "prettier-plugin-jsdoc": "^1.3.2", "release-plan": "^0.11.0", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 07c1a71e..b228cc07 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,11 +73,11 @@ importers: specifier: ^16.2.0 version: 16.2.0 prettier: - specifier: ^3.5.3 - version: 3.5.3 + specifier: 3.6.0 + version: 3.6.0 prettier-plugin-jsdoc: specifier: ^1.3.2 - version: 1.3.2(prettier@3.5.3) + version: 1.3.2(prettier@3.6.0) release-plan: specifier: ^0.11.0 version: 0.11.0(encoding@0.1.13) @@ -1872,6 +1872,11 @@ packages: engines: {node: '>=14'} hasBin: true + prettier@3.6.0: + resolution: {integrity: sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==} + engines: {node: '>=14'} + hasBin: true + proc-log@4.2.0: resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -4229,17 +4234,19 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-jsdoc@1.3.2(prettier@3.5.3): + prettier-plugin-jsdoc@1.3.2(prettier@3.6.0): dependencies: binary-searching: 2.0.5 comment-parser: 1.4.1 mdast-util-from-markdown: 2.0.2 - prettier: 3.5.3 + prettier: 3.6.0 transitivePeerDependencies: - supports-color prettier@3.5.3: {} + prettier@3.6.0: {} + proc-log@4.2.0: {} progress@2.0.3: {} diff --git a/src/parse/index.ts b/src/parse/index.ts index 833aa683..3e8e15a3 100644 --- a/src/parse/index.ts +++ b/src/parse/index.ts @@ -38,6 +38,15 @@ function convertAst(ast: File, templates: Template[]): void { case 'BlockStatement': case 'ObjectExpression': case 'StaticBlock': { + if ( + !node.range && + typeof node.start === 'number' && + typeof node.end === 'number' + ) { + // prettier 3.6.0 onwards doesn't have `node.range` + // as it was removed in babel + node.range = [node.start, node.end]; + } assert('expected range', node.range); const [start, end] = node.range; From 61801db815d02368022d7e2978f039bde94549c8 Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 18:05:55 +0000 Subject: [PATCH 02/11] find comments in AST --- package.json | 2 +- pnpm-lock.yaml | 16 +++++++-------- src/parse/index.ts | 51 +++++++++++++++++++++++++++++++--------------- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 956a680d..ffa4dc93 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.2.0", - "prettier": "3.6.0", + "prettier": "3.7.1", "prettier-plugin-jsdoc": "^1.3.2", "release-plan": "^0.11.0", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b228cc07..cc4f8d08 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,11 +73,11 @@ importers: specifier: ^16.2.0 version: 16.2.0 prettier: - specifier: 3.6.0 - version: 3.6.0 + specifier: 3.7.1 + version: 3.7.1 prettier-plugin-jsdoc: specifier: ^1.3.2 - version: 1.3.2(prettier@3.6.0) + version: 1.3.2(prettier@3.7.1) release-plan: specifier: ^0.11.0 version: 0.11.0(encoding@0.1.13) @@ -1872,8 +1872,8 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.6.0: - resolution: {integrity: sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==} + prettier@3.7.1: + resolution: {integrity: sha512-RWKXE4qB3u5Z6yz7omJkjWwmTfLdcbv44jUVHC5NpfXwFGzvpQM798FGv/6WNK879tc+Cn0AAyherCl1KjbyZQ==} engines: {node: '>=14'} hasBin: true @@ -4234,18 +4234,18 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-jsdoc@1.3.2(prettier@3.6.0): + prettier-plugin-jsdoc@1.3.2(prettier@3.7.1): dependencies: binary-searching: 2.0.5 comment-parser: 1.4.1 mdast-util-from-markdown: 2.0.2 - prettier: 3.6.0 + prettier: 3.7.1 transitivePeerDependencies: - supports-color prettier@3.5.3: {} - prettier@3.6.0: {} + prettier@3.7.1: {} proc-log@4.2.0: {} diff --git a/src/parse/index.ts b/src/parse/index.ts index 3e8e15a3..387c920d 100644 --- a/src/parse/index.ts +++ b/src/parse/index.ts @@ -28,27 +28,42 @@ function convertNode( }); } +function findCorrectCommentBlockIndex( + comments: File['comments'], + start: number, + end: number, +): number { + if (!comments) { + return -1; + } + + return comments.findIndex((comment) => { + const { start: commentStart, end: commentEnd } = comment; + + const check1 = (commentStart === start && commentEnd === end); + const check2 = (commentStart === start + 1 && commentEnd === end - 1); + const check3 = (commentStart === start + 7 && commentEnd === end - 1); + + return check1 || check2 || check3; + }); + +} + /** Traverses the AST and replaces the transformed template parts with other AST */ function convertAst(ast: File, templates: Template[]): void { traverse(ast, { enter(path) { + if (templates.length === 0) { + return null; + } + const { node } = path; switch (node.type) { case 'BlockStatement': case 'ObjectExpression': case 'StaticBlock': { - if ( - !node.range && - typeof node.start === 'number' && - typeof node.end === 'number' - ) { - // prettier 3.6.0 onwards doesn't have `node.range` - // as it was removed in babel - node.range = [node.start, node.end]; - } - assert('expected range', node.range); - const [start, end] = node.range; + const [start, end] = [typescript.locStart(node), typescript.locEnd(node)]; const templateIndex = templates.findIndex((template) => { const { utf16Range } = template; @@ -76,12 +91,16 @@ function convertAst(ast: File, templates: Template[]): void { ); } - const index = - node.innerComments?.[0] && - ast.comments?.indexOf(node.innerComments[0]); + if (ast.comments && ast.comments.length > 0) { + const commentBlockIndex = findCorrectCommentBlockIndex( + ast.comments, + start, + end, + ); - if (ast.comments && index !== undefined && index >= 0) { - ast.comments.splice(index, 1); + if (commentBlockIndex !== undefined && commentBlockIndex >= 0) { + ast.comments.splice(commentBlockIndex, 1); + } } convertNode(node, rawTemplate); From cee03bf313e0ca35700eec8ee743b1f973c55630 Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 18:08:41 +0000 Subject: [PATCH 03/11] turn off CI lint until this is fixed --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5ca2d72..9c7335fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - run: pnpm install --frozen-lockfile - - run: pnpm lint + # - run: pnpm lint - run: pnpm build From 8054cebefb7cb904129b1e5235421b44b63e9ca0 Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 19:38:43 +0000 Subject: [PATCH 04/11] fix prettier-ignore comments on 3.6.x --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- src/print/index.ts | 10 +++++++++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ffa4dc93..18e6c0d9 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.2.0", - "prettier": "3.7.1", + "prettier": "3.6.2", "prettier-plugin-jsdoc": "^1.3.2", "release-plan": "^0.11.0", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc4f8d08..a783f574 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,11 +73,11 @@ importers: specifier: ^16.2.0 version: 16.2.0 prettier: - specifier: 3.7.1 - version: 3.7.1 + specifier: 3.6.2 + version: 3.6.2 prettier-plugin-jsdoc: specifier: ^1.3.2 - version: 1.3.2(prettier@3.7.1) + version: 1.3.2(prettier@3.6.2) release-plan: specifier: ^0.11.0 version: 0.11.0(encoding@0.1.13) @@ -1872,8 +1872,8 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.7.1: - resolution: {integrity: sha512-RWKXE4qB3u5Z6yz7omJkjWwmTfLdcbv44jUVHC5NpfXwFGzvpQM798FGv/6WNK879tc+Cn0AAyherCl1KjbyZQ==} + prettier@3.6.2: + resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} engines: {node: '>=14'} hasBin: true @@ -4234,18 +4234,18 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-jsdoc@1.3.2(prettier@3.7.1): + prettier-plugin-jsdoc@1.3.2(prettier@3.6.2): dependencies: binary-searching: 2.0.5 comment-parser: 1.4.1 mdast-util-from-markdown: 2.0.2 - prettier: 3.7.1 + prettier: 3.6.2 transitivePeerDependencies: - supports-color prettier@3.5.3: {} - prettier@3.7.1: {} + prettier@3.6.2: {} proc-log@4.2.0: {} diff --git a/src/print/index.ts b/src/print/index.ts index 30b39901..3ef0a345 100644 --- a/src/print/index.ts +++ b/src/print/index.ts @@ -154,7 +154,15 @@ function printRawText( } function hasPrettierIgnore(path: AstPath): boolean { - return path.node?.leadingComments?.at(-1)?.value.trim() === 'prettier-ignore'; + let possibleComment = path.node?.leadingComments?.at(-1)?.value.trim(); + + // @ts-expect-error Comments exist on node sometimes + if (!path.node?.leadingComments && path.node?.comments) { + // @ts-expect-error Comments exist on node sometimes + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access + possibleComment = path.node.comments?.at(-1)?.value.trim(); + } + return possibleComment === 'prettier-ignore'; } function checkPrettierIgnore(path: AstPath): boolean { From b479c4df0136f9f97d199f97e0bfd306b8f39bfe Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 19:39:39 +0000 Subject: [PATCH 05/11] bump to prettier to 3.7.3 --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 18e6c0d9..9b190c2a 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.2.0", - "prettier": "3.6.2", + "prettier": "3.7.3", "prettier-plugin-jsdoc": "^1.3.2", "release-plan": "^0.11.0", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a783f574..ab7eaf09 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,11 +73,11 @@ importers: specifier: ^16.2.0 version: 16.2.0 prettier: - specifier: 3.6.2 - version: 3.6.2 + specifier: 3.7.3 + version: 3.7.3 prettier-plugin-jsdoc: specifier: ^1.3.2 - version: 1.3.2(prettier@3.6.2) + version: 1.3.2(prettier@3.7.3) release-plan: specifier: ^0.11.0 version: 0.11.0(encoding@0.1.13) @@ -1872,8 +1872,8 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.6.2: - resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + prettier@3.7.3: + resolution: {integrity: sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==} engines: {node: '>=14'} hasBin: true @@ -4234,18 +4234,18 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-jsdoc@1.3.2(prettier@3.6.2): + prettier-plugin-jsdoc@1.3.2(prettier@3.7.3): dependencies: binary-searching: 2.0.5 comment-parser: 1.4.1 mdast-util-from-markdown: 2.0.2 - prettier: 3.6.2 + prettier: 3.7.3 transitivePeerDependencies: - supports-color prettier@3.5.3: {} - prettier@3.6.2: {} + prettier@3.7.3: {} proc-log@4.2.0: {} From f0990aca0acd51ec8c3a6f34546e755daba0f2e9 Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 19:44:22 +0000 Subject: [PATCH 06/11] combine comment block index checks so they can short circuit --- src/parse/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parse/index.ts b/src/parse/index.ts index 387c920d..2a816e57 100644 --- a/src/parse/index.ts +++ b/src/parse/index.ts @@ -40,11 +40,11 @@ function findCorrectCommentBlockIndex( return comments.findIndex((comment) => { const { start: commentStart, end: commentEnd } = comment; - const check1 = (commentStart === start && commentEnd === end); - const check2 = (commentStart === start + 1 && commentEnd === end - 1); - const check3 = (commentStart === start + 7 && commentEnd === end - 1); - - return check1 || check2 || check3; + return ( + (commentStart === start && commentEnd === end) || + (commentStart === start + 1 && commentEnd === end - 1) || + (commentStart === start + 7 && commentEnd === end - 1) + ); }); } From 91299c98d2d753815907b00e7beef750ee14782b Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 19:48:14 +0000 Subject: [PATCH 07/11] fix repo linting --- .github/workflows/ci.yml | 2 +- .prettierignore | 3 +- package.json | 2 +- pnpm-lock.yaml | 87 +++++++++++++++++++++++++++++++++++++--- src/parse/index.ts | 6 ++- 5 files changed, 90 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c7335fb..e5ca2d72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - run: pnpm install --frozen-lockfile - # - run: pnpm lint + - run: pnpm lint - run: pnpm build diff --git a/.prettierignore b/.prettierignore index 739b6778..86b488be 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,6 @@ # compiled output /dist/ - + # misc !.* .*/ @@ -13,3 +13,4 @@ pnpm-lock.yaml CHANGELOG.md README.md RELEASE.md +CONTRIBUTING.md diff --git a/package.json b/package.json index 9b190c2a..c8ebbffa 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.2.0", "prettier": "3.7.3", - "prettier-plugin-jsdoc": "^1.3.2", + "prettier-plugin-jsdoc": "^1.7.0", "release-plan": "^0.11.0", "typescript": "^5.8.3", "typescript-eslint": "^8.34.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab7eaf09..d736762c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -76,8 +76,8 @@ importers: specifier: 3.7.3 version: 3.7.3 prettier-plugin-jsdoc: - specifier: ^1.3.2 - version: 1.3.2(prettier@3.7.3) + specifier: ^1.7.0 + version: 1.7.0(prettier@3.7.3) release-plan: specifier: ^0.11.0 version: 0.11.0(encoding@0.1.13) @@ -1861,12 +1861,67 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-plugin-jsdoc@1.3.2: - resolution: {integrity: sha512-LNi9eq0TjyZn/PUNf/SYQxxUvGg5FLK4alEbi3i/S+2JbMyTu790c/puFueXzx09KP44oWCJ+TaHRyM/a0rKJQ==} + prettier-plugin-jsdoc@1.7.0: + resolution: {integrity: sha512-tvmMg1y9G7Hy5N2SnLsWsgJWtoSSpfphq+a7dAEoED+siiaBHDowI6N9HzhLA4/SRJhlRdHkDXwCPrXgzbRhng==} engines: {node: '>=14.13.1 || >=16.0.0'} peerDependencies: prettier: ^3.0.0 + prettier-plugin-tailwindcss@0.7.1: + resolution: {integrity: sha512-Bzv1LZcuiR1Sk02iJTS1QzlFNp/o5l2p3xkopwOrbPmtMeh3fK9rVW5M3neBQzHq+kGKj/4LGQMTNcTH4NGPtQ==} + engines: {node: '>=20.19'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-hermes': '*' + '@prettier/plugin-oxc': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@trivago/prettier-plugin-sort-imports': '*' + '@zackad/prettier-plugin-twig': '*' + prettier: ^3.0 + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-multiline-arrays: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-sort-imports: '*' + prettier-plugin-svelte: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-hermes': + optional: true + '@prettier/plugin-oxc': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + '@zackad/prettier-plugin-twig': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-multiline-arrays: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-sort-imports: + optional: true + prettier-plugin-svelte: + optional: true + prettier@3.5.3: resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} engines: {node: '>=14'} @@ -4234,15 +4289,37 @@ snapshots: prelude-ls@1.2.1: {} - prettier-plugin-jsdoc@1.3.2(prettier@3.7.3): + prettier-plugin-jsdoc@1.7.0(prettier@3.7.3): dependencies: binary-searching: 2.0.5 comment-parser: 1.4.1 mdast-util-from-markdown: 2.0.2 prettier: 3.7.3 + prettier-plugin-tailwindcss: 0.7.1(prettier-plugin-jsdoc@1.7.0(prettier@3.7.3))(prettier@3.7.3) transitivePeerDependencies: + - '@ianvs/prettier-plugin-sort-imports' + - '@prettier/plugin-hermes' + - '@prettier/plugin-oxc' + - '@prettier/plugin-pug' + - '@shopify/prettier-plugin-liquid' + - '@trivago/prettier-plugin-sort-imports' + - '@zackad/prettier-plugin-twig' + - prettier-plugin-astro + - prettier-plugin-css-order + - prettier-plugin-marko + - prettier-plugin-multiline-arrays + - prettier-plugin-organize-attributes + - prettier-plugin-organize-imports + - prettier-plugin-sort-imports + - prettier-plugin-svelte - supports-color + prettier-plugin-tailwindcss@0.7.1(prettier-plugin-jsdoc@1.7.0(prettier@3.7.3))(prettier@3.7.3): + dependencies: + prettier: 3.7.3 + optionalDependencies: + prettier-plugin-jsdoc: 1.7.0(prettier@3.7.3) + prettier@3.5.3: {} prettier@3.7.3: {} diff --git a/src/parse/index.ts b/src/parse/index.ts index 2a816e57..2e22c3d7 100644 --- a/src/parse/index.ts +++ b/src/parse/index.ts @@ -46,7 +46,6 @@ function findCorrectCommentBlockIndex( (commentStart === start + 7 && commentEnd === end - 1) ); }); - } /** Traverses the AST and replaces the transformed template parts with other AST */ @@ -63,7 +62,10 @@ function convertAst(ast: File, templates: Template[]): void { case 'BlockStatement': case 'ObjectExpression': case 'StaticBlock': { - const [start, end] = [typescript.locStart(node), typescript.locEnd(node)]; + const [start, end] = [ + typescript.locStart(node), + typescript.locEnd(node), + ]; const templateIndex = templates.findIndex((template) => { const { utf16Range } = template; From 88648753efb8a3b77dcfe31b81508fab64362239 Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 20:01:37 +0000 Subject: [PATCH 08/11] fix running example --- examples/package.json | 2 +- examples/pnpm-lock.yaml | 10 -- package.json | 2 +- pnpm-lock.yaml | 11 +- tests/pnpm-lock.yaml | 326 ---------------------------------------- 5 files changed, 4 insertions(+), 347 deletions(-) delete mode 100644 examples/pnpm-lock.yaml delete mode 100644 tests/pnpm-lock.yaml diff --git a/examples/package.json b/examples/package.json index 0a0f35b4..70be708f 100644 --- a/examples/package.json +++ b/examples/package.json @@ -8,7 +8,7 @@ "test": "node ./bin/test.mjs" }, "dependencies": { - "prettier": "^3.5.3", + "prettier": "^3.7.3", "prettier-plugin-ember-template-tag": "workspace:^" }, "devDependencies": { diff --git a/examples/pnpm-lock.yaml b/examples/pnpm-lock.yaml deleted file mode 100644 index 3f95ccbb..00000000 --- a/examples/pnpm-lock.yaml +++ /dev/null @@ -1,10 +0,0 @@ -lockfileVersion: '6.1' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -dependencies: - prettier-plugin-ember-template-tag: - specifier: workspace:^ - version: link:.. diff --git a/package.json b/package.json index c8ebbffa..29dfeaf6 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-unicorn": "^59.0.1", "globals": "^16.2.0", - "prettier": "3.7.3", + "prettier": "^3.7.3", "prettier-plugin-jsdoc": "^1.7.0", "release-plan": "^0.11.0", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d736762c..6e6dba9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -97,8 +97,8 @@ importers: examples: dependencies: prettier: - specifier: ^3.5.3 - version: 3.5.3 + specifier: ^3.7.3 + version: 3.7.3 prettier-plugin-ember-template-tag: specifier: workspace:^ version: link:.. @@ -1922,11 +1922,6 @@ packages: prettier-plugin-svelte: optional: true - prettier@3.5.3: - resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} - engines: {node: '>=14'} - hasBin: true - prettier@3.7.3: resolution: {integrity: sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==} engines: {node: '>=14'} @@ -4320,8 +4315,6 @@ snapshots: optionalDependencies: prettier-plugin-jsdoc: 1.7.0(prettier@3.7.3) - prettier@3.5.3: {} - prettier@3.7.3: {} proc-log@4.2.0: {} diff --git a/tests/pnpm-lock.yaml b/tests/pnpm-lock.yaml deleted file mode 100644 index 4985dcf0..00000000 --- a/tests/pnpm-lock.yaml +++ /dev/null @@ -1,326 +0,0 @@ -lockfileVersion: '6.1' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -dependencies: - prettier-plugin-ember-template-tag: - specifier: workspace:^ - version: link:.. - -devDependencies: - typescript: - specifier: ^5.0.4 - version: 5.0.4 - vite: - specifier: ^4.3.8 - version: 4.3.8 - -packages: - - /@esbuild/android-arm64@0.17.19: - resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm@0.17.19: - resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-x64@0.17.19: - resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-arm64@0.17.19: - resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-x64@0.17.19: - resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-arm64@0.17.19: - resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64@0.17.19: - resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64@0.17.19: - resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm@0.17.19: - resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ia32@0.17.19: - resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-loong64@0.17.19: - resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-mips64el@0.17.19: - resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ppc64@0.17.19: - resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64@0.17.19: - resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-s390x@0.17.19: - resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64@0.17.19: - resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/netbsd-x64@0.17.19: - resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/openbsd-x64@0.17.19: - resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/sunos-x64@0.17.19: - resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-arm64@0.17.19: - resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32@0.17.19: - resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-x64@0.17.19: - resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild@0.17.19: - resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.17.19 - '@esbuild/android-arm64': 0.17.19 - '@esbuild/android-x64': 0.17.19 - '@esbuild/darwin-arm64': 0.17.19 - '@esbuild/darwin-x64': 0.17.19 - '@esbuild/freebsd-arm64': 0.17.19 - '@esbuild/freebsd-x64': 0.17.19 - '@esbuild/linux-arm': 0.17.19 - '@esbuild/linux-arm64': 0.17.19 - '@esbuild/linux-ia32': 0.17.19 - '@esbuild/linux-loong64': 0.17.19 - '@esbuild/linux-mips64el': 0.17.19 - '@esbuild/linux-ppc64': 0.17.19 - '@esbuild/linux-riscv64': 0.17.19 - '@esbuild/linux-s390x': 0.17.19 - '@esbuild/linux-x64': 0.17.19 - '@esbuild/netbsd-x64': 0.17.19 - '@esbuild/openbsd-x64': 0.17.19 - '@esbuild/sunos-x64': 0.17.19 - '@esbuild/win32-arm64': 0.17.19 - '@esbuild/win32-ia32': 0.17.19 - '@esbuild/win32-x64': 0.17.19 - dev: true - - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - - /postcss@8.4.23: - resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - - /rollup@3.23.0: - resolution: {integrity: sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true - - /typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} - hasBin: true - dev: true - - /vite@4.3.8: - resolution: {integrity: sha512-uYB8PwN7hbMrf4j1xzGDk/lqjsZvCDbt/JC5dyfxc19Pg8kRm14LinK/uq+HSLNswZEoKmweGdtpbnxRtrAXiQ==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.17.19 - postcss: 8.4.23 - rollup: 3.23.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true From b54d1bfbdb013ba0d7e6ac1477c969802ac6e3ff Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 20:03:29 +0000 Subject: [PATCH 09/11] generate lockfile --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e6dba9e..068fdeba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,7 +73,7 @@ importers: specifier: ^16.2.0 version: 16.2.0 prettier: - specifier: 3.7.3 + specifier: ^3.7.3 version: 3.7.3 prettier-plugin-jsdoc: specifier: ^1.7.0 From a41ae745a59baa4a839b0332297cb2a97d1c313f Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Sat, 29 Nov 2025 20:07:25 +0000 Subject: [PATCH 10/11] Update snapshot for semi: false ASI insertion --- tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap b/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap index 0fc42c7d..469cb360 100644 --- a/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap +++ b/tests/unit-tests/config/__snapshots__/semi-false.test.ts.snap @@ -871,7 +871,7 @@ export interface Signature { } // prettier-ignore -