Skip to content

Drop Node 18 from CI matrix due to string-width v flag incompatibility #78

@Lellansin

Description

@Lellansin

描述

Node 18 已从 CI matrix 中移除(PR #77),当前仅验证 Node 20/22/24。

原因

依赖 string-width 使用了 v(unicodeSets)regex flag,该语法需要 Node.js >=20。Node 18 不支持,运行时抛出:

SyntaxError: Invalid regular expression flags
  at node_modules/string-width/index.js:19

参见上游依赖:https://github.com/sindresorhus/string-width

影响

  • CI 不再验证 Node 18 兼容性
  • 项目 package.jsonengines.node 声明为 >=18.17.0,与实际情况不符
  • 用户在 Node 18 上可能遇到运行时错误

后续

  • 降级或替换 string-width 到兼容 Node 18 的版本
  • 恢复 Node 18 到 CI matrix
  • 更新 package.json 中的 engines.node 声明

关联:PR #77

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions