chore: move the release scripts to a cl-release workspace package - #267
Merged
Merged
Conversation
The release scripts become @commercelayer/cli-release (packages/release, private): TypeScript run through tsx, like cl-generate, one module per command, unit tests for the pure parts. The root scripts and the workflows call `cl-release <command>`; the outputs are unchanged. The test helpers move to packages/test-utils: oclif-root.cjs (mocha setup) and bin/live-sweep.mjs. check-packages stays in scripts/, self-contained. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
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.
The release scripts become a private workspace package,
@commercelayer/cli-release(packages/release), on the model ofcli-generator.Changes
cl-release <command>. Commandsversion,tag,try,labels,resolve,notes,publishandmanifest, one module each insrc/commands, plus shared helpers insrc/workspace.ts.bin/cl-release.mjs), no build step.node:utilparseArgs; every command has--help, and an unknown option is an error.pnpm release:version,release:tag,release:config,release:publish,release:try); they now callcl-release. The release libraries move from the root devDependencies to the package.pnpm exec cl-release resolve|notes|publish|manifest|labels.release.ymlinstalls@commercelayer/cli-monorepo..., so it also gets cl-release and its dependencies.packages/test-utils.oclif-root.cjs: the 17.mocharc.jsonnow point to../../packages/test-utils/oclif-root.cjs.bin/live-sweep.mjs: used byintegration.ymland mentioned in the README.check-packagesstays inscripts/and no longer imports from the removedscripts/lib.Equivalence check
I ran the old scripts and
cl-releaseon the same tree (origin/monorepo) and compared their outputs and exit codes. All identical:version --base monorepo --yes --dry-run(18 packages);tag --base monorepo --dry-run;resolveon valid tags (tags-v2.2.6,cli-v6.9.9,orders-v5.7.0) and invalid ones (prerelease, mismatch, unknown folder, private package, no prefix);noteson the same tags, also with an explicit previous tag;publish --dry-run: error for a dependency without a tag, and a full run with cli-core and cli-ux published first;manifest(--warn,--against, packages without commands, private, missing).labelschanges only the header of.github/labeler.yml, andrelease:try tagsinstalls and runs the sandbox CLI.🤖 Generated with Claude Code