Repository navigation
Conversation
release-please-config.json was parsed in three places (the anchor, the boundary check, the anchor check), each as an untyped object, so a file that was not JSON failed with a bare parse error naming no file, and a boundary that was not a commit sha (an array config, a number) was read as a stale boundary and answered with a repair value. One reader now parses the file and refuses a missing or malformed one, or a last-release-sha that is no 40-hex sha, naming the file and the fix; an absent boundary stays the pre-first-release state. The config is release-please's and the user's, so nothing is repaired.
release-pipeline.ts held every section of the release pipeline in one 1562-line file. Its sections move to sibling modules under .github/scripts/release-pipeline/: git.ts (the git helpers every section shares, with ancestry, a commit's position on main, and the manifest read), tags.ts (packaged commits and the refs that name them), anchor.ts (release-please's boundary), npm.ts (the pre-release version, the verdicts, the publish, the floor), and draft.ts (the draft release's source and assets). The entry file keeps its path, the one the workflows and the test fixture invoke, and holds main() alone. The test file splits the same way: its npm half becomes test/scripts/release-pipeline-npm.test.ts. Every function keeps its text; only imports, exports, and file headers are new, and every importer and comment that named the old file follows the move.
Owner
Author
Owner
Author
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.
What this changes
How
main()alone.lib/holds helpers several scripts share, and these sections belong to one script.Proof
test(andtest.each(call sites 71 before and after (47 + 24). Exports 37 before, all 37 still exported from their new modules, plus 12 helpers exported for cross-module use (listed below). Lines 1562 to 1645 for the script, 2204 to 2234 for the tests, the difference being headers and imports.Depends on #513, #515, and #517.
Technical details
release-pipeline/git.ts:assertFullHistory,BOT_IDENTITY,FULL_SHA,git,gitOrNo,gitWithEnv,isAncestor,manifestVersionAt,push,resolveCommit,tryGit; fromdraft.ts:RELEASE_ASSETS(read bymain).git.tsrather thannpm.ts:tags.tsnames build tags by it, so it is shared, not npm's..github/scripts/release-pipeline.tsas where the topology lives. The entry file still exists, so the sentence stays true..github/scripts/release-pipeline.ts,.github/scripts/release-pipeline/{git,tags,anchor,npm,draft}.ts,.github/workflows/{update-release,update-release-pr}.yml(comments),test/scripts/release-pipeline{,-npm,-build}.test.ts,test/workflows/{checks-workflow,post-green-workflow,npm-publish-workflows}.test.ts.