Releasing
This package publishes from GitHub Actions when a v* tag is pushed.
Versioning Policy
Section titled “Versioning Policy”This package intends to stay on 0.x indefinitely — there is no planned
1.0.0 (“ZeroVer”). Staying pre-1.0 keeps iteration cheap and avoids the
implicit “frozen forever” contract a 1.0.0 signals. A 1.0.0 is only on the
table if the API surface genuinely stabilizes for a broad external audience.
We follow standard semver within 0.x to choose the bump direction (this
matches changelogen’s conventional-commit inference). The resulting version is
still passed explicitly via -r <version> at release time — see
Pre-1.0 Versions for why.
| Change | Bump | Example | Conventional commit |
|---|---|---|---|
| New feature, backward compatible | minor | 0.4.0 → 0.5.0 |
feat: |
| Bug fix, backward compatible | patch | 0.4.0 → 0.4.1 |
fix: |
| Breaking change | minor + flag | 0.4.0 → 0.5.0 |
feat!: / fix!: / BREAKING CHANGE: footer |
Always flag breaking changes with a ! (feat!:) or a BREAKING CHANGE:
commit footer. changelogen renders them under a ⚠️ Breaking Changes heading in
the CHANGELOG and they surface in the GitHub release notes — that is how
consumers are warned.
Caveat (accepted): because a breaking change lands as a 0.x minor, a
^0.x range will still upgrade across it (the classic ^0.x footgun). The
primary consumers here pin exact versions (e.g. catalog versioning), so this is
acceptable; anyone wanting hard protection should pin ~0.x. If the package
ever gains many external ^-pinning consumers, switch to the caret-protective
“0ver” convention (breaking → minor, everything else → patch) at that point.
Note: the
⚠️heading changelogen emits can have a double space after the emoji that oxfmt rewrites — after a breaking release runbun run formatand commit the CHANGELOG fix soformat:checkstays green (the publish workflow is unaffected, but themainCI runsformat:check).
CI/CD Overview
Section titled “CI/CD Overview”.github/workflows/ci.yml runs on pushes and pull requests to main:
bun installbunx playwright install --with-deps chromiumbun run lintbun run format:checknpx tsc --noEmitbun run testbun run build
Publish
Section titled “Publish”.github/workflows/publish.yml runs on pushed tags matching v*:
bun installbunx playwright install --with-deps chromiumbun run testbun run buildnpm publish --provenance --access publicgh release create <tag> --generate-notes || echo "Release already exists"
npm auth is trusted publishing (OIDC), with no NPM_TOKEN secret: npmjs.com
trusts this repository’s publish.yml, set up once with
npm trust github @xtandard/lib --repo xantiagoma/xtandard --file publish.yml(or in the package’s settings on npmjs.com). It needs npm 11.5.1 or later, which
the workflow gets from Node 24. GitHub release creation uses the workflow
GITHUB_TOKEN.
If the publish step fails after the tag is pushed, fix the cause and publish the same tag again from the workflow’s manual trigger (no new tag needed):
gh workflow run publish.yml -f tag=v0.6.0Normal Release Flow
Section titled “Normal Release Flow”- Ensure all feature/fix changes are already committed.
- Run local validation:
bun run formatbun run checkbun run testbun run buildnpm pack --dry-run- Create the release commit and tag with an explicit version:
bunx changelogen --release -r 0.2.0 --push --no-openReplace 0.2.0 with the intended version.
- Watch GitHub Actions:
gh run list --limit 5gh run watch <run-id>- Confirm npm and GitHub release state:
npm view @xtandard/lib versiongh release list --limit 5Important: Pre-1.0 Versions
Section titled “Important: Pre-1.0 Versions”Do not use --minor to create a 0.x minor release. Changelogen follows
pre-1.0 semver behavior and may convert a minor bump such as 0.2.0 into the
next patch, e.g. 0.1.3.
Use an explicit version instead:
bunx changelogen --release -r 0.2.0 --push --no-openThe package script bun run release uses automatic bump detection. Use it only
when the inferred version is acceptable. For planned minor releases, prefer the
explicit -r <version> command above.
If The Wrong Tag Is Pushed
Section titled “If The Wrong Tag Is Pushed”If a wrong tag is pushed but npm has not published it yet:
gh run list --workflow Publish --limit 5gh run cancel <publish-run-id>git tag -d v0.1.3git push origin :refs/tags/v0.1.3Then create the intended release with an explicit version.
If npm has already published the wrong version, do not delete or rewrite it. Publish a new corrected version instead.
Peer Dependencies
Section titled “Peer Dependencies”Run bun run recs:check before a release. Besides the recommended libraries, it checks this
package’s own peerDependencies and warns when npm’s latest is above a peer range: a
prerelease of a new major (track it) or a new stable major (test it and widen the range).
Tracked now:
-
unstorage 2.0. npm’s
latestis2.0.0-beta.0; the peer stays^1.14.4while 2.x is beta. When 2.0 is stable, test@xtandard/lib/unstorageagainst it, widen the peer to^1.14.4 || ^2.0.0(and the devDependency), and drop theunstorage@^1notes from the unstorage integration page and the recommendation’s caveat inrecs/libraries.ts. -
effect 3 → 4. The peer is
^3.10.0 || ^4.0.0. Effect 4 changed the Schema API, so one source can’t serve both:@xtandard/lib/effectand@xtandard/lib/filters/effectare built on effect 3 (theeffectdevDependency), and@xtandard/lib/effect/v4and@xtandard/lib/filters/effect/v4on effect 4 (sourcessrc/*-v4.tsimport theeffect-v4devDependency alias, which the build remaps toeffect;scripts/check-dist.tsguards it). At the next breaking release, flip it: move the-v4sources into/effectand/filters/effect(importingeffect), drop the/v4entries, the effect 3 sources and theeffect-v4alias, and set the peer and devDependency to^4.
Package Contents
Section titled “Package Contents”package.json controls published files. Keep docs in the files list because
the README links to docs/PAGINATION.md and docs/sync-async-adaptive.md.
Before publishing, verify package contents:
npm pack --dry-run --json