Stable releases only; try builds with release:try or pkg.pr.new previews - #266
Merged
Merged
Conversation
Prereleases no longer go to npm, multiple betas least of all: - finish-version drops --preid; a prerelease left in a package.json (the unreleased x.y.z-beta.0 of today) is released as x.y.z, and a prerelease typed in --interactive is refused - resolveTag refuses prerelease tags, so release.yml drafts no release and publish.yml publishes nothing for them; every release is latest To try a version before releasing it: pnpm release:try, or a pkg.pr.new preview (preview.yml). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin can now be installed from a build that isn't released on npm: a pkg.pr.new preview URL (preview.yml) or a local tarball (file:…/commercelayer-cli-plugin-<name>-<version>.tgz, from pnpm release:try or pnpm pack). Only builds of known Commerce Layer CLI plugins are accepted; other URLs and unknown plugins are still refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… release Builds and packs the CLI, cli-core, cli-ux and the chosen plugins (all by default), installs the CLI in a sandbox and the plugins in its data folder as user plugins, as plugins:install does, with cli-core and cli-ux from the packed tarballs so unreleased versions work. The sandbox has its own config, data and cache folders, and its own entry point (.release-try/commercelayer). Packed without the lifecycle scripts, so the README is not regenerated and nothing is staged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
preview.yml, run by hand on a branch, publishes a test build of the CLI, cli-core, cli-ux and the chosen plugins to pkg.pr.new (the previews depend on each other's URLs) and lists the install commands in the run summary: npm install -g for the CLI, plugins:install for the plugins. Nothing reaches npm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository is public: the release procedure is documented in the release scripts and workflows themselves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Only stable versions go to npm, and trying a version before a release no longer needs a prerelease: a local sandbox, or a pkg.pr.new preview that anyone can install.
No prereleases on npm
finish-versiondrops--preid. A prerelease left in apackage.json(today's unreleasedx.y.z-beta.0) is released asx.y.z; a prerelease typed in--interactiveis refused.resolveTagrefuses prerelease tags, sorelease.ymldrafts nothing andpublish.ymlpublishes nothing for them. Every release islatest.Trying a build without releasing it
pnpm release:try [plugin…] [--out <dir>]— for developers, from the working tree: builds and packs the CLI, cli-core, cli-ux and the chosen plugins (all by default), installs the CLI in a sandbox and the plugins as user plugins, asplugins:installdoes (noplugins:linkTypeScript warnings), with cli-core and cli-ux from the packed tarballs so unreleased versions work. Own config/data/cache folders (logins there don't touch the real ones) and entry point:.release-try/commercelayer. Packed without lifecycle scripts: the README isn't regenerated, nothing is staged.preview.yml— for anyone without the repo: run by hand on a branch, publishes a test build of the CLI, cli-core, cli-ux and the chosen plugins to pkg.pr.new (previews depend on each other's URLs), and lists the install commands in the run summary. Nothing reaches npm.plugins:installaccepts test builds (feat(cli)): a pkg.pr.new preview URL or a local tarball (file:…/commercelayer-cli-plugin-<name>-<version>.tgz) of a known plugin. Other URLs and unknown plugins are still refused.README
The release procedure is removed from the README (the repository is public); it stays documented in the release scripts and workflows.
Notes
preview.ymlcan only be dispatched once it is on the default branch (main, after the monorepo merge), and needs the pkg.pr.new GitHub App on the repository (it was used before ci: remove the pkg.pr.new preview workflow #221).plugin-pluginswarns that the prepare script "did not produce all the expected files" (the package has nonpm-shrinkwrap.json): harmless, the plugin works.Test plan
pnpm release:try tags resources: CLI 7.0.0-beta.0 with both plugins as user plugins,tags --helpandresourcesrun;--outworks; working tree untouchedplugins:install file:…/commercelayer-cli-plugin-webhooks-….tgzinstalls it andwebhooksruns; an unknown plugin tarball and a non-pkg.pr.new URL are refusedresolve-tagrefusestags-v3.0.0-beta.0andcli-v7.0.0-beta.0pnpm lint,check-packages,preview.ymlpasses@action-validator/cli🤖 Generated with Claude Code