Context
Downstream consumers of @deessejs/errors (notably apps/web in the workspace) may at some point want a preview channel for testing unreleased fixes or features before they hit npm @latest. Two patterns support this:
- Snapshot releases via Changesets:
pnpm changeset version --snapshot canary produces 0.0.0-canary-<timestamp> versions published under the npm canary dist tag, then --tag canary on publish.
- Branched prerelease mode:
pnpm changeset pre enter next + a dedicated next branch + a separate workflow publish loop. Heavier, fully aligned with Changesets prerelease semantics.
Either path produces an npm-installable preview pin (npm install @deessejs/errors@canary).
We have not observed a concrete demand yet. The release engineer can already, manually, publish a one-off preview by branching off the desired commit and running pnpm changeset publish --tag preview from workflow_dispatch. That ad-hoc fallback is slow (~5 minutes per request) but accurate and zero-infrastructure.
Why defer
- YAGNI adapted. Snapshot releases in Changesets create a side-track state (mutually exclusive with the normal release flow). Until there is a concrete downstream consumer, the maintenance cost outweighs the benefit.
- Ad-hoc fallback exists. The release engineer can publish a single preview tag on demand without any new workflow.
- Cost of getting it wrong. Snapshot releases add an extra publish surface that requires its own runbook (how to graduate a snapshot to stable, how to recover if a snapshot ships accidentally as stable, how to clean up tags).
Proposed approach when the need arises
If and when a downstream consumer (most likely apps/web) requests preview versions, the recommended implementation is:
- A
canary.yml workflow triggered on a canary/* branch (or workflow_dispatch with a commit ref input).
- It runs
pnpm changeset version --snapshot canary and pnpm changeset publish --tag canary with the same trusted-publishing configuration as release.yml.
CONTRIBUTING.md documents the canary npm dist tag and a one-liner for consumers: npm install @deessejs/errors@canary.
- A runbook section in
docs/internal/engineering/process/releasing-a-new-version.md covering the promotion path (graduating a canary to stable) and the rollback path (removing a bad canary).
The branched-prerelease pattern (option 2) is not recommended for this package size. Snapshot releases are sufficient until the project grows past one downstream consumer.
Acceptance criteria (when implemented)
Related
Status
Deferred. To be picked up when a concrete downstream need emerges.
Context
Downstream consumers of
@deessejs/errors(notablyapps/webin the workspace) may at some point want a preview channel for testing unreleased fixes or features before they hit npm@latest. Two patterns support this:pnpm changeset version --snapshot canaryproduces0.0.0-canary-<timestamp>versions published under the npmcanarydist tag, then--tag canaryon publish.pnpm changeset pre enter next+ a dedicatednextbranch + a separate workflow publish loop. Heavier, fully aligned with Changesets prerelease semantics.Either path produces an npm-installable preview pin (
npm install @deessejs/errors@canary).We have not observed a concrete demand yet. The release engineer can already, manually, publish a one-off preview by branching off the desired commit and running
pnpm changeset publish --tag previewfromworkflow_dispatch. That ad-hoc fallback is slow (~5 minutes per request) but accurate and zero-infrastructure.Why defer
Proposed approach when the need arises
If and when a downstream consumer (most likely
apps/web) requests preview versions, the recommended implementation is:canary.ymlworkflow triggered on acanary/*branch (orworkflow_dispatchwith a commit ref input).pnpm changeset version --snapshot canaryandpnpm changeset publish --tag canarywith the same trusted-publishing configuration asrelease.yml.CONTRIBUTING.mddocuments thecanarynpm dist tag and a one-liner for consumers:npm install @deessejs/errors@canary.docs/internal/engineering/process/releasing-a-new-version.mdcovering the promotion path (graduating a canary to stable) and the rollback path (removing a bad canary).The branched-prerelease pattern (option 2) is not recommended for this package size. Snapshot releases are sufficient until the project grows past one downstream consumer.
Acceptance criteria (when implemented)
apps/web) has formally requested a preview channel — explicit ask in writing.CONTRIBUTING.mdand the release runbook.docs/internal/engineering/plans/release-system.mdis updated to reflect the canary workflow as part of Section 7 (post-plan additions).Related
docs/internal/engineering/plans/release-system.mdAppendix A.Status
Deferred. To be picked up when a concrete downstream need emerges.