Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/on-typescript-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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(' '));")"
Expand All @@ -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
Expand Down Expand Up @@ -190,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
Expand Down