Skip to content

Commit 80f6eac

Browse files
committed
chore(release): prepare Socket CLI 2.1.1-rc.0
1 parent 4cc885d commit 80f6eac

5 files changed

Lines changed: 22 additions & 18 deletions

File tree

‎.claude/skills/bump-socket/references/release-lanes.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ first; publishing is a separate dispatch after that PR is merged.
55

66
| `release-lane` | npm packages | npm dist-tags |
77
| --- | --- | --- |
8-
| `paired` (default) | All nine packages | `latest` and `rc-2.1.0` |
8+
| `paired` (default) | All nine packages | `latest` and `rc-2.1.1` |
99
| `v1.x` | `socket`, `@socketsecurity/cli`, `@socketsecurity/cli-with-sentry` | `latest` |
10-
| `v2-rc` | `socket` launcher and five exact-version platform packages | `rc-2.1.0` |
10+
| `v2-rc` | `socket` launcher and five exact-version platform packages | `rc-2.1.1` |
1111

1212
The package list is enforced by `scripts/release/packages.mts`. The build
1313
matrix is defined in `scripts/build-package-matrix.mts`. Prerelease versions

‎.config/release.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"mode": "prerelease-only",
3-
"versionHint": "2.1.0",
3+
"versionHint": "2.1.1",
44
"identifier": "rc",
5-
"distTag": "rc-2.1.0"
5+
"distTag": "rc-2.1.1"
66
}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "socket",
33
"version": "1.18.2",
4-
"socketCliPrereleaseVersion": "2.1.0-rc.0",
4+
"socketCliPrereleaseVersion": "2.1.1-rc.0",
55
"description": "CLI for Socket.dev",
66
"contentPolicy": {
77
"class": "dual-use"

‎src/sea/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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.
44

5-
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.
5+
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.
66

77
## Release recovery
88

@@ -51,7 +51,7 @@ The Node CLI and SEA download Coana from the Socket API on a cache miss. The SEA
5151

5252
## Manifest
5353

54-
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`.
54+
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`.
5555

5656
## Prototype status
5757

@@ -81,7 +81,7 @@ Run `pnpm build:sea` on the target OS and CPU. The builder checks help and versi
8181

8282
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-<platform>-<arch>`. Linux packages target glibc. The pinned Node release provides macOS arm64, Linux arm64/x64 and Windows arm64/x64 archives.
8383

84-
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 <stage-id>`.
84+
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 <stage-id>`.
8585

8686
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.
8787

‎test/package-matrix.test.mts‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import os from 'node:os'
1111
import path from 'node:path'
1212
import { gzipSync } from 'node:zlib'
1313

14+
import semver from 'semver'
1415
import { describe, expect, it } from 'vitest'
1516

1617
import {
@@ -24,6 +25,7 @@ import {
2425
validatePrivateVirtualStore,
2526
verifyPrivateVirtualStore,
2627
} from '../scripts/build-package-matrix.mts'
28+
import { SEA_RELEASE_POLICY } from '../src/sea/version.mts'
2729

2830
function tarEntry(name: string, contents: string): Buffer {
2931
const data = Buffer.from(contents)
@@ -47,16 +49,18 @@ function tarEntry(name: string, contents: string): Buffer {
4749

4850
describe('package matrix helpers', () => {
4951
it('accepts only the SEA prerelease version format', () => {
50-
expect(currentPrereleaseVersion('2.1.0-rc.17')).toBe('2.1.0-rc.17')
51-
expect(() => currentPrereleaseVersion('2.1.0')).toThrow(
52-
'Expected SEA version',
53-
)
54-
expect(() => currentPrereleaseVersion('2.1.0-beta.1')).toThrow(
55-
'Expected SEA version',
56-
)
57-
expect(() => currentPrereleaseVersion('2.2.0-rc.1')).toThrow(
58-
'Expected SEA version',
59-
)
52+
const { identifier, versionHint } = SEA_RELEASE_POLICY
53+
const valid = `${versionHint}-${identifier}.17`
54+
expect(currentPrereleaseVersion(valid)).toBe(valid)
55+
for (const invalid of [
56+
versionHint,
57+
`${versionHint}-${identifier}-other.1`,
58+
`${semver.inc(versionHint, 'patch')}-${identifier}.1`,
59+
]) {
60+
expect(() => currentPrereleaseVersion(invalid)).toThrow(
61+
'Expected SEA version',
62+
)
63+
}
6064
})
6165

6266
it('defines the four stable and prerelease package variants', () => {

0 commit comments

Comments
 (0)