chore(ci): update socket-registry workflow refs to latest main#123
Merged
Conversation
John-David Dalton (jdalton)
added a commit
that referenced
this pull request
May 28, 2026
Includes four CI/publish fixes needed for v6.0.4 to ship: 1. scripts/publish-shared.mts::isAlreadyPublished catches the spawn-wrapper rejection on non-zero exit. `npm view ...@6.0.4` exits non-zero pre-publish (404 not-published-yet), which was crashing the publish script before reaching the publish call. 2. scripts/publish.mts gains a `--direct` mode (classic-token `npm publish`, no staging). The default `--staged` path is blocked by Socket Firewall not yet allowlisting `/-/stage` endpoints — tracked in firewall PR #123. `--direct` runs `pnpm publish` (no `stage publish`) so it never hits the blocked endpoint family. Same `--provenance` injection in GitHub Actions; flip back to `--staged` once the firewall fix ships. 3. .github/workflows/provenance.yml uses the new `--direct` flag instead of `--staged`. Comment in the YAML pins the SFW PR for when we revert. 4. .github/workflows/ci.yml test-script prefixes `pnpm run build` so vitest can resolve dist/ imports in ansi/normalize tests. 5. test/unit/dlx/detect-helpers.test.mts compares against normalizePath(pkgPath) instead of native-separator path.join output (fleet forward-slash convention; was failing on the Windows runner).
John-David Dalton (jdalton)
added a commit
that referenced
this pull request
May 28, 2026
Includes CI/publish fixes needed for v6.0.4 to ship: 1. scripts/publish-shared.mts::isAlreadyPublished switched to node's spawnSync directly (NOT lib's async spawn wrapper). The wrapper attaches a Promise to its return that rejects on non-zero exit with "command failed"; that rejection is on the wrapper's Promise, not the one runCapture's `new Promise(...)` returns, so an async try/catch in runCapture can't catch it. `npm view <pkg>@<unpublished-version>` exits 1 — the expected pre-publish state — which was crashing the publish workflow as an unhandled rejection. spawnSync sidesteps the wrapper-Promise problem entirely. 2. scripts/publish.mts gains a `--direct` mode (classic-token `pnpm publish`, no staging). Default `--staged` is blocked by Socket Firewall not yet allowlisting `/-/stage` endpoints — tracked in firewall PR #123. `--direct` runs `pnpm publish` so it never hits the blocked endpoint family. Same `--provenance` injection under GitHub Actions; flip back to `--staged` once PR #123 ships. 3. .github/workflows/provenance.yml uses `--direct` instead of `--staged`. Comment in the YAML pins the SFW PR for revert. 4. .github/workflows/ci.yml test-script prefixes `pnpm run build` so vitest can resolve dist/ imports in ansi/normalize tests. 5. test/unit/dlx/detect-helpers.test.mts compares against normalizePath(pkgPath) instead of native-separator path.join output (fleet forward-slash convention; was failing on the Windows runner).
John-David Dalton (jdalton)
added a commit
that referenced
this pull request
May 28, 2026
Includes CI/publish fixes needed for v6.0.4 to ship:
1. scripts/publish-shared.mts::isAlreadyPublished now `await`s
lib's async `spawn` inside a try/catch. The async spawn's
wrapper Promise rejects on non-zero exit ("command failed");
`npm view <pkg>@<unpublished-version>` exits 1 (expected
pre-publish state) and was crashing the workflow as an
unhandled rejection. The try/catch turns it into the boolean
"not published" answer we want. stdio is `'ignore'` since we
only care about the exit code.
2. scripts/publish.mts gains a `--direct` mode (classic-token
`pnpm publish`, no staging). Default `--staged` is blocked by
Socket Firewall not yet allowlisting `/-/stage` endpoints —
tracked in firewall PR #123. `--direct` bypasses the
staged-publish endpoint family entirely. Same `--provenance`
under GitHub Actions; flip back to `--staged` once PR #123
ships.
3. .github/workflows/provenance.yml uses `--direct` instead of
`--staged`. Comment in the YAML pins the SFW PR for revert.
4. .github/workflows/ci.yml test-script prefixes `pnpm run build`
so vitest can resolve dist/ imports in ansi/normalize tests.
5. test/unit/dlx/detect-helpers.test.mts compares against
normalizePath(pkgPath) instead of native-separator path.join
output (fleet forward-slash convention; was failing on the
Windows runner).
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.
Summary
SocketDev/socket-registryreusable workflow SHA refs to latest main (b809e72d) which adds Node.js 24 support and drops Node.js 20 (EOL) from the default test matrixTest plan