From 2d8ed07d98021e0e53a157d23c09fc40ab3ad1ec Mon Sep 17 00:00:00 2001 From: jdalton Date: Fri, 20 Nov 2026 21:37:59 -0500 Subject: [PATCH] fix(runtime): support Node 18 regex fallback --- package.json | 2 +- patches/@socketsecurity__lib@7.1.0.patch | 17 +++++++++++++++++ pnpm-lock.yaml | 7 ++++--- pnpm-workspace.yaml | 1 + 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 patches/@socketsecurity__lib@7.1.0.patch diff --git a/package.json b/package.json index 4c1726b4b..d51bede0a 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@sinclair/typebox": "catalog:", "@socketregistry/packageurl-js": "1.7.0", "@socketregistry/packageurl-js-stable": "catalog:", - "@socketsecurity/lib": "7.2.0", + "@socketsecurity/lib": "catalog:", "@socketsecurity/lib-stable": "catalog:", "@socketsecurity/registry-stable": "catalog:", "@socketsecurity/sdk": "catalog:", diff --git a/patches/@socketsecurity__lib@7.1.0.patch b/patches/@socketsecurity__lib@7.1.0.patch new file mode 100644 index 000000000..cb7306c14 --- /dev/null +++ b/patches/@socketsecurity__lib@7.1.0.patch @@ -0,0 +1,17 @@ +diff --git a/dist/strings/width.js b/dist/strings/width.js +index 51bb7e4297747bbe7755de2f58b81c4c4cf2e2ff..70e73295c742a437b14d5bf431215923d779511a 100644 +--- a/dist/strings/width.js ++++ b/dist/strings/width.js +@@ -34,9 +34,9 @@ let zeroWidthClusterRegex; + 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 58b017fe4..91c073b79 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -416,6 +416,7 @@ overrides: patchedDependencies: '@polka/url@1.0.0-next.29': 60d82e95c5e67e66c41fe2987ddd4fc3f4992f12158e5c56838e7682e6ef72ea + '@socketsecurity/lib@7.1.0': b5431345634b33091778f54888327939b76c0f2f096f9e412cf2ff9d3a8ae1a3 brace-expansion@5.0.12: c15cb4e3c78bc74448f2dd848dacc1d86afc3c91cc8e70d78ef52150b1d47b04 minimatch@10.2.6: 83f1ea5b333d1b6fe1b36f93ccb222aa02e5dd468b2c646e285d7d53d234e174 run-local-ci@0.18.1: a335253820e963c2659ec1b08ee143e865eb39ec80ca7d313fff50c33e157d99 @@ -460,10 +461,10 @@ importers: version: '@socketregistry/packageurl-js@1.6.0' '@socketsecurity/lib': specifier: 7.1.0 - version: 7.1.0(typescript@7.1.0-dev.20261008.1) + version: 7.1.0(patch_hash=b5431345634b33091778f54888327939b76c0f2f096f9e412cf2ff9d3a8ae1a3)(typescript@7.1.0-dev.20261008.1) '@socketsecurity/lib-stable': specifier: 'catalog:' - version: '@socketsecurity/lib@7.1.0(typescript@7.1.0-dev.20261008.1)' + version: '@socketsecurity/lib@7.1.0(patch_hash=b5431345634b33091778f54888327939b76c0f2f096f9e412cf2ff9d3a8ae1a3)(typescript@7.1.0-dev.20261008.1)' '@socketsecurity/registry-stable': specifier: 'catalog:' version: '@socketsecurity/registry@2.0.5(typescript@7.1.0-dev.20261008.1)' @@ -4018,7 +4019,7 @@ snapshots: '@socketregistry/side-channel@1.0.10': {} - '@socketsecurity/lib@7.1.0(typescript@7.1.0-dev.20261008.1)': + '@socketsecurity/lib@7.1.0(patch_hash=b5431345634b33091778f54888327939b76c0f2f096f9e412cf2ff9d3a8ae1a3)(typescript@7.1.0-dev.20261008.1)': optionalDependencies: typescript: 7.1.0-dev.20261008.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d9f811589..840877ade 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -514,6 +514,7 @@ patchedDependencies: # The patch preserves both contracts under the single dependency override. # Regenerate the patch with its catalog version when updating the pin. '@polka/url@1.0.0-next.29': patches/fleet/@polka__url@1.0.0-next.29.patch + '@socketsecurity/lib@7.1.0': patches/@socketsecurity__lib@7.1.0.patch # default-export interop (repo-pinned; do not edit): # v10's ESM build ships named exports only, so `import minimatch from # 'minimatch'` throws "does not provide an export named default". That is