Release process
nuxt-toc@3.0.0 is the first major of the dual Content / Nuxt 4 line. Patch and minor releases within 3.x should preserve:
- Nuxt
^3.16 || ^4, Content^2 || ^3peer range. - Config key
nuxtToc. - Stable CSS contract (
#toc-title,#toc-container,.toc-link,.active-toc-item, …). - Dual playground layout under
playgrounds/.
Bumping outside those promises requires a new major and a Breaking changes entry.
Steps
bash
# 1. From a clean main
git checkout main && git pull
# 2. Gate — same as CI
npm run check # lint + format:check + test
npm run prepack # dist/ should be clean; inspect dist/module.mjs + types
# 3. Bump version in package.json (use npm version or edit manually)
npm version patch # or minor / major — updates package.json + creates tag locally
# 4. Update CHANGELOG.md under that version (commit before releasing)
# Include: Breaking / Enhancements / Fixes / Docs / Chore sections
# 5. Release helper — or the longhand next block
npm run release
# Equivalent to: npm run check && npm run prepack && changelogen --release && npm publish && git push --follow-tagsLonghand (if you prefer explicit control)
bash
npm run lint && npm run format:check && npm run test
npm run prepack
changelogen --release # changelog helper — keeps CHANGELOG.md + git tag consistent
npm publish --access public
git push --follow-tagsAfter publish
- Verify on
https://www.npmjs.com/package/nuxt-tocthatdist/(module + runtime + types) is present andfiles: ["dist"]is sufficient. - Smoke-check both playgrounds (
npm run dev:prepare→ ±nuxi build playgrounds/content-v3,content-v2) after the publish tag — the CI pack dry-run covers this, but a real build adds the packed artifact path.
Checklist before tagging
- [ ]
package.json → versionmatches the changelog heading. - [ ]
docs/guide/changelog.mdshim points toCHANGELOG.mdat root (no separate per-version text needed). - [ ]
logo.pngcopies still identical across root, playgrounds, docs. - [ ] No pending lock-file churn (
package-lock.jsonshould be committed). - [ ]
releasescript’spublishConfig.registry: https://registry.npmjs.org/is still correct if publishing from an org registry.
Also see: Changelog, Breaking changes, Docs site.
