From 19e2941ba8c5407cf50e6882b4ffc5d3c11d65d3 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:28:02 +1100 Subject: [PATCH 1/7] ci: always preview versions --- .../changeset-preview/preview-changeset-versions.mjs | 12 ++++-------- .github/changeset-preview/upsert-pr-comment.mjs | 8 ++++---- .github/workflows/changeset-preview.yml | 2 -- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/changeset-preview/preview-changeset-versions.mjs b/.github/changeset-preview/preview-changeset-versions.mjs index 3f85842f..a05970ba 100644 --- a/.github/changeset-preview/preview-changeset-versions.mjs +++ b/.github/changeset-preview/preview-changeset-versions.mjs @@ -90,10 +90,10 @@ function main() { if (explicit.size === 0) { const msg = 'No changeset entries found — nothing to preview.\n' + process.stdout.write(msg) if (values.output) { writeFileSync(values.output, msg) - } else { - process.stdout.write(msg) + process.stdout.write(`Written to ${values.output}\n`) } return } @@ -138,9 +138,6 @@ function main() { // 7. Build markdown const lines = [] - lines.push('') - lines.push('## Changeset Version Preview') - lines.push('') if (bumps.length === 0) { lines.push('No version changes detected.') @@ -184,13 +181,12 @@ function main() { } lines.push('') - const md = lines.join('\n') + + process.stdout.write(md) if (values.output) { writeFileSync(values.output, md) process.stdout.write(`Written to ${values.output}\n`) - } else { - process.stdout.write(md) } } diff --git a/.github/changeset-preview/upsert-pr-comment.mjs b/.github/changeset-preview/upsert-pr-comment.mjs index 9637e213..339ca5b7 100644 --- a/.github/changeset-preview/upsert-pr-comment.mjs +++ b/.github/changeset-preview/upsert-pr-comment.mjs @@ -4,7 +4,7 @@ import { promises as fsp } from 'node:fs' import path from 'node:path' import { parseArgs as parseNodeArgs } from 'node:util' -const DEFAULT_MARKER = '' +const DEFAULT_MARKER = '' function parseArgs(argv) { const { values } = parseNodeArgs({ @@ -109,9 +109,9 @@ async function main() { const args = parseArgs(process.argv.slice(2)) const bodyPath = path.resolve(args.bodyFile) const rawBody = await fsp.readFile(bodyPath, 'utf8') - const body = rawBody.includes(args.marker) - ? rawBody - : `${args.marker}\n${rawBody}` + const body = `${args.marker}\n## Changeset Version Preview\n\n${rawBody}` + + process.stdout.write(body) const comments = await listIssueComments({ apiUrl: args.apiUrl, diff --git a/.github/workflows/changeset-preview.yml b/.github/workflows/changeset-preview.yml index 3eb706ed..125ea889 100644 --- a/.github/workflows/changeset-preview.yml +++ b/.github/workflows/changeset-preview.yml @@ -2,8 +2,6 @@ name: Changeset Preview on: pull_request: - paths: - - '.changeset/**' concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} From 7d14aa5406f1f50291c605ff42cc433a3ec00093 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:33:05 +1100 Subject: [PATCH 2/7] Update comment wording --- .github/changeset-preview/preview-changeset-versions.mjs | 7 +++++-- .github/changeset-preview/upsert-pr-comment.mjs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/changeset-preview/preview-changeset-versions.mjs b/.github/changeset-preview/preview-changeset-versions.mjs index a05970ba..2569314c 100644 --- a/.github/changeset-preview/preview-changeset-versions.mjs +++ b/.github/changeset-preview/preview-changeset-versions.mjs @@ -89,7 +89,8 @@ function main() { const explicit = readChangesetEntries() if (explicit.size === 0) { - const msg = 'No changeset entries found — nothing to preview.\n' + const msg = + 'No changeset entries found. Merging this PR will not cause a version bump for any packages.\n' process.stdout.write(msg) if (values.output) { writeFileSync(values.output, msg) @@ -140,7 +141,9 @@ function main() { const lines = [] if (bumps.length === 0) { - lines.push('No version changes detected.') + lines.push( + 'No version changes detected. Merging this PR will not cause a version bump for any packages.', + ) } else { const explicitBumps = bumps.filter((b) => b.source !== 'dependency') const dependencyBumps = bumps.filter((b) => b.source === 'dependency') diff --git a/.github/changeset-preview/upsert-pr-comment.mjs b/.github/changeset-preview/upsert-pr-comment.mjs index 339ca5b7..7d106302 100644 --- a/.github/changeset-preview/upsert-pr-comment.mjs +++ b/.github/changeset-preview/upsert-pr-comment.mjs @@ -109,7 +109,7 @@ async function main() { const args = parseArgs(process.argv.slice(2)) const bodyPath = path.resolve(args.bodyFile) const rawBody = await fsp.readFile(bodyPath, 'utf8') - const body = `${args.marker}\n## Changeset Version Preview\n\n${rawBody}` + const body = `${args.marker}\n## 🚀 Changeset Version Preview\n\n${rawBody}` process.stdout.write(body) From 4a4252934c9cd2cd2ad98750fe01e957fe94b345 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:34:34 +1100 Subject: [PATCH 3/7] Add changeset --- .changeset/loose-wombats-eat.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/loose-wombats-eat.md diff --git a/.changeset/loose-wombats-eat.md b/.changeset/loose-wombats-eat.md new file mode 100644 index 00000000..7711dce0 --- /dev/null +++ b/.changeset/loose-wombats-eat.md @@ -0,0 +1,5 @@ +--- +'@tanstack/publish-config': minor +--- + +THIS IS A TEST From 541459a2baae5846c03478215bccb816eb51472d Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:59:29 +1100 Subject: [PATCH 4/7] More testing --- packages/vite-config/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/vite-config/package.json b/packages/vite-config/package.json index 7c60fc37..b76371c3 100644 --- a/packages/vite-config/package.json +++ b/packages/vite-config/package.json @@ -50,6 +50,7 @@ "vite": "catalog:" }, "peerDependencies": { + "@tanstack/publish-config": "workspace:*", "vite": "^8.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5fa72d3a..6eb8ac91 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,6 +343,9 @@ importers: packages/vite-config: dependencies: + '@tanstack/publish-config': + specifier: workspace:* + version: link:../publish-config vite-plugin-dts: specifier: 'catalog:' version: 4.2.3(@types/node@25.3.3)(rollup@4.59.0)(typescript@6.0.1-rc)(vite@8.0.0(@types/node@25.3.3)(esbuild@0.27.3)(jiti@2.6.1)(yaml@2.8.2)) From 7f57c7e6fdc9b49ccee5bc4f09da03f6f5bc9f31 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:00:33 +1100 Subject: [PATCH 5/7] Update peerDep --- packages/vite-config/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite-config/package.json b/packages/vite-config/package.json index b76371c3..bc047bed 100644 --- a/packages/vite-config/package.json +++ b/packages/vite-config/package.json @@ -50,7 +50,7 @@ "vite": "catalog:" }, "peerDependencies": { - "@tanstack/publish-config": "workspace:*", + "@tanstack/publish-config": "workspace:^", "vite": "^8.0.0" } } From f0e386bff6d55c02ccfa058926310cf7e22cd9d6 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:01:22 +1100 Subject: [PATCH 6/7] Fix --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6eb8ac91..d9a29d8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,7 +344,7 @@ importers: packages/vite-config: dependencies: '@tanstack/publish-config': - specifier: workspace:* + specifier: workspace:^ version: link:../publish-config vite-plugin-dts: specifier: 'catalog:' From 75cdca5f3febcc3d540530dfbe51cc69c655a379 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:07:06 +1100 Subject: [PATCH 7/7] Undo test changes --- .changeset/loose-wombats-eat.md | 5 ----- packages/vite-config/package.json | 1 - pnpm-lock.yaml | 3 --- 3 files changed, 9 deletions(-) delete mode 100644 .changeset/loose-wombats-eat.md diff --git a/.changeset/loose-wombats-eat.md b/.changeset/loose-wombats-eat.md deleted file mode 100644 index 7711dce0..00000000 --- a/.changeset/loose-wombats-eat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/publish-config': minor ---- - -THIS IS A TEST diff --git a/packages/vite-config/package.json b/packages/vite-config/package.json index bc047bed..7c60fc37 100644 --- a/packages/vite-config/package.json +++ b/packages/vite-config/package.json @@ -50,7 +50,6 @@ "vite": "catalog:" }, "peerDependencies": { - "@tanstack/publish-config": "workspace:^", "vite": "^8.0.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9a29d8c..5fa72d3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,9 +343,6 @@ importers: packages/vite-config: dependencies: - '@tanstack/publish-config': - specifier: workspace:^ - version: link:../publish-config vite-plugin-dts: specifier: 'catalog:' version: 4.2.3(@types/node@25.3.3)(rollup@4.59.0)(typescript@6.0.1-rc)(vite@8.0.0(@types/node@25.3.3)(esbuild@0.27.3)(jiti@2.6.1)(yaml@2.8.2))