Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Nov 27, 2025

before:

Test Files  **1 failed** | **436 passed** | 24 skipped (481)

      Tests  **1 failed** | **2710 passed** | 250 skipped (3010)

   Start at  09:46:33

   Duration  98.09s (transform 187.55s, setup 109ms, import 328.38s, tests 856.77s, environment 26ms)

after

Test Files  **1 failed** | **432 passed** | 19 skipped (481)

      Tests  **1 failed** | **2604 passed** | 239 skipped (2972)

   Start at  09:48:33

   Duration  83.15s (transform 44.10s, setup 93ms, import 207.36s, tests 819.44s, environment 26ms)

Summary by CodeRabbit

  • Chores

    • Updated testing/tooling dependency versions (Vitest and related packages) and formatting tool version.
  • New Features

    • Enabled experimental filesystem module caching to improve test performance.
    • Added a new configuration option to control extension handling in build output.
  • Tests

    • Reworked scaffolding tests: some cases are now skipped/guarded and execution flow adjusted; preserved test semantics when enabled.
  • Style

    • Minor test formatting adjustments (no behavior changes).

✏️ Tip: You can customize this high-level summary in your review settings.

before:
```
Test Files  **1 failed** | **436 passed** | 24 skipped (481)

      Tests  **1 failed** | **2710 passed** | 250 skipped (3010)

   Start at  09:46:33

   Duration  98.09s (transform 187.55s, setup 109ms, import 328.38s, tests 856.77s, environment 26ms)
```

after
```
Test Files  **1 failed** | **432 passed** | 19 skipped (481)

      Tests  **1 failed** | **2604 passed** | 239 skipped (2972)

   Start at  09:48:33

   Duration  83.15s (transform 44.10s, setup 93ms, import 207.36s, tests 819.44s, environment 26ms)
```
@fengmk2 fengmk2 requested a review from Copilot November 27, 2025 02:01
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated workspace dependency versions for Vitest and oxfmt, enabled Vitest experimental fsModuleCache, and added a new boolean fixedExtension: false to tsdown configuration files in root and examples.

Changes

Cohort / File(s) Summary
Workspace / Tooling manifest
pnpm-workspace.yaml
Bumped versions: vitest, @vitest/coverage-v8, @vitest/ui moved from exact 4.0.8 to caret ^4.0.14; oxfmt bumped from ^0.13.0 to ^0.15.0.
Vitest config
vitest.config.ts
Added experimental.fsModuleCache: true under test configuration.
tsdown configuration files
tsdown.config.json, examples/helloworld-tegg/tsdown.config.ts, examples/helloworld-typescript/tsdown.config.ts
Added new top-level property fixedExtension: false to tsdown configurations.
Tests (format/skip adjustments)
packages/koa/test/application/index.test.ts, tools/create-egg/test/cli.test.ts
Minor formatting of context creation in koa test; several scaffolding tests in create-egg gated/skipped or restructured (no API changes).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to compatibility of caret-upgraded Vitest packages with existing test setup.
  • Confirm experimental.fsModuleCache usage and intended behavior in CI/local runs (vitest.config.ts).
  • Verify fixedExtension: false is the desired default across tsdown configs and that JSON/TS exports remain valid after the change.

Possibly related PRs

Poem

🐰 I hopped through deps and nudged a caret higher,

fsModuleCache hums like a warm little wire,
tsdown now settles with extensions fixed small,
Templates stay quiet until tests heed the call,
A bunny-approved tweak — light, tidy, and spry.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: enabling Vitest's experimental.fsModuleCache feature in vitest.config.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch use-vitest-fsModuleCache

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @fengmk2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the efficiency and modernity of the project's testing infrastructure. It primarily achieves this by upgrading Vitest to its latest version and enabling an experimental file system module caching feature, which has demonstrably improved test execution times. Concurrently, the PR updates core tool packages to embrace ES Module standards, ensuring better compatibility and future-proofing, while also performing a general cleanup of outdated dependencies.

