ci(npm-publish): fail closed on prerelease-hint versions + consolidate unpublished changelog entries - #1454
Merged
Conversation
…ease cut A real publish now fails closed while package.json carries a X.Y.Z-prerelease hint (the committed next-version marker the release tooling consumes), the GitHub release goes live via the 3-step draft-then-publish flip with --latest=false so maintenance releases never take the repo Latest badge from the 2.x line, and the environment deployment-branch-policy comments state the current policy (main + v1.x).
…ased] Versions 1.1.148-1.1.150 never reached npm, so their changelog entries collapse into one [Unreleased] section carrying the latest Coana CLI (15.9.7), the socket scan view cached-results read from the sdk 4.x bump, and the socket fix discovery fixes. package.json moves to the 1.1.150-prerelease hint; the release bump strips the hint and promotes [Unreleased] under the released heading.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1.x publish flow had two gaps: a real dispatch would publish whatever version the tree carried (including a not-yet-released bump state), and the release cut used the single-call create that immutable releases can race.
Workflow (
.github/workflows/npm-publish.yml)dry-run: false) now fails whilepackage.jsoncarries aX.Y.Z-prereleasehint, so a dispatch on an un-bumped tree can never reach the registry.--draft=false --latest=false(3-step immutable-release pattern, notes only).--latest=falsekeeps v1.x maintenance releases from taking the repo Latest badge once 2.x ships from main.npm-publishdeployment-branch policy (main + v1.x).Release state
## [Unreleased]section: the latest Coana CLI15.9.7, thesocket scan viewcached-results read from the sdk 4.x bump (feat(sdk): bump socket-cli v1.x to @socketsecurity/sdk 4.x (SURF-1446 + SURF-742) #1427), and thesocket fixdiscovery fixes (fix(fix): propagate Coana discovery failures + consume structured discovery result #1444). We ship forward, no backfill of the skipped versions.package.jsonmoves to1.1.150-prerelease, the committed hint the release bump consumes: strip the hint, promote[Unreleased]under the released heading, then dispatch the publish.Note
Medium Risk
Changes npm publish guards and GitHub release cutting on the release pipeline; fail-closed prerelease checks reduce accidental registry publishes rather than increasing exposure.
Overview
Hardens the v1.x npm publish workflow and resets release metadata so the next ship is a single forward release (no backfill of skipped 1.1.148–1.1.150).
Workflow (
npm-publish.yml) — On a real publish (dry-run: false), the job now stops ifpackage.jsonstill has aX.Y.Z-prereleasehint, so an un-bumped tree cannot reach npm. GitHub releases use draft → publish (--draft=false --latest=false) for immutable-release safety and so v1.x does not take the repo Latest badge from 2.x on main. Comments are updated for thenpm-publishenvironment / trusted-publisher pairing and for all three packages hard-failing before tag/release.Release state — Changelog drops the unreleased 1.1.148–1.1.150 headings and folds those notes into
[Unreleased](Coana15.9.7,socket scan viewcached results,socket fixdiscovery/error handling).package.jsonis set to1.1.150-prereleaseas the committed next-version hint for the normal bump-then-dispatch flow.Reviewed by Cursor Bugbot for commit c7086e8. Configure here.