From abd2e8d7ed83c4cbbf526e43f08695c20d139698 Mon Sep 17 00:00:00 2001 From: baxyz Date: Tue, 21 Jul 2026 18:21:24 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix(CI-CD):=20=F0=9F=90=9B=20copy=20llms.tx?= =?UTF-8?q?t=20in=20the=20npm-packages=20fallback=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fallback metadata source (used when the release-artifact download fails) only copied each npm package's meta/ directory — llms.txt ships at the package root, alongside meta/, so it was silently dropped there too. Verified against real npm packages (@helpers4/all, @helpers4/array) that llms.txt is genuinely present at that path in every package. Doesn't fix the currently-stale helpers4.dev/typescript/llms-full.txt on its own — that requires the release-artifact path (the one actually in use) to have llms.txt too, fixed separately in helpers4/typescript's release.yml. This just closes the same gap in the fallback path for defense-in-depth. --- .github/workflows/on-typescript-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/on-typescript-release.yml b/.github/workflows/on-typescript-release.yml index 910b6a9..4fe3d90 100644 --- a/.github/workflows/on-typescript-release.yml +++ b/.github/workflows/on-typescript-release.yml @@ -116,6 +116,10 @@ jobs: safe_extract_tarball "${npm_tmp}/${all_tgz}" "${npm_tmp}/all" mkdir -p /tmp/typescript/build/all cp -R "${npm_tmp}/all/package/meta" /tmp/typescript/build/all/ + # llms.txt ships at the package root, not under meta/ — copy it separately so + # generate-typescript-docs.js's llms-full.txt regeneration (which reads + # build/all/llms.txt) doesn't silently skip when this fallback path is used. + [ -f "${npm_tmp}/all/package/llms.txt" ] && cp "${npm_tmp}/all/package/llms.txt" /tmp/typescript/build/all/ local categories categories="$(node -e "const fs=require('fs'); const p=JSON.parse(fs.readFileSync('${npm_tmp}/all/package/package.json','utf8')); console.log(Object.keys(p.peerDependencies||{}).map(name=>name.split('/').pop()).join(' '));")" @@ -130,6 +134,7 @@ jobs: safe_extract_tarball "${npm_tmp}/${category_tgz}" "${npm_tmp}/${category}" mkdir -p "/tmp/typescript/build/${category}" cp -R "${npm_tmp}/${category}/package/meta" "/tmp/typescript/build/${category}/" + [ -f "${npm_tmp}/${category}/package/llms.txt" ] && cp "${npm_tmp}/${category}/package/llms.txt" "/tmp/typescript/build/${category}/" done popd > /dev/null From 75274145323db108249dc436570aa67b729930a3 Mon Sep 17 00:00:00 2001 From: baxyz Date: Tue, 21 Jul 2026 18:37:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix(CI-CD):=20=F0=9F=90=9B=20stage=20public?= =?UTF-8?q?/typescript/=20so=20llms-full.txt=20actually=20commits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'Commit and push updated docs' step only staged src/content/docs/${DOCS_TARGET}/ and src/data/versions.json — generate-typescript-docs.js also writes public/typescript/llms-full.txt (and its archived vN/ snapshots), but that path was never added. The file could be correctly regenerated on disk with fresh content and the step would still print 'No changes to commit' and exit, since nothing under public/ was ever staged to diff against. This is why re-triggering the workflow for v3.0.4 (after fixing the build-meta.tar.gz artifact to include llms.txt) still didn't update the live site: the generator logged '✓ published llms-full.txt', but the commit step silently dropped it. Verified end-to-end in a scratch worktree: ran the real generator against the real (now-fixed) v3.0.4 build artifact, confirmed public/typescript/llms-full.txt is the only file that changes (the content pages were already up to date from earlier runs), and that the old git add left it undetected while the fixed one stages and commits it correctly. --- .github/workflows/on-typescript-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/on-typescript-release.yml b/.github/workflows/on-typescript-release.yml index 4fe3d90..30bccaa 100644 --- a/.github/workflows/on-typescript-release.yml +++ b/.github/workflows/on-typescript-release.yml @@ -195,7 +195,11 @@ jobs: RELEASE_VERSION="${RELEASE_VERSION#v}" git config user.name "pushinator[bot]" git config user.email "pushinator[bot]@users.noreply.github.com" - git add "src/content/docs/${DOCS_TARGET}/" src/data/versions.json + # public/typescript/ covers llms-full.txt (and its archived vN/ snapshots) — the + # generator writes there too (see publishLlmsFullTxt / archiveStableIfMajorBump in + # generate-typescript-docs.js), but it was never staged: llms-full.txt could be + # correctly regenerated on disk and still silently never get committed. + git add "src/content/docs/${DOCS_TARGET}/" src/data/versions.json "public/typescript/" git diff --staged --quiet && echo "No changes to commit" && exit 0 git commit -m "chore(typescript): 🔧 update ${DOCS_TARGET} docs for v${RELEASE_VERSION}" for attempt in 1 2 3; do