Skip to content

Conversation

@cyfung1031
Copy link
Collaborator

@cyfung1031 cyfung1031 commented Feb 11, 2026

  • "@crowdin/cli" 没有使用
  • rspack 有些设定过时了,也更新了
  • "@vitest/coverage-v8" 应该没有用到 (沒指定 provider: "v8" ? )。不过我还是保留了并更新至最新

Before

Screenshot 2026-02-11 at 13 56 25

After

Screenshot 2026-02-11 at 13 56 03

@CodFrm
Copy link
Member

CodFrm commented Feb 12, 2026

本地跑单元测试没问题,github ci出问题了

@cyfung1031
Copy link
Collaborator Author

本地跑单元测试没问题,github ci出问题了

喔。。。
我把 v8-coverage 版本调低一下吧
我没用过这东西。不清楚

@cyfung1031 cyfung1031 marked this pull request as draft February 12, 2026 09:32
@cyfung1031 cyfung1031 marked this pull request as ready for review February 12, 2026 09:52
@cyfung1031
Copy link
Collaborator Author

@CodFrm vitest 升級至 4.0.18 了。 ci 也過了

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本 PR 旨在修复 npm packages 的安全漏洞问题,主要通过删除未使用的依赖和更新现有依赖到最新版本来实现。PR 同时更新了相关配置以适配新版本的工具链。

Changes:

  • 删除未使用的 @crowdin/cli 依赖
  • 更新多个核心依赖到最新版本(rspack 1.5.8 → 1.7.6, vitest 3.2.4 → 4.0.18, eslint等)
  • 更新 rspack 配置以移除过时的 API 并适配新版本
  • 添加 vitest 4.x 的 adoptedStyleSheets 兼容性修复
  • 移除测试中的 .concurrent 以解决 vitest 4.x 的兼容性问题

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json 删除 @crowdin/cli,更新 rspack、vitest、eslint、testing-library 等依赖到最新版本
rspack.config.ts 移除 defineConfig,添加 node 配置,移除已弃用的 parallelCodeSplitting,改用 satisfies Configuration
tests/vitest.setup.ts 添加 vitest 4.x 中 adoptedStyleSheets 的兼容性修复代码
packages/message/*.test.ts 移除测试中的 .concurrent 标记以适配 vitest 4.x
pnpm-lock.yaml 自动生成的锁文件,反映所有依赖更新


describe("发布方法测试", () => {
it.concurrent("publish 方法应该使用 chrome.runtime.sendMessage", () => {
it("publish 方法应该使用 chrome.runtime.sendMessage", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concurrent 确实容易出问题,后面的单元测试我觉得也不用强求使用concurrent了

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得是unit test 写得不好吧
不应该每一次test 改共通
而是一次过对共通做mock

不要用 .not.toHaveBeenCalled();
not.toHaveBeenCalledWith({ ... });


如果是简单的 test 的话,就用 concurrent 吧
通讯系的又懒写就不加 concurrent

现在升级到 4.x.x 应该速度会有提升

都随心吧。只是一个 test

@CodFrm CodFrm merged commit 16cc899 into scriptscat:release/v1.3 Feb 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants