Skip to content

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

Open
John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
fix/surf-2033-node18-runtime
Open

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

Conversation

@jdalton

Copy link
Copy Markdown
Contributor

Defer parsing the SDK Unicode-set regexes so Node 18 can reach its existing fallback.\n\nFixes #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.

This branch has not been deployed

No deployments
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.

1 participant