docs: recommend pinning plugins and presets in npx command#48
docs: recommend pinning plugins and presets in npx command#48igordanchenko wants to merge 1 commit into
Conversation
The major-version pinning recommendation previously covered only semantic-release itself, while the npx example listed plugins and presets unpinned. An unpinned preset major can silently break releases — e.g. `conventional-changelog-conventionalcommits@10` resolved against the `conventional-changelog-writer@8` bundled by current semantic-release produces empty release notes. The example deliberately pins `conventional-changelog-conventionalcommits@9` until release-notes-generator ships with `conventional-changelog-writer@9`. See conventional-changelog/conventional-changelog#1495
|
@igordanchenko is attempting to deploy a commit to the Semantic Release Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
While adopting this exact recommendation in one of my projects, I ran into a footgun that may be worth a note in the docs.
The catch is that this only happens with pinned specs — i.e., exactly when following this PR's recommendation. A bare package name parses as the Adding - name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HUSKY: 0
run: npx --package semantic-release@25 --package conventional-changelog-conventionalcommits@9 semantic-release(Verified fix — the same workflow released successfully with Happy to fold a short warning about this into the PR if you think it belongs on this page. |
Summary
Extends the version pinning guidance on the Running semantic-release page to cover plugins and presets, not just semantic-release itself.
Follow-up to the discussion in conventional-changelog/conventional-changelog#1495.
Open Questions
@travi
How would you prefer to handle version drift in the pinned examples? Add a note saying the versions are current as of July 2026? Or use generic
@^X/@^Yplaceholders?A related question about the Renovate guidance: an automated Renovate config can cause the very same issue version pinning is trying to avoid — a major bump of a pinned preset (e.g.
conventional-changelog-conventionalcommits@9→@10) passes CI and silently ships empty release notes. Should the Renovate example stay semantic-release-only, or also cover plugin pins?