From fa8895a83819a4f780f9fac3a065f4ebb08ba8e9 Mon Sep 17 00:00:00 2001 From: jdalton Date: Tue, 24 Nov 2026 11:44:39 -0500 Subject: [PATCH] fix(runtime): keep Node 18 startup compatible Assisted-by: Codex:GPT-6 --- package.json | 1 + patches/@socketsecurity__sdk@4.0.3.patch | 17 +++++++++++++++++ pnpm-lock.yaml | 7 +++++-- test/release-workflow.test.mts | 13 +++++++------ 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 patches/@socketsecurity__sdk@4.0.3.patch diff --git a/package.json b/package.json index 64367e01c..dccc9885e 100644 --- a/package.json +++ b/package.json @@ -323,6 +323,7 @@ "lodash@4.17.21": "patches/lodash@4.17.21.patch", "rollup@4.50.1": "patches/rollup@4.50.1.patch", "@socketsecurity/registry@1.1.17": "patches/@socketsecurity__registry@1.1.17.patch", + "@socketsecurity/sdk@4.0.3": "patches/@socketsecurity__sdk@4.0.3.patch", "tiny-updater@3.5.3": "patches/tiny-updater@3.5.3.patch" } }, diff --git a/patches/@socketsecurity__sdk@4.0.3.patch b/patches/@socketsecurity__sdk@4.0.3.patch new file mode 100644 index 000000000..d12375237 --- /dev/null +++ b/patches/@socketsecurity__sdk@4.0.3.patch @@ -0,0 +1,17 @@ +diff --git a/dist/index.js b/dist/index.js +index 560bf62014ca80557d244be75207c74dddbf488f..2fe84d14a83fd82464fac9d627a6ea06fc5262da 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -19306,9 +19306,9 @@ var require_width = /* @__PURE__ */ __commonJSMin(((exports) => { + let leadingNonPrintingRegex; + let emojiRegex; + try { +- zeroWidthClusterRegex = /^(?:\p{Control}|\p{Default_Ignorable_Code_Point}|\p{Mark}|\p{Surrogate})+$/v; +- leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v; +- emojiRegex = /^\p{RGI_Emoji}$/v; ++ zeroWidthClusterRegex = new RegExp('^(?:\\p{Control}|\\p{Default_Ignorable_Code_Point}|\\p{Mark}|\\p{Surrogate})+$', 'v'); ++ leadingNonPrintingRegex = new RegExp('^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+', 'v'); ++ emojiRegex = new RegExp('^\\p{RGI_Emoji}$', 'v'); + } catch { + zeroWidthClusterRegex = /^(?:\p{Control}|\p{Default_Ignorable_Code_Point}|\p{Mark})+$/u; + leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}]+/u; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27eab6942..ffe1db99a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,6 +66,9 @@ patchedDependencies: '@socketsecurity/registry@1.1.17': hash: 46f41d951e8ffbe5c0b41d6aa30a0281fe032e0bfd97d899a1f4766285bfb820 path: patches/@socketsecurity__registry@1.1.17.patch + '@socketsecurity/sdk@4.0.3': + hash: 4a12f35c50a3360c68a367609b2de41514cd790f12eda5197b3f8a778ac7e1e2 + path: patches/@socketsecurity__sdk@4.0.3.patch ansi-term@0.0.2: hash: 06bb5127b7689d6ab2ea833f9617b2c3fbe9fe0048ce1c6b59b81f7e25ccbccb path: patches/ansi-term@0.0.2.patch @@ -227,7 +230,7 @@ importers: version: 1.1.17(patch_hash=46f41d951e8ffbe5c0b41d6aa30a0281fe032e0bfd97d899a1f4766285bfb820) '@socketsecurity/sdk': specifier: 4.0.3 - version: 4.0.3 + version: 4.0.3(patch_hash=4a12f35c50a3360c68a367609b2de41514cd790f12eda5197b3f8a778ac7e1e2) '@termless/core': specifier: 0.11.0 version: 0.11.0(node-pty@1.2.0-beta.18) @@ -7422,7 +7425,7 @@ snapshots: '@socketsecurity/registry@1.1.17(patch_hash=46f41d951e8ffbe5c0b41d6aa30a0281fe032e0bfd97d899a1f4766285bfb820)': {} - '@socketsecurity/sdk@4.0.3': {} + '@socketsecurity/sdk@4.0.3(patch_hash=4a12f35c50a3360c68a367609b2de41514cd790f12eda5197b3f8a778ac7e1e2)': {} '@socketsecurity/socket-patch-android-arm64@2.0.0': optional: true diff --git a/test/release-workflow.test.mts b/test/release-workflow.test.mts index d9fcde454..e5a4d0d0a 100644 --- a/test/release-workflow.test.mts +++ b/test/release-workflow.test.mts @@ -6,6 +6,9 @@ import path from 'node:path' import { describe, expect, it } from 'vitest' import { parse } from 'yaml' +import { npmDistTagForRelease } from '../scripts/release/validate-npm-policy.mts' +import { SEA_RELEASE_POLICY } from '../src/sea/version.mts' + interface ReleaseStep { if?: string env?: Record @@ -256,14 +259,12 @@ describe('v1 release workflow contract', () => { const manifest = JSON.parse( readFileSync(new URL('../package.json', import.meta.url), 'utf8'), - ) as { publishConfig?: { tag?: string }; version?: string } - const releasePolicy = JSON.parse( - readFileSync(new URL('../.config/release.json', import.meta.url), 'utf8'), - ) as { identifier: string; versionHint: string } + ) as { publishConfig?: { tag?: string }; version: string } expect(manifest.version).toMatch(/^(?:1\.\d+\.\d+|2\.1\.0-rc\.\d+)$/u) - expect(manifest.publishConfig?.tag).toBe( - `${releasePolicy.identifier}-${releasePolicy.versionHint}`, + expect(npmDistTagForRelease(manifest.version, SEA_RELEASE_POLICY)).toBe( + manifest.version.startsWith('1.') ? 'latest' : SEA_RELEASE_POLICY.distTag, ) + expect(manifest.publishConfig?.tag).toBe(SEA_RELEASE_POLICY.distTag) expect(workflow.on.workflow_dispatch.inputs['release-major']?.default).toBe( '1', )