Repository navigation
build(release): release the TypeScript package only when a published file changes - #23
Merged
Merged
Conversation
…file changes The release filter counted every commit under typescript/ or conformance/, so a feat commit that changed only tests, scripts, examples or the conformance vectors would cut a release with no package difference. Count only the files the npm and JSR packages publish, add excluding globs to release-paths for test files, and test that the list matches package.json, jsr.json and tsconfig.build.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPqZer6DeXwJsTVBC3d77s
|
🎉 This PR is included in version 0.13.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Kyle · project thread
Summary
The release filter counted every commit under
typescript/orconformance/. Afeatorfixcommit that changed only tests, scripts, examples, CI or the conformance vectors would therefore cut a release with no package difference. That hasn't happened yet: 0.13.0, the only release since the move, came from a real source change. Now only commits that change a file the npm or JSR package publishes count. Rust-only commits (draft PR 22) were already skipped and still are. This is the same fix as udibo/oauth2 PR 360.Changes
scripts/release-paths.ts: apathsentry that starts with!becomes an excluding git pathspec glob (:(top,glob,exclude)), so test files inside a counted directory don't count..releaserc.json:pathsis nowtypescript/src/(without*.test.ts),README.md,LICENSE,package.json,jsr.json,tsconfig.jsonandtsconfig.build.json.conformance/. Onlysrc/conformance.test.tsreads it.release-config.test.tscheckspathsagainstfilesinpackage.json,publishinjsr.jsonandtsconfig.build.json, so the list and the publish configuration can't drift apart.PUBLISHING.mddescribes the new rule.Testing
pnpm checkpasses, and so dopnpm test scripts/(30 tests).pathsback fails both release-config tests. Dropping theexcludemagic fails both new release-paths tests.Generated by Claude Code