l-version-next
Publish a prerelease version under the npm "next" dist-tag
/l-version-next
Publish a prerelease version of @takazudo/mdx-formatter under the npm next dist-tag.
Users install with npm install @takazudo/mdx-formatter@next.
Version Format
X.Y.Z-next.N where:
X.Y.Zis the target stable version (e.g.,0.5.0)Nis an incrementing prerelease number (1, 2, 3, …)
Preconditions
Before doing anything else, verify ALL of the following. If any check fails, stop and tell the user.
- Working tree is clean (
git status --porcelainreturns empty) ghCLI is authenticated
Determine Version
Read the current version from package.json.
If current version is already a -next.N prerelease:
Increment the prerelease number:
0.5.0-next.1→0.5.0-next.20.5.0-next.2→0.5.0-next.3
If current version is a stable release (e.g., 0.4.3):
Determine the base version for the next release:
- If the user passed
major: bump major (e.g.,0.4.3→1.0.0-next.1) - If the user passed
minoror no argument: bump minor (e.g.,0.4.3→0.5.0-next.1) - If the user passed
patch: bump patch (e.g.,0.4.3→0.4.4-next.1)
Present the version to the user and wait for confirmation.
Build and Test
pnpm build && pnpm test
If anything fails, stop and tell the user. Do not proceed.
Update Version
Update the version field in package.json to the new prerelease version.
git add package.json
git commit -m "chore: Bump version to v{VERSION}"
Push
git push
Publish with next Tag
Ask the user for confirmation before publishing.
The user will run npm publish --tag next manually (it requires browser-based 2FA). Tell the user to run:
npm publish --tag next
After publishing, verify:
npm view @takazudo/mdx-formatter dist-tags
This should show both latest (stable) and next (prerelease) tags.
Notes
- No changelog doc is created for prerelease versions
- No git tag is created for prerelease versions
- No GitHub release is created for prerelease versions
- To promote a next version to stable, use
/l-version-promote - To install the next version:
npm install @takazudo/mdx-formatter@next