Running node 18.20.8 and v1.1.152 results in not parsable regex
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- node.js, typescript
- 领域
- cli
调研方向
首先,使用 Node.js 18.20.8 以及 issue 中的 npm install 和 socket --version 命令复现该失败。检查所示正则表达式附近的 dist/vendor.js 和 dist/utils.js,然后验证 socket --version、socket --help 和 socket npm --version 是否能在文档所述的 Node.js 版本上成功启动。
由索引模型根据 Issue 内容生成。
描述
When using node version 18.20.8 upgrading to the release v1.1.152 failed, whereas version v1.1.143 works.
The documentation lists that for running socket, node version 18.20.8 is a minimum but supported requirement.
Steps for reproduction
nvm use 18.20.8
npm install --global socket@1.1.152
socket --version
The problem can also be reproduced directly with the relevant JavaScript syntax:
node -e 'console.log(/[\p{ASCII}&&\p{Letter}]/v)'
On Node.js 18.20.8 this results in:
SyntaxError: Invalid regular expression flags
Actual result
Every Socket command fails during startup, including:
socket --version
socket --help
socket npm --version
The application prints the following trace.
/home/x/.nvm/versions/node/v18.20.8/lib/node_modules/socket/dist/vendor.js:30745
*/let cachedEastAsianWidth;function getEastAsianWidth(){if(cachedEastAsianWidth===void 0)cachedEastAsianWidth=require_get_east_asian_width().eastAsianWidth;return cachedEastAsianWidth;}let segmenter;function getSegmenter(){if(segmenter===void 0)segmenter=new require_primordials_intl.IntlSegmenter();return segmenter;}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;}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;emojiRegex=/^\p{Extended_Pictographic}$/u;}/* c8 ignore stop *//**
^
SyntaxError: Invalid regular expression flags
at internalCompileFunction (node:internal/vm:76:18)
at wrapSafe (node:internal/modules/cjs/loader:1283:20)
at Module._compile (node:internal/modules/cjs/loader:1328:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/home/x/.nvm/versions/node/v18.20.8/lib/node_modules/socket/dist/utils.js:3:14)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
Node.js v18.20.8
- 主要语言
- TypeScript
- 星标
- 317
- 派生
- 65
- 平均合并
- 1 小时 26 分钟
- 30 天内合并 PR
- 30
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SocketDev/socket-cli 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
SocketDev/socket-cli#1160 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
SocketDev/socket-cli#1547 ·
-
难度 5/5 一周以上 新手友好度 35/100
SocketDev/socket-cli#1525 ·
-
难度 3/5 1-2 天 新手友好度 45/100
SocketDev/socket-cli#1517 ·
-
难度 3/5 1-2 天 新手友好度 68/100
SocketDev/socket-cli#1498 ·
查看 SocketDev/socket-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·