Highlights

  • Vitest Version Upgrade: Vitest and its associated packages, including '@vitest/coverage-v8' and '@vitest/ui', have been upgraded from version 4.0.8 to 4.0.14, bringing the test suite up to date with the latest features and fixes.
  • Experimental fsModuleCache Enabled: The experimental 'fsModuleCache' feature has been activated in the Vitest configuration, which is designed to improve module loading performance during testing.
  • Significant Performance Improvement: Enabling the 'fsModuleCache' has led to a notable reduction in test suite duration, with overall test time decreasing from 98.09s to 83.15s, and transform/import times seeing substantial improvements.
  • ES Module Transition for Tools: The 'egg-bin' and 'scripts' packages within the 'tools' directory have been updated to use ES Module (ESM) syntax for their entry points and type definitions (.mjs and .d.mts extensions), aligning with modern JavaScript module standards.
  • Dependency Cleanup and Updates: Several dependencies have been updated or removed from the pnpm-lock.yaml, including updates to 'chai' and 'obug', and the removal of 'mime-types' and '@types/debug' related entries, streamlining the project's dependency tree.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enables an experimental Vitest feature to improve test performance and updates Vitest to a newer version. Using caret ranges for the updated dependencies is a good maintainability improvement. However, the PR also includes undocumented breaking changes by switching @eggjs/bin and @eggjs/scripts to output ESM (.mjs). I've added comments to highlight the need for documenting these changes, as they affect the public API of these packages.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2025

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: e252be7
Status: ✅  Deploy successful!
Preview URL: https://cf0678a0.egg-v3.pages.dev
Branch Preview URL: https://use-vitest-fsmodulecache.egg-v3.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2025

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: e252be7
Status: ✅  Deploy successful!
Preview URL: https://96bc7dd7.egg-cci.pages.dev
Branch Preview URL: https://use-vitest-fsmodulecache.egg-cci.pages.dev

View logs

Copilot finished reviewing on behalf of fengmk2 November 27, 2025 02:38
@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.42%. Comparing base (4003d97) to head (e252be7).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #5705      +/-   ##
==========================================
+ Coverage   85.42%   87.42%   +1.99%     
==========================================
  Files         561      561              
  Lines       10931    10932       +1     
  Branches     1238     1238              
==========================================
+ Hits         9338     9557     +219     
+ Misses       1494     1291     -203     
+ Partials       99       84      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

This PR enables vitest's experimental fsModuleCache feature and updates vitest-related packages from 4.0.8 to 4.0.14, resulting in significant performance improvements. The test duration decreased from 98.09s to 83.15s (15% faster), with substantial reductions in transform time (from 187.55s to 44.10s) and import time (from 328.38s to 207.36s).

Key Changes:

  • Enabled experimental.fsModuleCache: true in vitest configuration to leverage improved module caching
  • Updated vitest, @vitest/coverage-v8, and @vitest/ui packages to version ^4.0.14 with caret ranges
  • Added fixedExtension: false to tsdown build configurations for proper ESM/CommonJS handling

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vitest.config.ts Adds experimental.fsModuleCache configuration to enable faster module caching
tsdown.config.json Adds fixedExtension: false setting for root package build configuration
pnpm-workspace.yaml Updates vitest-related package versions from 4.0.8 to ^4.0.14 in catalog
pnpm-lock.yaml Regenerates lock file with updated vitest dependencies, removes optional @types/debug peer dependency
examples/helloworld-typescript/tsdown.config.ts Adds fixedExtension: false for example app build configuration
examples/helloworld-tegg/tsdown.config.ts Adds fixedExtension: false for example app build configuration
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
tools/create-egg/test/cli.test.ts (1)

172-189: Remove commented-out code.

The commented-out pnpm link logic is no longer in use, as the test now uses pnpm install directly. Commented code reduces maintainability and creates noise. If this code is needed for reference, it's preserved in git history.

Apply this diff to remove the commented code:

   // run test
-  // const monoRepoDir = path.join(import.meta.dirname, '../../../');
-  // const eggDir = path.join(monoRepoDir, 'packages/egg');
-  // const teggDir = path.join(monoRepoDir, 'tegg');
-  // const mockDir = path.join(monoRepoDir, 'plugins/mock');
-  // const binDir = path.join(monoRepoDir, 'tools/egg-bin');
-  // const tracerDir = path.join(monoRepoDir, 'plugins/tracer');
   execaCommandSync(`pnpm install`, {
   });
