Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/bump-socket/references/release-lanes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .config/release.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"mode": "prerelease-only",
"versionHint": "2.1.0",
"versionHint": "2.1.1",
Comment thread
jdalton marked this conversation as resolved.
Resolved
"identifier": "rc",
"distTag": "rc-2.1.0"
"distTag": "rc-2.1.1"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/sea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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-<platform>-<arch>`. 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 <stage-id>`.
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>`.

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.

Expand Down
24 changes: 14 additions & 10 deletions test/package-matrix.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
Expand All @@ -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', () => {
Expand Down
Loading