Skip to content

Migration entries

How to write and maintain migration docs. One file per behavior change lives under docs/migration/; the reader-facing overview is MIGRATION.md. This page is the single source of truth for naming, workflow, and entry structure — do not append long entries to MIGRATION.md.

Naming

docs/migration/issue-<issue-number-zero-padded>-<short-slug>.md

Examples: issue-0002-config-files.md, issue-0569-cli-round.md.

Zero-pad the issue number to four digits so filenames sort in issue order.

PR workflow (merge-conflict safe)

DoDon't
Add one new issue-NNNN-*.md per PRAppend sections to MIGRATION.md
Edit only your issue’s file when updating wordingEdit another issue’s migration file
On release, set Minimum version in that fileRename files unless the issue number was wrong

Parallel PRs touch different paths → Git merges cleanly.

Entry structure

Every file in docs/migration/ must use these headings in order (omit only when a section truly does not apply):

SectionRequired?Content
Minimum versionYesSemver when shipped; pending before release
What changedYesOne short summary
BeforeYesBehavior on older releases
AfterYesBehavior on the fixed release
Workaround on older versionsYes when applicableConcrete steps users on an older npm version can take without upgrading (config shape, CLI flags, external tools, pinned version). Do not skip for bug fixes — if the bug is CLI-only, document a config/API path that still works.
After upgradingYesnpm install webfont@… and the new recommended command or config

When no practical workaround exists (rare), keep the heading and write None with one sentence explaining why (for example the old release cannot perform the operation at all).

Example workaround patterns

  • Bug on CLI flag → use cosmiconfig with a typed value (number in JSON/JS config instead of a string from argv).
  • Missing feature → external tool or script until upgrade.
  • Config vs CLI conflict → pass input only on the command line on older releases.

On release: edit only that issue’s file — set Minimum version and trim workarounds that only applied to pre-release builds.

Find an entry

  • GitHub: search issue-0569 in docs/migration/
  • Local: ls docs/migration/issue-*.md

Link the file from the GitHub issue and PR (Related issue / comments).

Released under the MIT License.