-  // execaCommandSync(`pnpm link ${mockDir} ${eggDir} ${binDir} ${tracerDir} ${teggDir}`, {
-  //   cwd: projectDir,
-  //   stdout: 'inherit',
-  //   stderr: 'inherit',
-  //   env: { NODE_OPTIONS: undefined }, // enable tegg plugins for test
-  // });
   const { stdout: testStdout } = execaCommandSync('pnpm test:local', {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5b4fea and e252be7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • packages/koa/test/application/index.test.ts (1 hunks)
  • pnpm-workspace.yaml (3 hunks)
  • tools/create-egg/test/cli.test.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/koa/test/application/index.test.ts
🧰 Additional context used
🧠 Learnings (29)
📓 Common learnings
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/plugin/*/{test,tests}/**/*.ts : Add Vitest tests for plugins using eggjs/mock; tests will be discovered by the root vitest config
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to packages/**/test/**/*.test.ts : Name test files as test/**/*.test.ts and run them with Vitest
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**/vitest.config.ts,plugins/**/vitest.config.ts} : Packages using Vitest must include a vitest.config.ts and import test functions from vitest
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/!(cookies)/**/vitest.config.ts,plugins/**/vitest.config.ts} : Vitest config must export a typed config (e.g., const config: UserWorkspaceConfig = defineProject(...); export default config)
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Tests are executed via root vitest.config.ts and should not rely on per-package test scripts
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-18T07:56:17.417Z
Learning: Applies to **/test/**/*.test.ts : Place test suites following Vitest discovery: **/test/**/*.test.ts
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to packages/**/test/**/*.test.ts : Use import { describe, it } from 'vitest' in tests
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/!(cookies)/**/test/**/*.test.ts,plugins/**/test/**/*.test.ts} : Vitest test files must follow the naming pattern test/**/*.test.ts
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**/test/**,plugins/**/test/**} : Use Node.js assert for assertions in Vitest tests
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/{core,plugin,standalone}/*/package.json : Use workspace:* for internal monorepo dependencies and catalog: for external dependencies
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/plugin/*/{test,tests}/**/*.ts : Add Vitest tests for plugins using eggjs/mock; tests will be discovered by the root vitest config

Applied to files:

  • tools/create-egg/test/cli.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/cookies/test/**/*.test.ts,tools/egg-bin/test/**/*.test.ts} : Mocha test suites (cookies, egg-bin) must use test/**/*.test.ts

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/**/src/**/*.{ts,tsx,js,mjs} : Do not use CommonJS APIs (require, module.exports); author code as ESM

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Run build, test, and versioning commands from the monorepo root (Egg.js repo), not from tegg/

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/**/src/**/*.{ts,tsx} : Use .js extensions in ESM import specifiers in TypeScript source

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/core/*/package.json : Core packages should include scripts: typecheck, clean, build (tsc --noEmit, rimraf, build pipeline)

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Tests are executed via root vitest.config.ts and should not rely on per-package test scripts

Applied to files:

  • tools/create-egg/test/cli.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**,plugins/**,tools/!(egg-bin)/**}/**/*.ts : Add explicit type annotations for class properties when needed (no inferred exported property types)

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-18T07:56:17.417Z
Learning: Applies to **/test/**/*.test.ts : Mirror the repository test pattern when adding new suites

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/core/*/tsconfig.json : Core packages must include tsconfig.json extending eggjs/tsconfig

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to packages/**/test/**/*.test.ts : Use Node.js built-in assert module for test assertions

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-18T07:56:17.417Z
Learning: For features affecting HTTP or process orchestration, add regression tests that exercise both the CommonJS and TypeScript example apps

Applied to files:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to plugins/*/package.json : Plugins must include scripts: build (tsdown && rimraf dist *.tsbuildinfo && tsc -p tsconfig.build.json), typecheck (tsc --noEmit), lint (oxlint --type-aware), test (vitest run), prepublishOnly (pnpm run build)

Applied to files:

  • tools/create-egg/test/cli.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/!(cookies)/**/test/**/*.test.ts,plugins/**/test/**/*.test.ts} : Vitest test files must follow the naming pattern test/**/*.test.ts

