Skip to content

Commit a6cceba

Browse files
authored
fix(release): build packages before publish so dist is included in tarballs (#844)
* fix(release): build packages in CI before publish so dist is included The release job runs Checkout -> Setup -> changesets with no build, so dist/ is absent when changeset publish packs tarballs. files: ["dist"] silently includes nothing when dist/ is missing, so releases 0.33.0-0.36.0 shipped src-only and resolved every export to a missing file. Add a fresh, cache-bypassing build step to the release job before changesets (a cached build can report success without materializing dist/), and add a changeset republishing every package with compiled output (ai -> 0.37.0). * fix(docs): skip generated reference/ links in verify-links docs/reference/** is TypeDoc-generated at build and not committed, so the link checker resolved ../reference/classes/StreamProcessor to a missing file and failed. The check normally passed only via Nx cache; a cache-miss re-run surfaced the latent failure. Treat reference/ targets as valid routes and skip them.
1 parent f83c991 commit a6cceba

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
'@tanstack/ai': minor
3+
'@tanstack/ai-angular': patch
4+
'@tanstack/ai-anthropic': patch
5+
'@tanstack/ai-client': patch
6+
'@tanstack/ai-code-mode': patch
7+
'@tanstack/ai-code-mode-skills': patch
8+
'@tanstack/ai-devtools-core': patch
9+
'@tanstack/ai-elevenlabs': patch
10+
'@tanstack/ai-event-client': patch
11+
'@tanstack/ai-fal': patch
12+
'@tanstack/ai-gemini': patch
13+
'@tanstack/ai-grok': patch
14+
'@tanstack/ai-groq': patch
15+
'@tanstack/ai-isolate-cloudflare': patch
16+
'@tanstack/ai-isolate-node': patch
17+
'@tanstack/ai-isolate-quickjs': patch
18+
'@tanstack/ai-mcp': patch
19+
'@tanstack/ai-ollama': patch
20+
'@tanstack/ai-openai': patch
21+
'@tanstack/ai-openrouter': patch
22+
'@tanstack/ai-preact': patch
23+
'@tanstack/ai-react': patch
24+
'@tanstack/ai-react-ui': patch
25+
'@tanstack/ai-solid': patch
26+
'@tanstack/ai-solid-ui': patch
27+
'@tanstack/ai-svelte': patch
28+
'@tanstack/ai-utils': patch
29+
'@tanstack/ai-vue': patch
30+
'@tanstack/ai-vue-ui': patch
31+
'@tanstack/openai-base': patch
32+
'@tanstack/preact-ai-devtools': patch
33+
'@tanstack/react-ai-devtools': patch
34+
'@tanstack/solid-ai-devtools': patch
35+
---
36+
37+
Republish all packages with their compiled `dist/` output.
38+
39+
Releases `0.33.0``0.36.0` were published without a `dist/` directory: the
40+
release workflow relied on an Nx-cached `build` whose outputs were not
41+
materialized to disk before `changeset publish` packed the tarballs, and
42+
`files: ["dist"]` silently includes nothing when `dist/` is absent. The
43+
published packages therefore contained only `src/`, so every export
44+
(`./dist/esm/*.js`) resolved to a missing file and the packages were
45+
uninstallable.
46+
47+
The publish step now runs a fresh, cache-bypassing build of all packages
48+
immediately before publishing, guaranteeing compiled artifacts are present in
49+
every tarball.

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
persist-credentials: true
4848
- name: Setup Tools
4949
uses: TanStack/config/.github/setup@190f659075ff0845850e330883eb26d7ffd0671f # main
50+
- name: Build packages
51+
# Fresh, cache-bypassing build so dist/ is on disk when changeset
52+
# publish packs tarballs. A cached build can report success without
53+
# materializing dist/, shipping src-only packages (see 0.33.0-0.36.0).
54+
run: pnpm exec nx run-many --targets=build --exclude=examples/**,testing/** --skip-nx-cache
5055
- name: Run Changesets (version or publish)
5156
id: changesets
5257
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0

scripts/verify-links.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ function relativeLinkExists(link: string, file: string): boolean {
5353
return false
5454
}
5555

56+
// The API reference (docs/reference/**) is TypeDoc-generated at build time
57+
// and not committed, so its targets can't be resolved here. These are valid
58+
// routes on the built site; skip them rather than flagging false positives.
59+
if (absPath.startsWith(resolve(docsRoot, 'reference'))) {
60+
return true
61+
}
62+
5663
// Check if this is an example path
5764
const isExample = absPath.includes('/examples/')
5865

0 commit comments

Comments
 (0)