The Long Haul: A Web Book on Maintaining a Package for Years
Publishing version 1.0.0 takes a weekend. Keeping a package healthy for five years is a different job, mostly made of small decisions about what to support, what to decline and how to avoid becoming the single point of failure. These chapters cover that second job.
Chapter 1: Write down your support window
Users ask "will you fix this in the old version?" far more often than maintainers expect. Answer it once, in the README or a SUPPORT.md. A simple policy might say: the latest major receives features and fixes; the previous major receives security fixes for a stated period after the new major ships; anything older receives nothing. Tie runtime support to upstream schedules too. Node.js and Python both publish end-of-life dates for their release lines, and following them gives you a neutral reason to drop old versions.
Chapter 2: Backport branches without chaos
If you promise fixes to an old major, you need somewhere to make them.
- When you release a new major, create a branch such as
v3.xfrom the last v3 tag. - Land fixes on the main branch first, then cherry-pick to
v3.x. - Release from the maintenance branch with the same CI workflow, so the process is not a once-a-year mystery.
- When the window closes, archive the branch and say so in the changelog.
Configure your registry publish so a backport release does not take over the default tag. On npm, publish old-line versions with npm publish --tag v3-latest, or an equivalent dist-tag, so npm install example-lib still gets the newest major.
Chapter 3: Triage as a habit, not a crisis
A backlog of untouched issues is discouraging for everyone. A lightweight routine works better than occasional marathons:
- Use issue templates that ask for version, runtime and a minimal reproduction.
- Label each new issue within a few days, even if you cannot fix it: bug, question, feature, needs-repro.
- Close questions by pointing to documentation, then improve that documentation.
- Be honest about features you will not build. A polite "out of scope" is kinder than silence.
Chapter 4: Reducing the bus factor
A package with one person holding the publish credentials is fragile. Add a second maintainer to the registry account and the repository, document the release process in the repository itself, and prefer CI-based publishing so releases do not depend on one laptop. Registries such as npm and PyPI support organisation or multi-owner setups for this purpose.
Chapter 5: Stepping back gracefully
Maintainers move on, and that is normal. If you are stepping back, say so plainly in the README, invite a successor through an open issue, and transfer ownership only to someone with a track record in the project. If nobody steps up, mark the package as unmaintained and, on npm, use npm deprecate with a message pointing to alternatives. Quietly abandoning a popular name is how it ends up in the wrong hands.
Related: deprecation policy and the runtime end-of-life calendar.