Applied to files:

  • tools/create-egg/test/cli.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**/package.json,plugins/**/package.json,tools/**/package.json} : Use catalog: versions for external dependencies defined in pnpm-workspace.yaml

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to pnpm-workspace.yaml : Define dependency versions via the catalog section in pnpm-workspace.yaml and reference them with "catalog:"

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Use pnpm workspaces with catalog: for shared externals and workspace:* for internal deps; centralize versions in root pnpm-workspace.yaml; set catalogMode: prefer in root .npmrc

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-23T17:37:37.567Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-23T17:37:37.567Z
Learning: Applies to tegg/{core,plugin,standalone}/*/package.json : Use workspace:* for internal monorepo dependencies and catalog: for external dependencies

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**/vitest.config.ts,plugins/**/vitest.config.ts} : Packages using Vitest must include a vitest.config.ts and import test functions from vitest

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to packages/**/test/**/*.test.ts : Name test files as test/**/*.test.ts and run them with Vitest

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-18T07:56:17.417Z
Learning: Use pnpm with Node.js ≥ 20.19.0; keep local tool versions aligned with the repository packageManager

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**/package.json,plugins/**/package.json,tools/**/package.json} : Use workspace:* for internal dependencies between monorepo packages

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-18T07:56:17.417Z
Learning: Run pnpm run test locally before submitting changes

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/**/test/**,plugins/**/test/**} : Use Node.js assert for assertions in Vitest tests

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to packages/**/test/**/*.test.ts : Use import { describe, it } from 'vitest' in tests

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {packages/!(cookies)/**/vitest.config.ts,plugins/**/vitest.config.ts} : Vitest config must export a typed config (e.g., const config: UserWorkspaceConfig = defineProject(...); export default config)

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T11:59:58.226Z
Learning: Applies to {package.json,packages/**/package.json,plugins/**/package.json,tools/**/package.json} : All packages must require Node.js >= 22.18.0 (set engines.node to ">=22.18.0")

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Require Node.js version >= 20.19.0 for all development and CI environments

Applied to files:

  • pnpm-workspace.yaml
🧬 Code graph analysis (1)
tools/create-egg/test/cli.test.ts (1)
packages/supertest/src/test.ts (1)
  • expect (77-132)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: Test (windows-latest, 22, 1/5)
  • GitHub Check: Test (windows-latest, 24, 2/5)
  • GitHub Check: Test (macos-latest, 22, 5/5)
  • GitHub Check: Test (windows-latest, 24, 1/5)
  • GitHub Check: Test (ubuntu-latest, 24, 3/5)
  • GitHub Check: Test (macos-latest, 24, 3/5)
  • GitHub Check: Test (ubuntu-latest, 24, 2/5)
  • GitHub Check: Test bin (windows-latest, 22, 1/3)
  • GitHub Check: Test bin (windows-latest, 22, 0/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 1/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 2/3)
  • GitHub Check: Test bin (windows-latest, 22, 2/3)
  • GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: typecheck
  • GitHub Check: Cloudflare Pages: egg-v3
🔇 Additional comments (2)
pnpm-workspace.yaml (2)

66-67: Vitest 4.0.14 versions confirmed and verified safe.

All three Vitest packages (vitest, @vitest/coverage-v8, @vitest/ui) at version 4.0.14 exist in NPM registry and represent the latest release. Version 4.0.14 is unaffected by CVE-2025-24964 (CSWSH vulnerability in Vitest API WebSocket), which only impacts versions ≤3.0.4 and earlier. The caret range (^4.0.14) allows for automatic patch updates while maintaining stability.


173-173: Review oxfmt version 0.15.0 for breaking changes and compatibility.

The version 0.15.0 exists and is stable on npm, but the update from 0.13.0 introduces breaking changes that require verification:

  • Default lineWidth changed from 80 to 100
  • Default sort-imports order changed to "natural" (using the natord crate)
  • AST addition: TSGlobalDeclaration (affects tools consuming oxfmt/oxc AST types)

Verify that these formatter behavior changes are compatible with the project's code style expectations and that any downstream tooling handles the AST change.

@fengmk2 fengmk2 merged commit 376725d into next Nov 27, 2025
49 of 51 checks passed
@fengmk2 fengmk2 deleted the use-vitest-fsModuleCache branch November 27, 2025 14:37
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