diff --git a/.claude/skills/bump-socket/references/release-lanes.md b/.claude/skills/bump-socket/references/release-lanes.md index d654c2068..fda4ddb44 100644 --- a/.claude/skills/bump-socket/references/release-lanes.md +++ b/.claude/skills/bump-socket/references/release-lanes.md @@ -5,9 +5,9 @@ first; publishing is a separate dispatch after that PR is merged. | `release-lane` | npm packages | npm dist-tags | | --- | --- | --- | -| `paired` (default) | All nine packages | `latest` and `rc-2.1.0` | +| `paired` (default) | All nine packages | `latest` and `rc-2.1.1` | | `v1.x` | `socket`, `@socketsecurity/cli`, `@socketsecurity/cli-with-sentry` | `latest` | -| `v2-rc` | `socket` launcher and five exact-version platform packages | `rc-2.1.0` | +| `v2-rc` | `socket` launcher and five exact-version platform packages | `rc-2.1.1` | The package list is enforced by `scripts/release/packages.mts`. The build matrix is defined in `scripts/build-package-matrix.mts`. Prerelease versions diff --git a/.config/release.json b/.config/release.json index 1b4c65951..e62c98c7e 100644 --- a/.config/release.json +++ b/.config/release.json @@ -1,6 +1,6 @@ { "mode": "prerelease-only", - "versionHint": "2.1.0", + "versionHint": "2.1.1", "identifier": "rc", - "distTag": "rc-2.1.0" + "distTag": "rc-2.1.1" } diff --git a/package.json b/package.json index 30d9722f7..020b0d4d6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "socket", "version": "1.18.2", - "socketCliPrereleaseVersion": "2.1.0-rc.0", + "socketCliPrereleaseVersion": "2.1.1-rc.0", "description": "CLI for Socket.dev", "contentPolicy": { "class": "dual-use" diff --git a/src/sea/README.md b/src/sea/README.md index acab32bc0..bb8e57f63 100644 --- a/src/sea/README.md +++ b/src/sea/README.md @@ -2,7 +2,7 @@ This prototype builds a standalone `socket` executable with Node 27. It embeds the application and tool files in Node's virtual file system (VFS), so startup does not install npm packages or download helper tools. -A release config is required at `.config/release.json`, `release.json`, or `.release.json`; release tools fail closed if it is missing, invalid, or conflicting. The shared policy supports `stable-from-hint` and `prerelease-only`; SEA builds require `prerelease-only`. Its `versionHint` is the intended final release version (`2.1.0`), so the published versions remain `2.1.0-rc.N`. The v1.x release workflow selects major version 1 and does not promote this track to a stable release. +A release config is required at `.config/release.json`, `release.json`, or `.release.json`; release tools fail closed if it is missing, invalid, or conflicting. The shared policy supports `stable-from-hint` and `prerelease-only`; SEA builds require `prerelease-only`. Its `versionHint` is the intended final release version (`2.1.1`), so the published versions remain `2.1.1-rc.N`. The v1.x release workflow selects major version 1 and does not promote this track to a stable release. ## Release recovery @@ -51,7 +51,7 @@ The Node CLI and SEA download Coana from the Socket API on a cache miss. The SEA ## Manifest -Each successful build writes a manifest beside the executable. It records the target, Socket and Node versions, file digests, bundled tools, third-party notices, and available capabilities. Read the manifest's `capabilities` and notice `obligations` before using a bundled tool. The npm prerelease package uses the `rc-2.1.0` dist-tag; it does not use `latest` or `next`. +Each successful build writes a manifest beside the executable. It records the target, Socket and Node versions, file digests, bundled tools, third-party notices, and available capabilities. Read the manifest's `capabilities` and notice `obligations` before using a bundled tool. The npm prerelease package uses the `rc-2.1.1` dist-tag; it does not use `latest` or `next`. ## Prototype status @@ -81,7 +81,7 @@ Run `pnpm build:sea` on the target OS and CPU. The builder checks help and versi The release workflow builds the five platform packages on their matching runners. Each runner installs the actual `socket` launcher tarball with its matching platform tarball in an empty consumer and runs help and version through the installed command. The launcher declares exact-version optional dependencies under `@socketsecurity/socket-cli--`. Linux packages target glibc. The pinned Node release provides macOS arm64, Linux arm64/x64 and Windows arm64/x64 archives. -Use the existing publish workflow. To rehearse from a v1 checkout, choose **publish**, **dry-run**, and release major **2**. To release, prepare and merge the RC version first. The publish job stages verified platform tarballs before the launcher under `rc-2.1.0`. Approve platform stage IDs first and the launcher last with `pnpm run approve:npm `. +Use the existing publish workflow. To rehearse from a v1 checkout, choose **publish**, **dry-run**, and release major **2**. To release, prepare and merge the RC version first. The publish job stages verified platform tarballs before the launcher under `rc-2.1.1`. Approve platform stage IDs first and the launcher last with `pnpm run approve:npm `. For the first release of a new name, an npm organization maintainer must provision a short-lived granular token with write permission to create public packages in the `@socketsecurity` scope. It does not need 2FA bypass. Store it as `NPM_FIRST_STAGE_TOKEN` in the protected GitHub `publish-npm` environment. CI checks package names against the public registry before reserving the tag and supplies the token only for first-time native staging. Approval uses maintainer 2FA. diff --git a/test/package-matrix.test.mts b/test/package-matrix.test.mts index 86ecbc3be..ba6cfa1c9 100644 --- a/test/package-matrix.test.mts +++ b/test/package-matrix.test.mts @@ -11,6 +11,7 @@ import os from 'node:os' import path from 'node:path' import { gzipSync } from 'node:zlib' +import semver from 'semver' import { describe, expect, it } from 'vitest' import { @@ -24,6 +25,7 @@ import { validatePrivateVirtualStore, verifyPrivateVirtualStore, } from '../scripts/build-package-matrix.mts' +import { SEA_RELEASE_POLICY } from '../src/sea/version.mts' function tarEntry(name: string, contents: string): Buffer { const data = Buffer.from(contents) @@ -47,16 +49,18 @@ function tarEntry(name: string, contents: string): Buffer { describe('package matrix helpers', () => { it('accepts only the SEA prerelease version format', () => { - expect(currentPrereleaseVersion('2.1.0-rc.17')).toBe('2.1.0-rc.17') - expect(() => currentPrereleaseVersion('2.1.0')).toThrow( - 'Expected SEA version', - ) - expect(() => currentPrereleaseVersion('2.1.0-beta.1')).toThrow( - 'Expected SEA version', - ) - expect(() => currentPrereleaseVersion('2.2.0-rc.1')).toThrow( - 'Expected SEA version', - ) + const { identifier, versionHint } = SEA_RELEASE_POLICY + const valid = `${versionHint}-${identifier}.17` + expect(currentPrereleaseVersion(valid)).toBe(valid) + for (const invalid of [ + versionHint, + `${versionHint}-${identifier}-other.1`, + `${semver.inc(versionHint, 'patch')}-${identifier}.1`, + ]) { + expect(() => currentPrereleaseVersion(invalid)).toThrow( + 'Expected SEA version', + ) + } }) it('defines the four stable and prerelease package variants', () => {