Skip to content

Stable releases only; try builds with release:try or pkg.pr.new previews - #266

Merged
pviti merged 5 commits into
monorepofrom
chore/release-stable-only
Oct 2, 2026
Merged

pviti merged 5 commits into
monorepofrom
chore/release-stable-only

Conversation

@pviti

@pviti pviti commented Oct 2, 2026

Copy link
Copy Markdown
Member

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-version drops --preid. A prerelease left in a package.json (today's unreleased x.y.z-beta.0) is released as x.y.z; a prerelease typed in --interactive is refused.
  • resolveTag refuses prerelease tags, so release.yml drafts nothing and publish.yml publishes nothing for them. Every release is latest.

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, as plugins:install does (no plugins:link TypeScript 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:install accepts 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.yml can 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).
  • Installing a tarball, plugin-plugins warns that the prepare script "did not produce all the expected files" (the package has no npm-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 --help and resources run; --out works; working tree untouched
  • In the sandbox, plugins:install file:…/commercelayer-cli-plugin-webhooks-….tgz installs it and webhooks runs; an unknown plugin tarball and a non-pkg.pr.new URL are refused
  • resolve-tag refuses tags-v3.0.0-beta.0 and cli-v7.0.0-beta.0
  • cli suite (+3 tests for the test-build recognition), pnpm lint, check-packages, preview.yml passes @action-validator/cli
  • CI

🤖 Generated with Claude Code

pviti and others added 5 commits October 2, 2026 11:23
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>
@pviti
pviti merged commit 394aeb5 into monorepo Oct 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant