Skip to content

fix(runtime): keep Node 18 startup compatible - #1749

Merged
John-David Dalton (jdalton) merged 1 commit into
v1.xfrom
fix/surf-2033-node18-runtime
Nov 24, 2026
Merged

John-David Dalton (jdalton) merged 1 commit into
v1.xfrom
fix/surf-2033-node18-runtime

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Defer parsing the SDK Unicode-set regexes so Node 18 can reach its existing fallback.

Fixes #1479.

@cursor

cursor Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Targeted vendor patch for regex initialization at CLI startup; behavior on capable runtimes unchanged when v-flag regexes succeed.

Overview
Fixes CLI startup on Node 18.20.8 when @socketsecurity/sdk text-width logic cannot use Unicode-set (v flag) regular expressions.

The change patches @socketsecurity/sdk@4.0.3 via pnpm and rewires three regexes in the SDK’s width helper: instead of regex literals with the v flag (which Node 18 rejects at parse time), they are built with new RegExp(..., 'v') inside the existing try/catch, so a failing runtime can fall back to the older u-flag patterns as intended.

CHANGELOG.md documents the fix under Unreleased; package.json / pnpm-lock.yaml register the new patched dependency (plus a trivial devDependency ordering tweak).

Reviewed by Cursor Bugbot for commit 8e2d55a. Configure here.

@jdalton
John-David Dalton (jdalton) force-pushed the fix/surf-2033-node18-runtime branch 4 times, most recently from c0099c0 to 10b014f Compare November 23, 2026 18:02
@jdalton
John-David Dalton (jdalton) force-pushed the fix/surf-2033-node18-runtime branch 2 times, most recently from acdb6c5 to d4fdfec Compare November 24, 2026 16:41
@jdalton
John-David Dalton (jdalton) merged commit ba46324 into v1.x Nov 24, 2026
20 of 25 checks passed
@jdalton
John-David Dalton (jdalton) deleted the fix/surf-2033-node18-runtime branch November 24, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Running node 18.20.8 and v1.1.152 results in not parsable regex

2 participants