Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 22, 2025

Summary by CodeRabbit

  • Chores

    • Updated @types/node, lint-staged, and oxfmt versions.
    • Migrated code formatting configuration to Prettier-compatible schema.
  • Tests

    • Improved test reliability by skipping known flaky tests on Windows and macOS platforms.
    • Added timeout configurations to test environment.
  • Style

    • Applied comprehensive code formatting improvements across the codebase for consistency.
  • CI/CD

    • Enhanced build process to properly fail on formatting check violations.

@fengmk2 fengmk2 requested a review from Copilot October 22, 2025 11:33
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 updates the oxfmt formatter from version 0.5.0 to 0.8.0 and applies the new formatting rules across the codebase, primarily reformatting multi-line object literals and function parameters for improved readability.

Key Changes:

  • Updated oxfmt from 0.5.0 to 0.8.0 with corresponding configuration schema changes
  • Updated related dependencies (@types/node, lint-staged)
  • Applied automatic formatting changes throughout the codebase (multi-line object literals, function parameters, type definitions)
  • Modified CI workflow to enforce format checking
  • Added flaky test skips for Windows platform

Reviewed Changes

Copilot reviewed 76 out of 77 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updated oxfmt to 0.8.0, @types/node to 24.9.1, lint-staged to 16.2.5, and added oxfmt to minimumReleaseAgeExclude
.oxfmtrc.json Migrated configuration from old oxfmt 0.5 format to new 0.8 schema with simplified property names
package.json Added "fmt" script for running oxfmt
.github/workflows/ci.yml Removed the fallback error suppression for format check, making it a required passing step
plugins/view/vitest.config.ts Added timeout configurations for flaky Windows tests
plugins/view/test/view.test.ts Added Windows platform skip for flaky tests
packages/cluster/test/master/after-start.test.ts Added Windows platform skip and reorganized afterEach placement
plugins/logrotator/test/logrotator.test.ts Extended platform skip from Windows-only to Windows and macOS
plugins/schedule/test/customTypeWithoutStart.test.ts Added Windows platform skip for flaky tests
packages/core/src/utils/index.ts Reformatted ternary operator formatting
tegg/core/dal-runtime/src/BaseSqlMap.ts Reformatted multi-line string template to single line
All other files Applied automatic oxfmt 0.8 formatting for multi-line objects, function parameters, and type definitions
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

188 files out of 295 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR upgrades oxfmt from 0.5.0 to 0.8.0 and migrates the formatting configuration to a Prettier-compatible schema. It applies the new formatter across the codebase, reformatting object literals, type annotations, and function parameters. The CI workflow now fails hard on formatting mismatches instead of silently continuing. Timeouts and Windows platform skips are added to select tests.

Changes

Cohort / File(s) Summary
Formatter Configuration & Workflow
.oxfmtrc.json, .github/workflows/ci.yml, package.json, pnpm-workspace.yaml
Migrates formatting config from legacy schema to Prettier-compatible format with $schema reference and renamed keys (e.g., tabWidth, printWidth, singleQuote). Adds fmt npm script. Removes fmtcheck fallback in CI, causing hard failure on formatting mismatch. Bumps oxfmt to ^0.8.0 and adds @oxfmt/* and oxfmt to minimumReleaseAgeExclude.
Cluster Package Formatting
packages/cluster/src/*.ts, packages/cluster/test/fixtures/apps/messenger/*.js, packages/cluster/test/master/after-start.test.ts
Reformats object literals and constructor parameters to multi-line style. Moves afterEach(mm.restore) inside describe block and adds Windows skip condition with comment on flakiness.
Cookies & Core Packages
packages/cookies/src/cookies.ts, packages/cookies/test/cookies.test.ts, packages/core/src/utils/index.ts, packages/errors/src/base.ts
Reformats object literals and type annotations across multiple lines. Reflows generic method signature in BaseError.from for improved readability.
Router Package
packages/router/src/EggRouter.ts, packages/router/src/Router.ts, packages/router/src/types.ts, packages/router/test/Router.test.ts
Reformats register call options and type alias definitions to multi-line blocks. Converts router.url() calls from positional to named object parameters.
Plugin Formatting — Security, Multipart, View, Schedule
plugins/security/src/config/config.default.ts, plugins/security/src/lib/extend/safe_curl.ts, plugins/multipart/src/app/extend/context.ts, plugins/multipart/test/*.test.ts, plugins/view-nunjucks/test/fixtures/*.js, plugins/schedule/src/lib/load_schedule.ts, plugins/schedule/test/*.test.ts
Reformats object literals, type annotations, and destructuring parameters across multiple lines. Adds Windows skip conditions to select schedule tests with flakiness comments.
Plugin Formatting — Other
plugins/jsonp/test/fixtures/jsonp-test/app/router.js, plugins/logrotator/test/*.test.ts, plugins/mock/src/lib/app.ts, plugins/onerror/src/lib/error_view.ts, plugins/onerror/test/onerror.test.ts, plugins/view/test/view.test.ts, plugins/view/vitest.config.ts
Reformats objects and type annotations to multi-line. Expands logrotator test skip to include macOS (darwin). Adds hookTimeout and testTimeout (20000ms) to vitest config. Wraps view test suite in Windows skip.
Tegg Core & Plugin Formatting
tegg/core/*/src/*.ts, tegg/core/*/test/*.ts, tegg/plugin/*/**.ts
Reformats constructor parameters, decorators, and type annotations across multiple lines. Adjusts SQL generation formatting in BaseSqlMap.ts. Reflows overload signatures and error handling in multiple files.
Tools & Scripts Formatting
tools/create-egg/test/cli.test.ts, tools/scripts/test/*.test.ts, tools/scripts/test/utils.ts
Reformats object literals in function calls (coffee.fork, fs.rm, execaCommandSync) and exported type definitions to multi-line blocks with trailing commas.
Documentation & Config
site/.vitepress/config.mts
Reformats navigation item object literals in contributing section to multi-line style.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

The diff is predominantly homogeneous formatting changes (object literals, type annotations, parameter lists moved to multi-line style with trailing commas) applied consistently across 60+ files. Despite the high file count, the repetitive nature of these changes requires straightforward verification. A few behavioral modifications (Windows/macOS test skips, timeout configuration, CI workflow failure behavior) are minor and localized, adding minimal review complexity.

Possibly related PRs

Poem

🐰 Formatting hops and bounds so neat,
Oxfmt makes the code complete,
Multi-line objects, trailing commas true,
Prettier-esque, the schema's new,
Windows tests skip, timeouts grow,
CI now fails—no more soft glow!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "deps: use oxfmt 0.8" directly and accurately describes the primary objective of this changeset. The raw summary confirms that the main change is upgrading oxfmt from ^0.5.0 to ^0.8.0 in pnpm-workspace.yaml, along with configuration updates in .oxfmtrc.json and workflow changes in .github/workflows/ci.yml to support the new formatter version. The extensive formatting changes across the codebase are consequences of running the upgraded formatter, not the primary focus. The title is concise, uses conventional commit format, and clearly communicates the key change a developer would encounter.

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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 22, 2025

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: d954486
Status: ✅  Deploy successful!
Preview URL: https://99095ae9.egg-cci.pages.dev
Branch Preview URL: https://use-oxfmt-0-8-v2.egg-cci.pages.dev

View logs

@gemini-code-assist
Copy link

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 a major update to the project's code formatter, oxfmt, bringing it to version 0.8.0. This upgrade necessitated a complete overhaul of the formatting configuration and a subsequent reformatting of a large portion of the codebase to adhere to the new style guidelines. Beyond formatting, the PR also includes routine dependency updates and enhancements to test stability by addressing platform-specific flakiness and adjusting test timeouts.

Highlights

  • Dependency Upgrade: The oxfmt dependency has been upgraded to version 0.8.0, leading to significant changes in code formatting rules and the .oxfmtrc.json configuration.
  • Code Formatting: The codebase has undergone extensive reformatting to align with the new oxfmt rules, primarily affecting line breaks and indentation within object literals, function arguments, and type definitions across numerous files.
  • Build and Test Configuration Updates: The package.json now includes a dedicated fmt script for oxfmt, and fmtcheck has been updated. Additionally, pnpm-lock.yaml reflects updates for several other dependencies, including @types/node, lint-staged, @types/chai, listr2, rolldown-vite, rolldown, and undici-types.
  • Test Stability Improvements: Several test files have been updated with describe.skipIf conditions to skip flaky tests on Windows and macOS, and Vitest configuration now includes increased hookTimeout and testTimeout values to prevent premature test failures.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 22, 2025

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: d954486
Status: ✅  Deploy successful!
Preview URL: https://9f6a52f9.egg-v3.pages.dev
Branch Preview URL: https://use-oxfmt-0-8-v2.egg-v3.pages.dev

View logs

Copy link

@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 updates the project's dependencies to use oxfmt version 0.8 and includes formatting changes across multiple files to align with the new version's standards. The changes primarily involve adjusting whitespace and line breaks for improved readability. The review focuses on identifying potential issues related to code correctness and maintainability.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 69.64286% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.51%. Comparing base (fc374c3) to head (d954486).
⚠️ Report is 1 commits behind head on next.

Files with missing lines Patch % Lines
...ackages/cluster/src/utils/mode/impl/process/app.ts 0.00% 4 Missing ⚠️
...luster/src/utils/mode/impl/worker_threads/agent.ts 0.00% 4 Missing ⚠️
.../cluster/src/utils/mode/impl/worker_threads/app.ts 0.00% 2 Missing ⚠️
packages/cluster/src/utils/terminate.ts 0.00% 2 Missing ⚠️
packages/egg/src/lib/application.ts 50.00% 2 Missing ⚠️
packages/cluster/src/master.ts 83.33% 1 Missing ⚠️
...kages/cluster/src/utils/mode/impl/process/agent.ts 0.00% 1 Missing ⚠️
packages/egg/src/lib/core/messenger/ipc.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             next    #5633   +/-   ##
=======================================
  Coverage   87.51%   87.51%           
=======================================
  Files         565      565           
  Lines       11005    11007    +2     
  Branches     1242     1243    +1     
=======================================
+ Hits         9631     9633    +2     
  Misses       1292     1292           
  Partials       82       82           

☔ 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

@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: 0

🧹 Nitpick comments (2)
plugins/logrotator/test/rotate_by_day.test.ts (1)

1-160: Consider migrating assertions from vitest expect() to Node.js assert.

Per coding guidelines, test files matching plugins/**/test/** should use Node.js assert for assertions in Vitest tests. This file uses vitest's expect() throughout (lines 33, 37, 47, 56–60, 67, 76, 92, 99, 116–120, 132–136, 143, 150). While this formatting PR correctly applies oxfmt 0.8 formatting, consider raising a follow-up issue to standardize test assertions across the logrotator plugin to align with the coding guidelines.

This can be addressed in a follow-up PR focused on test framework standardization rather than formatting. Would you like me to help identify all test files in the repository that need similar updates?

plugins/multipart/test/ts.test.ts (1)

55-59: Consider using Node.js assert in plugin tests (guideline).

Replace Vitest expect here with assert.deepStrictEqual for consistency. Non-blocking.
Apply this diff to this block:

-    expect(data.body).toEqual({
-      foo: 'bar',
-      luckyscript: 'egg',
-      work: 'with Node.js',
-    });
+    assert.deepStrictEqual(data.body, {
+      foo: 'bar',
+      luckyscript: 'egg',
+      work: 'with Node.js',
+    });

And add the import at the top of the file:

+import assert from 'node:assert';

As per coding guidelines.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc374c3 and 6f01fef.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (76)
  • .github/workflows/ci.yml (1 hunks)
  • .oxfmtrc.json (1 hunks)
  • package.json (1 hunks)
  • packages/cluster/src/agent_worker.ts (1 hunks)
  • packages/cluster/src/master.ts (2 hunks)
  • packages/cluster/src/utils/mode/base/agent.ts (1 hunks)
  • packages/cluster/src/utils/mode/base/app.ts (1 hunks)
  • packages/cluster/src/utils/mode/impl/worker_threads/agent.ts (1 hunks)
  • packages/cluster/test/fixtures/apps/messenger/agent.js (1 hunks)
  • packages/cluster/test/fixtures/apps/messenger/app.js (1 hunks)
  • packages/cluster/test/master/after-start.test.ts (2 hunks)
  • packages/cookies/src/cookies.ts (1 hunks)
  • packages/cookies/test/cookies.test.ts (5 hunks)
  • packages/core/src/utils/index.ts (1 hunks)
  • packages/errors/src/base.ts (1 hunks)
  • packages/path-matching/test/index.test.ts (1 hunks)
  • packages/router/src/EggRouter.ts (1 hunks)
  • packages/router/src/Router.ts (1 hunks)
  • packages/router/src/types.ts (1 hunks)
  • packages/router/test/Router.test.ts (4 hunks)
  • plugins/jsonp/test/fixtures/jsonp-test/app/router.js (1 hunks)
  • plugins/logrotator/test/logrotator.test.ts (1 hunks)
  • plugins/logrotator/test/rotate_by_day.test.ts (1 hunks)
  • plugins/mock/src/lib/app.ts (1 hunks)
  • plugins/multipart/src/app/extend/context.ts (1 hunks)
  • plugins/multipart/test/enable-pathToRegexpModule.test.ts (2 hunks)
  • plugins/multipart/test/file-mode.test.ts (1 hunks)
  • plugins/multipart/test/stream-mode-with-filematch-glob.test.ts (2 hunks)
  • plugins/multipart/test/stream-mode-with-filematch.test.ts (2 hunks)
  • plugins/multipart/test/ts.test.ts (1 hunks)
  • plugins/onerror/src/lib/error_view.ts (1 hunks)
  • plugins/onerror/test/onerror.test.ts (1 hunks)
  • plugins/schedule/src/lib/load_schedule.ts (1 hunks)
  • plugins/schedule/test/customTypeWithoutStart.test.ts (1 hunks)
  • plugins/schedule/test/detect-error.test.ts (1 hunks)
  • plugins/schedule/test/executeError-task-generator.test.ts (1 hunks)
  • plugins/schedule/test/immediate.test.ts (1 hunks)
  • plugins/schedule/test/subscription.test.ts (2 hunks)
  • plugins/security/src/config/config.default.ts (1 hunks)
  • plugins/security/src/lib/extend/safe_curl.ts (1 hunks)
  • plugins/security/test/fixtures/apps/helper-app/app/router.js (1 hunks)
  • plugins/security/test/ssrf.test.ts (2 hunks)
  • plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/controller/home.ts (1 hunks)
  • plugins/view-nunjucks/test/fixtures/example/app/router.js (1 hunks)
  • plugins/view-nunjucks/test/fixtures/view-helper/app/router.js (1 hunks)
  • plugins/view-nunjucks/test/view/cache.test.ts (2 hunks)
  • plugins/view-nunjucks/test/view/security.test.ts (4 hunks)
  • plugins/view/test/view.test.ts (1 hunks)
  • plugins/view/vitest.config.ts (1 hunks)
  • pnpm-workspace.yaml (4 hunks)
  • site/.vitepress/config.mts (2 hunks)
  • tegg/core/common-util/src/ModuleConfig.ts (1 hunks)
  • tegg/core/common-util/test/ModuleConfig.test.ts (4 hunks)
  • tegg/core/core-decorator/test/decorators.test.ts (3 hunks)
  • tegg/core/core-decorator/test/fixtures/decators/ConstructorObject.ts (1 hunks)
  • tegg/core/dal-runtime/src/BaseSqlMap.ts (1 hunks)
  • tegg/core/eventbus-decorator/src/EventBus.ts (1 hunks)
  • tegg/core/loader/src/LoaderUtil.ts (1 hunks)
  • tegg/core/metadata/test/LoadUnit.test.ts (3 hunks)
  • tegg/core/orm-decorator/src/builder/IndexMetaBuilder.ts (1 hunks)
  • tegg/core/runtime/test/fixtures/modules/inject-constructor-context-to-singleton/object.ts (2 hunks)
  • tegg/core/test-util/src/TestLoader.ts (1 hunks)
  • tegg/core/types/src/dynamic-inject.ts (1 hunks)
  • tegg/plugin/controller/src/lib/impl/http/HTTPMethodRegister.ts (1 hunks)
  • tegg/plugin/dal/src/lib/DataSource.ts (1 hunks)
  • tegg/plugin/tegg/test/EggCompatible.test.ts (1 hunks)
  • tegg/plugin/tegg/test/ModuleConfig.test.ts (1 hunks)
  • tegg/standalone/standalone/test/index.test.ts (1 hunks)
  • tools/create-egg/test/cli.test.ts (2 hunks)
  • tools/scripts/test/start-without-demon-1.test.ts (1 hunks)
  • tools/scripts/test/start-without-demon-2.test.ts (1 hunks)
  • tools/scripts/test/start-without-demon-4.test.ts (2 hunks)
  • tools/scripts/test/start.test.ts (2 hunks)
  • tools/scripts/test/stop.test.ts (2 hunks)
  • tools/scripts/test/ts.test.ts (4 hunks)
  • tools/scripts/test/utils.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (17)
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.ts: Prefer TypeScript and ESM: write sources and exports in .ts (ESM-first) rather than CommonJS
Use two-space indentation, trailing commas, and semicolons (Prettier/oxlint defaults)
Name files in lowercase with hyphens (e.g., loader-context.ts)
Name classes in PascalCase
Name functions and variables in camelCase
Re-export types thoughtfully to keep the public API stable

Files:

  • tools/create-egg/test/cli.test.ts
  • plugins/multipart/test/stream-mode-with-filematch-glob.test.ts
  • packages/cookies/test/cookies.test.ts
  • tegg/standalone/standalone/test/index.test.ts
  • plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/controller/home.ts
  • tools/scripts/test/stop.test.ts
  • plugins/onerror/src/lib/error_view.ts
  • plugins/view/vitest.config.ts
  • tools/scripts/test/ts.test.ts
  • plugins/onerror/test/onerror.test.ts
  • tegg/core/test-util/src/TestLoader.ts
  • plugins/logrotator/test/rotate_by_day.test.ts
  • packages/core/src/utils/index.ts
  • plugins/multipart/test/enable-pathToRegexpModule.test.ts
  • tegg/core/loader/src/LoaderUtil.ts
  • packages/cluster/src/agent_worker.ts
  • tools/scripts/test/start-without-demon-1.test.ts
  • packages/cookies/src/cookies.ts
  • plugins/multipart/src/app/extend/context.ts
  • plugins/view/test/view.test.ts
  • tools/scripts/test/start.test.ts
  • plugins/mock/src/lib/app.ts
  • packages/router/test/Router.test.ts
  • tegg/plugin/dal/src/lib/DataSource.ts
  • packages/path-matching/test/index.test.ts
  • packages/cluster/src/utils/mode/base/app.ts
  • tegg/core/core-decorator/test/decorators.test.ts
  • plugins/multipart/test/ts.test.ts
  • plugins/view-nunjucks/test/view/security.test.ts
  • tegg/core/eventbus-decorator/src/EventBus.ts
  • plugins/multipart/test/stream-mode-with-filematch.test.ts
  • packages/router/src/types.ts
  • packages/cluster/test/master/after-start.test.ts
  • tools/scripts/test/start-without-demon-2.test.ts
  • tools/scripts/test/utils.ts
  • plugins/view-nunjucks/test/view/cache.test.ts
  • plugins/schedule/test/immediate.test.ts
  • tegg/core/orm-decorator/src/builder/IndexMetaBuilder.ts
  • tegg/core/runtime/test/fixtures/modules/inject-constructor-context-to-singleton/object.ts
  • tegg/core/common-util/test/ModuleConfig.test.ts
  • plugins/schedule/test/subscription.test.ts
  • plugins/security/test/ssrf.test.ts
  • tools/scripts/test/start-without-demon-4.test.ts
  • tegg/core/metadata/test/LoadUnit.test.ts
  • plugins/schedule/src/lib/load_schedule.ts
  • packages/router/src/Router.ts
  • plugins/logrotator/test/logrotator.test.ts
  • tegg/core/common-util/src/ModuleConfig.ts
  • tegg/plugin/controller/src/lib/impl/http/HTTPMethodRegister.ts
  • tegg/core/core-decorator/test/fixtures/decators/ConstructorObject.ts
  • packages/router/src/EggRouter.ts
  • tegg/core/dal-runtime/src/BaseSqlMap.ts
  • packages/cluster/src/utils/mode/impl/worker_threads/agent.ts
  • plugins/multipart/test/file-mode.test.ts
  • plugins/schedule/test/detect-error.test.ts
  • plugins/schedule/test/customTypeWithoutStart.test.ts
  • tegg/core/types/src/dynamic-inject.ts
  • tegg/plugin/tegg/test/EggCompatible.test.ts
  • packages/errors/src/base.ts
  • packages/cluster/src/master.ts
  • plugins/security/src/config/config.default.ts
  • plugins/schedule/test/executeError-task-generator.test.ts
  • tegg/plugin/tegg/test/ModuleConfig.test.ts
  • packages/cluster/src/utils/mode/base/agent.ts
  • plugins/security/src/lib/extend/safe_curl.ts
**/test/**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/test/**/*.test.ts: Place test suites following Vitest discovery: /test//*.test.ts
Mirror the repository test pattern when adding new suites

Files:

  • tools/create-egg/test/cli.test.ts
  • plugins/multipart/test/stream-mode-with-filematch-glob.test.ts
  • packages/cookies/test/cookies.test.ts
  • tegg/standalone/standalone/test/index.test.ts
  • tools/scripts/test/stop.test.ts
  • tools/scripts/test/ts.test.ts
  • plugins/onerror/test/onerror.test.ts
  • plugins/logrotator/test/rotate_by_day.test.ts
  • plugins/multipart/test/enable-pathToRegexpModule.test.ts
  • tools/scripts/test/start-without-demon-1.test.ts
  • plugins/view/test/view.test.ts
  • tools/scripts/test/start.test.ts
  • packages/router/test/Router.test.ts
  • packages/path-matching/test/index.test.ts
  • tegg/core/core-decorator/test/decorators.test.ts
  • plugins/multipart/test/ts.test.ts
  • plugins/view-nunjucks/test/view/security.test.ts
  • plugins/multipart/test/stream-mode-with-filematch.test.ts
  • packages/cluster/test/master/after-start.test.ts
  • tools/scripts/test/start-without-demon-2.test.ts
  • plugins/view-nunjucks/test/view/cache.test.ts
  • plugins/schedule/test/immediate.test.ts
  • tegg/core/common-util/test/ModuleConfig.test.ts
  • plugins/schedule/test/subscription.test.ts
  • plugins/security/test/ssrf.test.ts
  • tools/scripts/test/start-without-demon-4.test.ts
  • tegg/core/metadata/test/LoadUnit.test.ts
  • plugins/logrotator/test/logrotator.test.ts
  • plugins/multipart/test/file-mode.test.ts
  • plugins/schedule/test/detect-error.test.ts
  • plugins/schedule/test/customTypeWithoutStart.test.ts
  • tegg/plugin/tegg/test/EggCompatible.test.ts
  • plugins/schedule/test/executeError-task-generator.test.ts
  • tegg/plugin/tegg/test/ModuleConfig.test.ts
{packages/**,plugins/**,tools/!(egg-bin)/**}/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

{packages/**,plugins/**,tools/!(egg-bin)/**}/**/*.ts: For isolatedDeclarations support, all exported functions/methods/getters must have explicit return type annotations
Avoid computed property names with symbols in class declarations (no get SYM)
Add explicit type annotations for class properties when needed (no inferred exported property types)
Exported symbols must use unique symbol type (e.g., export const X: unique symbol = Symbol('x'))

Files:

  • tools/create-egg/test/cli.test.ts
  • plugins/multipart/test/stream-mode-with-filematch-glob.test.ts
  • packages/cookies/test/cookies.test.ts
  • plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/controller/home.ts
  • tools/scripts/test/stop.test.ts
  • plugins/onerror/src/lib/error_view.ts
  • plugins/view/vitest.config.ts
  • tools/scripts/test/ts.test.ts
  • plugins/onerror/test/onerror.test.ts
  • plugins/logrotator/test/rotate_by_day.test.ts
  • packages/core/src/utils/index.ts
  • plugins/multipart/test/enable-pathToRegexpModule.test.ts
  • packages/cluster/src/agent_worker.ts
  • tools/scripts/test/start-without-demon-1.test.ts
  • packages/cookies/src/cookies.ts
  • plugins/multipart/src/app/extend/context.ts
  • plugins/view/test/view.test.ts
  • tools/scripts/test/start.test.ts
  • plugins/mock/src/lib/app.ts
  • packages/router/test/Router.test.ts
  • packages/path-matching/test/index.test.ts
  • packages/cluster/src/utils/mode/base/app.ts
  • plugins/multipart/test/ts.test.ts
  • plugins/view-nunjucks/test/view/security.test.ts
  • plugins/multipart/test/stream-mode-with-filematch.test.ts
  • packages/router/src/types.ts
  • packages/cluster/test/master/after-start.test.ts
  • tools/scripts/test/start-without-demon-2.test.ts
  • tools/scripts/test/utils.ts
  • plugins/view-nunjucks/test/view/cache.test.ts
  • plugins/schedule/test/immediate.test.ts
  • plugins/schedule/test/subscription.test.ts
  • plugins/security/test/ssrf.test.ts
  • tools/scripts/test/start-without-demon-4.test.ts
  • plugins/schedule/src/lib/load_schedule.ts
  • packages/router/src/Router.ts
  • plugins/logrotator/test/logrotator.test.ts
  • packages/router/src/EggRouter.ts
  • packages/cluster/src/utils/mode/impl/worker_threads/agent.ts
  • plugins/multipart/test/file-mode.test.ts
  • plugins/schedule/test/detect-error.test.ts
  • plugins/schedule/test/customTypeWithoutStart.test.ts
  • packages/errors/src/base.ts
  • packages/cluster/src/master.ts
  • plugins/security/src/config/config.default.ts
  • plugins/schedule/test/executeError-task-generator.test.ts
  • packages/cluster/src/utils/mode/base/agent.ts
  • plugins/security/src/lib/extend/safe_curl.ts
{packages/!(cookies)/**/test/**/*.test.ts,plugins/**/test/**/*.test.ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Vitest test files must follow the naming pattern test/**/*.test.ts

Files:

  • plugins/multipart/test/stream-mode-with-filematch-glob.test.ts
  • plugins/onerror/test/onerror.test.ts
  • plugins/logrotator/test/rotate_by_day.test.ts
  • plugins/multipart/test/enable-pathToRegexpModule.test.ts
  • plugins/view/test/view.test.ts
  • packages/router/test/Router.test.ts
  • packages/path-matching/test/index.test.ts
  • plugins/multipart/test/ts.test.ts
  • plugins/view-nunjucks/test/view/security.test.ts
  • plugins/multipart/test/stream-mode-with-filematch.test.ts
  • packages/cluster/test/master/after-start.test.ts
  • plugins/view-nunjucks/test/view/cache.test.ts
  • plugins/schedule/test/immediate.test.ts
  • plugins/schedule/test/subscription.test.ts
  • plugins/security/test/ssrf.test.ts
  • plugins/logrotator/test/logrotator.test.ts
  • plugins/multipart/test/file-mode.test.ts
  • plugins/schedule/test/detect-error.test.ts
  • plugins/schedule/test/customTypeWithoutStart.test.ts
  • plugins/schedule/test/executeError-task-generator.test.ts
{packages/**/test/**,plugins/**/test/**}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Node.js assert for assertions in Vitest tests

Files:

  • plugins/multipart/test/stream-mode-with-filematch-glob.test.ts
  • packages/cookies/test/cookies.test.ts
  • plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/controller/home.ts
  • plugins/onerror/test/onerror.test.ts
  • plugins/logrotator/test/rotate_by_day.test.ts
  • plugins/jsonp/test/fixtures/jsonp-test/app/router.js
  • plugins/multipart/test/enable-pathToRegexpModule.test.ts
  • plugins/view/test/view.test.ts
  • packages/router/test/Router.test.ts
  • packages/path-matching/test/index.test.ts
  • plugins/multipart/test/ts.test.ts
  • plugins/view-nunjucks/test/view/security.test.ts
  • plugins/view-nunjucks/test/fixtures/view-helper/app/router.js
  • plugins/multipart/test/stream-mode-with-filematch.test.ts
  • packages/cluster/test/master/after-start.test.ts
  • plugins/view-nunjucks/test/view/cache.test.ts
  • plugins/schedule/test/immediate.test.ts
  • plugins/schedule/test/subscription.test.ts
  • plugins/security/test/ssrf.test.ts
  • plugins/view-nunjucks/test/fixtures/example/app/router.js
  • packages/cluster/test/fixtures/apps/messenger/agent.js
  • plugins/logrotator/test/logrotator.test.ts
  • packages/cluster/test/fixtures/apps/messenger/app.js
  • plugins/multipart/test/file-mode.test.ts
  • plugins/schedule/test/detect-error.test.ts
  • plugins/schedule/test/customTypeWithoutStart.test.ts
  • plugins/schedule/test/executeError-task-generator.test.ts
  • plugins/security/test/fixtures/apps/helper-app/app/router.js
packages/**/test/**/*.test.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

packages/**/test/**/*.test.ts: Name test files as test/**/*.test.ts and run them with Vitest
Use import { describe, it } from 'vitest' in tests
Use Node.js built-in assert module for test assertions

Files:

  • packages/cookies/test/cookies.test.ts
  • packages/router/test/Router.test.ts
  • packages/path-matching/test/index.test.ts
  • packages/cluster/test/master/after-start.test.ts
{packages/cookies/test/**/*.test.ts,tools/egg-bin/test/**/*.test.ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Mocha test suites (cookies, egg-bin) must use test/**/*.test.ts

Files:

  • packages/cookies/test/cookies.test.ts
tegg/**/?(*.)@(test|spec).{ts,tsx,js,mjs}

📄 CodeRabbit inference engine (tegg/CLAUDE.md)

In tests, use BackgroundTaskHelper for async tasks instead of setTimeout/setImmediate

Files:

  • tegg/standalone/standalone/test/index.test.ts
  • tegg/core/core-decorator/test/decorators.test.ts
  • tegg/core/common-util/test/ModuleConfig.test.ts
  • tegg/core/metadata/test/LoadUnit.test.ts
  • tegg/plugin/tegg/test/EggCompatible.test.ts
  • tegg/plugin/tegg/test/ModuleConfig.test.ts
**/test/fixtures/**

📄 CodeRabbit inference engine (AGENTS.md)

Put reusable test data under test/fixtures/

Files:

  • plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/controller/home.ts
  • plugins/jsonp/test/fixtures/jsonp-test/app/router.js
  • plugins/view-nunjucks/test/fixtures/view-helper/app/router.js
  • tegg/core/runtime/test/fixtures/modules/inject-constructor-context-to-singleton/object.ts
  • plugins/view-nunjucks/test/fixtures/example/app/router.js
  • packages/cluster/test/fixtures/apps/messenger/agent.js
  • packages/cluster/test/fixtures/apps/messenger/app.js
  • tegg/core/core-decorator/test/fixtures/decators/ConstructorObject.ts
  • plugins/security/test/fixtures/apps/helper-app/app/router.js
{package.json,packages/**/package.json,plugins/**/package.json,tools/**/package.json}

📄 CodeRabbit inference engine (CLAUDE.md)

All packages must require Node.js >= 22.18.0 (set engines.node to ">=22.18.0")

Files:

  • package.json
{packages/!(cookies)/**/vitest.config.ts,plugins/**/vitest.config.ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Vitest config must export a typed config (e.g., const config: UserWorkspaceConfig = defineProject(...); export default config)

Files:

  • plugins/view/vitest.config.ts
{packages/**/vitest.config.ts,plugins/**/vitest.config.ts}

📄 CodeRabbit inference engine (CLAUDE.md)

Packages using Vitest must include a vitest.config.ts and import test functions from vitest

Files:

  • plugins/view/vitest.config.ts
tegg/**/src/**/*.{ts,tsx,js,mjs}

📄 CodeRabbit inference engine (tegg/CLAUDE.md)

Use ESM syntax only (import/export); do not use require/module.exports or CommonJS-only files

Files:

  • tegg/core/test-util/src/TestLoader.ts
  • tegg/core/loader/src/LoaderUtil.ts
  • tegg/plugin/dal/src/lib/DataSource.ts
  • tegg/core/eventbus-decorator/src/EventBus.ts
  • tegg/core/orm-decorator/src/builder/IndexMetaBuilder.ts
  • tegg/core/common-util/src/ModuleConfig.ts
  • tegg/plugin/controller/src/lib/impl/http/HTTPMethodRegister.ts
  • tegg/core/dal-runtime/src/BaseSqlMap.ts
  • tegg/core/types/src/dynamic-inject.ts
tegg/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (tegg/CLAUDE.md)

tegg/**/src/**/*.{ts,tsx}: Use .js extensions in TypeScript import specifiers to target ESM output
Do not inject ctx/app directly; inject specific services instead
SingletonProto must not inject ContextProto

Files:

  • tegg/core/test-util/src/TestLoader.ts
  • tegg/core/loader/src/LoaderUtil.ts
  • tegg/plugin/dal/src/lib/DataSource.ts
  • tegg/core/eventbus-decorator/src/EventBus.ts
  • tegg/core/orm-decorator/src/builder/IndexMetaBuilder.ts
  • tegg/core/common-util/src/ModuleConfig.ts
  • tegg/plugin/controller/src/lib/impl/http/HTTPMethodRegister.ts
  • tegg/core/dal-runtime/src/BaseSqlMap.ts
  • tegg/core/types/src/dynamic-inject.ts
packages/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use TypeScript for all source files in packages (no JavaScript source files)

Files:

  • packages/core/src/utils/index.ts
  • packages/cluster/src/agent_worker.ts
  • packages/cookies/src/cookies.ts
  • packages/cluster/src/utils/mode/base/app.ts
  • packages/router/src/types.ts
  • packages/router/src/Router.ts
  • packages/router/src/EggRouter.ts
  • packages/cluster/src/utils/mode/impl/worker_threads/agent.ts
  • packages/errors/src/base.ts
  • packages/cluster/src/master.ts
  • packages/cluster/src/utils/mode/base/agent.ts
pnpm-workspace.yaml

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Define dependency versions via the catalog section in pnpm-workspace.yaml and reference them with "catalog:"

Files:

  • pnpm-workspace.yaml
tegg/plugin/*/test?(s)/**/?(*.)@(test|spec).{ts,tsx}

📄 CodeRabbit inference engine (tegg/CLAUDE.md)

Plugin packages should add tests using Vitest and @eggjs/mock

Files:

  • tegg/plugin/tegg/test/EggCompatible.test.ts
  • tegg/plugin/tegg/test/ModuleConfig.test.ts
🧠 Learnings (13)
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
PR: eggjs/egg#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:

  • tools/create-egg/test/cli.test.ts
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
PR: eggjs/egg#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:

  • packages/cookies/test/cookies.test.ts
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
PR: eggjs/egg#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:

  • package.json
  • .github/workflows/ci.yml
📚 Learning: 2025-10-19T15:39:04.502Z
Learnt from: CR
PR: eggjs/egg#0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-19T15:39:04.502Z
Learning: Applies to tegg/core/*/package.json : Core packages must define standard scripts: "typecheck": "tsc --noEmit", "clean": "rimraf dist *.tsbuildinfo", "build": "tsdown && npm run clean && tsc -p tsconfig.build.json"

Applied to files:

  • package.json
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
PR: eggjs/egg#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} : Include script "lint:fix" that runs oxlint with --fix (e.g., "pnpm run lint -- --fix")

Applied to files:

  • package.json
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
PR: eggjs/egg#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:

  • plugins/view/vitest.config.ts
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
PR: eggjs/egg#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:

  • plugins/view/vitest.config.ts
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
PR: eggjs/egg#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/scripts/test/ts.test.ts
📚 Learning: 2025-09-18T07:56:17.417Z
Learnt from: CR
PR: eggjs/egg#0
File: AGENTS.md:0-0
Timestamp: 2025-09-18T07:56:17.417Z
Learning: Applies to **/*.ts : Use two-space indentation, trailing commas, and semicolons (Prettier/oxlint defaults)

Applied to files:

  • .oxfmtrc.json
📚 Learning: 2025-10-19T15:39:04.502Z
Learnt from: CR
PR: eggjs/egg#0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-10-19T15:39:04.502Z
Learning: Applies to tegg/**/src/**/*.{ts,tsx} : SingletonProto must not inject ContextProto

Applied to files:

  • tegg/core/runtime/test/fixtures/modules/inject-constructor-context-to-singleton/object.ts
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
PR: eggjs/egg#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:

  • tegg/core/common-util/test/ModuleConfig.test.ts
📚 Learning: 2025-10-18T11:59:58.226Z
Learnt from: CR
PR: eggjs/egg#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
PR: eggjs/egg#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
🧬 Code graph analysis (12)
tools/scripts/test/stop.test.ts (1)
tools/scripts/test/utils.ts (1)
  • Coffee (8-13)
plugins/logrotator/test/rotate_by_day.test.ts (1)
plugins/logrotator/test/utils.ts (1)
  • getFixtures (3-5)
tools/scripts/test/start-without-demon-1.test.ts (1)
tools/scripts/test/utils.ts (1)
  • Coffee (8-13)
packages/router/test/Router.test.ts (2)
packages/router/src/Router.ts (3)
  • url (495-505)
  • url (521-527)
  • Router (55-1180)
packages/router/src/Layer.ts (1)
  • url (165-215)
tegg/plugin/dal/src/lib/DataSource.ts (1)
packages/egg/src/index.ts (1)
  • ObjectInfo (101-101)
tegg/core/core-decorator/test/decorators.test.ts (1)
packages/egg/src/index.ts (1)
  • ObjectInitType (99-99)
tools/scripts/test/start-without-demon-2.test.ts (1)
tools/scripts/test/utils.ts (1)
  • Coffee (8-13)
plugins/view-nunjucks/test/view/cache.test.ts (1)
plugins/view-nunjucks/test/fixtures/example/app/router.js (1)
  • fs (3-3)
tegg/core/runtime/test/fixtures/modules/inject-constructor-context-to-singleton/object.ts (1)
packages/egg/src/index.ts (1)
  • Inject (105-105)
plugins/schedule/src/lib/load_schedule.ts (2)
plugins/schedule/src/config/config.default.ts (1)
  • EggScheduleConfig (6-18)
plugins/schedule/src/lib/types.ts (1)
  • EggScheduleTask (8-8)
tegg/core/common-util/src/ModuleConfig.ts (1)
packages/utils/src/import.ts (1)
  • importResolve (275-361)
plugins/security/src/lib/extend/safe_curl.ts (1)
plugins/security/src/config/config.default.ts (1)
  • SSRFCheckAddressFunction (50-50)
⏰ 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). (8)
  • GitHub Check: Test (macos-latest, 24, 5/5)
  • GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
  • GitHub Check: Test bin (windows-latest, 22, 0/3)
  • GitHub Check: Test bin (windows-latest, 22, 1/3)
  • GitHub Check: typecheck
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Cloudflare Pages: egg-v3
🔇 Additional comments (87)
site/.vitepress/config.mts (1)

147-150: Formatting changes align with oxfmt 0.8 upgrade.

The object literals for the Contributing navigation items (both English and Chinese) are now consistently formatted as multi-line structures per the new Prettier-compatible style. The data values remain unchanged, and the formatting is applied consistently across both locales.

Also applies to: 206-209

tegg/core/orm-decorator/src/builder/IndexMetaBuilder.ts (1)

33-35: Formatting update looks good.

The multi-line object literal formatting aligns with oxfmt 0.8 and Prettier defaults, including the proper trailing comma on line 34. The semantic logic of the function call remains unchanged.

plugins/jsonp/test/fixtures/jsonp-test/app/router.js (1)

10-12: Formatting change approved.

The multi-line reformatting of the whiteList object preserves the semantic content and aligns with the oxfmt 0.8 upgrade. The indentation is correct and consistent with the rest of the file.

plugins/security/test/fixtures/apps/helper-app/app/router.js (1)

3-3: Valid formatter improvement: simplified unnecessary escaping.

The new oxfmt formatter correctly simplified the string literal by removing the unnecessary escape sequence. The double quote doesn't require escaping inside a single-quoted string, and the semantic value remains identical. The test logic is unaffected.

tegg/plugin/controller/src/lib/impl/http/HTTPMethodRegister.ts (1)

73-75: Formatting change looks good.

The Array.from initialization has been reformatted to multiline style, which aligns with the oxfmt 0.8 upgrade. The logic, types, and runtime behavior remain unchanged and correct.

tegg/plugin/dal/src/lib/DataSource.ts (1)

65-66: LGTM: Formatting aligns with oxfmt 0.8.0 upgrade.

The decorator has been reformatted to its own line for improved readability. No functional changes.

tegg/core/eventbus-decorator/src/EventBus.ts (1)

44-47: LGTM! Formatter upgrade applied correctly.

The return type annotations have been reformatted to multi-line object shapes by oxfmt 0.8. The type contracts remain identical, and the formatting aligns with Prettier defaults as specified in the coding guidelines.

Also applies to: 53-56

plugins/security/test/ssrf.test.ts (2)

93-95: Formatting looks good.

The object literal is properly expanded to multi-line format with correct 2-space indentation and trailing comma.


133-135: Formatting looks good.

The object literal is properly expanded to multi-line format with correct 2-space indentation and trailing comma. The generic type annotation on the safeCurl call is preserved correctly.

plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/controller/home.ts (1)

15-21: LGTM! Formatting change aligns with oxfmt 0.8.0.

The multi-line formatting improves readability and is consistent with the PR objective to apply the new oxfmt formatter across the codebase.

plugins/logrotator/test/rotate_by_day.test.ts (1)

16-19: Formatting change aligns with oxfmt 0.8 defaults.

The multi-line object literal formatting with trailing commas follows the Prettier/oxfmt 0.8 conventions specified in the coding guidelines. The semantic behavior of fs.rmSync remains unchanged.

tegg/core/test-util/src/TestLoader.ts (1)

18-20: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The reformatting of the globby.sync call to a multi-line format with proper indentation and trailing comma is consistent with Prettier/oxlint defaults and the PR objectives.

tegg/core/loader/src/LoaderUtil.ts (1)

72-74: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The multi-line formatting of the Error options object follows the new formatter's style with proper two-space indentation and trailing comma. No functional change—the error message and cause remain identical.

plugins/view/vitest.config.ts (1)

6-7: Verify that the extended timeout values are necessary.

The timeout values are set to 20 seconds, which is 4× the default Vitest timeout. While the configuration is correct, ensure these generous timeouts are truly needed for the view plugin tests and aren't masking performance issues.

plugins/view-nunjucks/test/fixtures/view-helper/app/router.js (1)

13-15: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The renderString arguments have been reformatted to a multi-line object literal with trailing comma. No behavioral changes.

packages/cluster/src/agent_worker.ts (1)

43-45: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The ConsoleLogger initialization has been reformatted to a multi-line object literal with trailing comma. No behavioral changes.

package.json (1)

37-37: LGTM! Convenient addition for manual formatting.

The new fmt script provides a convenient way to run oxfmt formatting across the codebase, complementing the existing fmtcheck script.

tools/scripts/test/start.test.ts (1)

152-154: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The coffee.fork calls have been reformatted to use multi-line options objects with trailing commas. No behavioral changes.

Also applies to: 171-173

tools/scripts/test/utils.ts (1)

8-13: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The Coffee type alias has been reformatted to a multi-line format with trailing commas. No type or behavioral changes.

tools/scripts/test/start-without-demon-1.test.ts (1)

125-127: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The coffee.fork call has been reformatted to use a multi-line options object with trailing comma. No behavioral changes.

packages/cluster/src/utils/mode/impl/worker_threads/agent.ts (1)

51-53: LGTM! Formatting change aligns with oxfmt 0.8 upgrade.

The Worker constructor call has been reformatted to a multi-line format with trailing comma. No behavioral changes.

packages/cluster/src/master.ts (1)

68-70: LGTM! Formatting changes align with oxfmt 0.8 upgrade.

The ConsoleLogger initialization and terminalLink call have been reformatted to multi-line object literals with trailing commas. No behavioral changes.

Also applies to: 112-114

tools/scripts/test/ts.test.ts (1)

55-57: LGTM: Formatting changes align with oxfmt upgrade.

The object literals in request() calls have been consistently reformatted to multi-line style. No functional changes detected.

Also applies to: 72-74, 89-91, 123-125

packages/cluster/test/fixtures/apps/messenger/app.js (1)

29-32: LGTM: Consistent formatting change.

Object literal reformatted to multi-line style, consistent with the oxfmt upgrade. No functional changes.

.github/workflows/ci.yml (1)

52-52: LGTM: CI now enforces formatting checks.

Removing the || exit 0 fallback causes the job to fail when formatting issues are detected, aligning with the stricter formatting enforcement introduced by the oxfmt upgrade.

tools/scripts/test/start-without-demon-4.test.ts (1)

99-102: LGTM: Formatting changes align with oxfmt upgrade.

The object literals in fs.rm() calls have been reformatted to multi-line style. No functional changes detected.

Also applies to: 111-114

plugins/view/test/view.test.ts (1)

12-13: LGTM: Reasonable workaround for Windows flakiness.

The test suite is now conditionally skipped on Windows due to hook timeout issues. The TODO comment provides context for the skip.

plugins/logrotator/test/logrotator.test.ts (1)

12-13: LGTM: Extended platform skip for flakiness.

The skip condition now includes both Windows and macOS (darwin), addressing test flakiness on both platforms. The comment has been updated accordingly.

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

150-153: LGTM: Formatting changes align with oxfmt upgrade.

The object literals in execaCommandSync() calls have been reformatted to multi-line style. No functional changes detected.

Also applies to: 204-207

packages/cluster/src/utils/mode/base/app.ts (1)

96-108: LGTM: Formatting change aligns with oxfmt upgrade.

Constructor parameter destructuring has been reformatted to multi-line style. No functional or type signature changes.

packages/router/src/EggRouter.ts (1)

269-271: LGTM! Formatting improvement.

The options object is now formatted across multiple lines with a trailing comma, improving readability. This is a formatting-only change with no functional impact.

packages/cluster/test/fixtures/apps/messenger/agent.js (1)

32-35: LGTM! Formatting improvement.

The payload object is now formatted across multiple lines with a trailing comma. This is a formatting-only change with no functional impact.

plugins/onerror/test/onerror.test.ts (1)

324-327: LGTM! Formatting improvement.

The fs.rmSync options object is now formatted across multiple lines with a trailing comma. This is a formatting-only change with no functional impact.

tools/scripts/test/start-without-demon-2.test.ts (1)

101-103: LGTM! Formatting improvement.

The options object for coffee.fork is now formatted across multiple lines with a trailing comma. This is a formatting-only change with no functional impact.

packages/path-matching/test/index.test.ts (1)

29-32: LGTM! Formatting improvement.

The options object for match() is now formatted across multiple lines with a trailing comma. This is a formatting-only change with no functional impact.

tegg/core/core-decorator/test/decorators.test.ts (3)

111-122: LGTM! Formatting improvement.

The object literals in the test array are now formatted across multiple lines with trailing commas. This is a formatting-only change with no functional impact.


144-156: LGTM! Formatting improvement.

The property test objects are now formatted across multiple lines with trailing commas. This is a formatting-only change with no functional impact.


183-186: LGTM! Formatting improvement.

The constructor qualifier object is now formatted across multiple lines with a trailing comma. This is a formatting-only change with no functional impact.

tegg/core/metadata/test/LoadUnit.test.ts (1)

35-39: LGTM! Formatting improvement.

The qualifier objects passed to getEggPrototype() are now formatted across multiple lines with trailing commas. These are formatting-only changes with no functional impact.

Also applies to: 41-45, 68-72, 74-78, 80-84, 110-114

plugins/view-nunjucks/test/view/security.test.ts (1)

233-235: LGTM! Formatting improvement.

The query objects are now formatted across multiple lines with trailing commas. These are formatting-only changes with no functional impact on the security tests.

Also applies to: 245-247, 257-259, 269-271

packages/core/src/utils/index.ts (1)

17-17: LGTM! Formatting change is consistent with the oxfmt upgrade.

The Istanbul ignore comment placement has been adjusted by the formatter with no impact on functionality.

plugins/view-nunjucks/test/fixtures/example/app/router.js (1)

46-48: LGTM! Multi-line object formatting applied consistently.

The object literal has been reformatted to a multi-line structure with a trailing comma, consistent with the updated formatter configuration.

plugins/view-nunjucks/test/view/cache.test.ts (1)

27-29: LGTM! Consistent multi-line formatting for options objects.

The fs.readFileSync options have been reformatted to multi-line blocks, aligning with the updated formatter rules.

Also applies to: 126-128

plugins/mock/src/lib/app.ts (1)

78-80: LGTM! Constructor arguments reformatted consistently.

The object literals passed to Agent and ApplicationClass constructors have been reformatted to multi-line with trailing commas. The spread operator and all properties remain unchanged.

Also applies to: 86-88

tegg/core/dal-runtime/src/BaseSqlMap.ts (1)

259-259: LGTM! SQL WHERE clause formatting simplified.

The WHERE clause construction has been collapsed to a single-line expression while maintaining identical functionality.

pnpm-workspace.yaml (1)

53-53: LGTM! Dependency updates are appropriate for the oxfmt upgrade.

The changes include:

  • Core update: oxfmt ^0.5.0 → ^0.8.0
  • Minor updates: @types/node and lint-staged
  • Correctly adds @oxfmt/* and oxfmt to minimumReleaseAgeExclude to allow immediate adoption of formatter updates

All updates follow the catalog pattern as per coding guidelines.

Also applies to: 149-149, 174-174, 232-232, 238-238

plugins/schedule/src/lib/load_schedule.ts (1)

18-21: LGTM! Type annotation reformatted to multi-line structure.

The inline type annotation has been expanded to a multi-line block format while preserving the exact same type structure.

plugins/security/src/lib/extend/safe_curl.ts (1)

10-12: LGTM! Type alias reformatted consistently.

The HttpClientOptions type alias has been expanded to a multi-line format, consistent with the updated formatter configuration.

tools/scripts/test/stop.test.ts (2)

200-202: Formatting-only change confirmed.

Coffee.fork third-argument options are unchanged; switching to a multi-line object is noop.


352-354: Formatting-only change confirmed.

Multi-line spread for options preserves cwd and semantics.

tegg/core/common-util/src/ModuleConfig.ts (1)

169-171: No-op reformat of importResolve options.

Options object is unchanged; readability improved.

plugins/security/src/config/config.default.ts (1)

182-187: Reformat only; defaults preserved.

supportedRequests keeps the same path and methods; style aligns with formatter.

plugins/multipart/src/app/extend/context.ts (1)

350-352: Formatting-only change; behavior intact.

The limits spread and downstream normalization remain the same.

plugins/onerror/src/lib/error_view.ts (1)

162-167: Type annotation formatting only.

Return type members unchanged; readability improved.

plugins/schedule/test/customTypeWithoutStart.test.ts (2)

8-9: LGTM: Windows test skip is appropriate.

The conditional skip correctly addresses the documented timeout flakiness on Windows while preserving test coverage on other platforms.


12-15: LGTM: Formatting change aligns with oxfmt upgrade.

The multi-line object literal with trailing comma follows Prettier conventions and matches the broader formatting changes in this PR.

packages/router/src/types.ts (1)

3-5: LGTM: Formatting-only change.

The type alias reformatting is consistent with the oxfmt upgrade and maintains identical semantics.

.oxfmtrc.json (1)

2-8: LGTM: Configuration migration is well-structured.

The Prettier-compatible schema with explicit settings aligns with the coding guidelines (two-space indentation, trailing commas, semicolons). The $schema reference enables IDE validation. Based on learnings

packages/cluster/src/utils/mode/base/agent.ts (1)

66-76: LGTM: Formatting change with no behavioral impact.

The multi-line destructuring improves readability while maintaining identical type signatures and runtime behavior.

packages/errors/src/base.ts (1)

20-27: LGTM: Method signature formatting improves readability.

The multi-line format makes the complex generic constraints and rest parameters easier to parse without changing runtime behavior or types.

tegg/core/core-decorator/test/fixtures/decators/ConstructorObject.ts (1)

47-53: LGTM: Decorator formatting is consistent with style upgrade.

The multi-line decorator placement improves readability in this test fixture without affecting decorator application order or behavior.

tegg/core/runtime/test/fixtures/modules/inject-constructor-context-to-singleton/object.ts (2)

30-33: LGTM: Formatting-only change.

The multi-line constructor parameter format is consistent with the oxfmt upgrade.


45-48: LGTM: Formatting-only change.

The multi-line constructor parameter format maintains consistent styling across the test fixture.

tegg/plugin/tegg/test/EggCompatible.test.ts (1)

148-151: LGTM: Test assertion formatting improves readability.

The multi-line object literal makes the expected structure more visible without changing assertion logic.

plugins/schedule/test/immediate.test.ts (1)

30-33: LGTM — formatting-only.

Multi-line object with trailing comma; no behavioral change.

packages/cookies/src/cookies.ts (1)

111-114: LGTM — reflow only.

Options object reformatted; logic unchanged.

plugins/schedule/test/executeError-task-generator.test.ts (1)

9-12: LGTM — formatting-only.

Readability improved; behavior preserved.

plugins/multipart/test/stream-mode-with-filematch-glob.test.ts (1)

55-59: LGTM — assertion objects reformatted.

Equivalent expectations; no semantic change.

Also applies to: 100-104

plugins/multipart/test/stream-mode-with-filematch.test.ts (1)

54-58: LGTM — formatting-only.

Multi-line object literals with trailing commas; behavior unchanged.

Also applies to: 122-126

packages/router/src/Router.ts (1)

164-168: LGTM — reflow only.

Options preserved; no runtime impact.

plugins/multipart/test/enable-pathToRegexpModule.test.ts (2)

53-57: Formatting-only change; OK.

Object literal expansion preserves semantics.


98-102: Formatting-only change; OK.

Consistent with repo-wide oxfmt 0.8 style.

plugins/schedule/test/subscription.test.ts (2)

30-33: Formatting-only change; OK.

Multiline mm.cluster options; no behavior change.


49-52: Formatting-only change; OK.

Matches oxfmt multi-line object style.

tegg/core/common-util/test/ModuleConfig.test.ts (4)

23-25: Formatting-only change; OK.

Trailing commas and multi-line object; no behavior change.


36-41: Formatting-only change; OK.

Consistent structure; assertions unchanged.


63-71: Formatting-only change; OK.

Array/object layout only.


111-116: Formatting-only change; OK.

Multi-line array with trailing comma; fine.

plugins/schedule/test/detect-error.test.ts (1)

11-15: Formatting-only change; OK.

Multiline mm.cluster options; semantics intact.

plugins/multipart/test/file-mode.test.ts (1)

72-76: LGTM! Formatting improvement from oxfmt upgrade.

The test assertion object has been reformatted to multi-line format with trailing commas, improving readability while preserving test behavior.

tegg/plugin/tegg/test/ModuleConfig.test.ts (1)

46-51: LGTM! Formatting improvement from oxfmt upgrade.

The nested assertion object has been reformatted to multi-line format, making the structure more readable while maintaining the same test expectations.

packages/router/test/Router.test.ts (1)

941-944: LGTM! Formatting improvement from oxfmt upgrade.

The router URL generation calls have been reformatted to use multi-line object literals for named parameters, improving readability. The test coverage remains intact, verifying both the object-based and positional parameter styles.

Also applies to: 949-952, 970-973, 996-999, 1411-1414, 1419-1422

packages/cookies/test/cookies.test.ts (1)

741-746: LGTM! Formatting improvement from oxfmt upgrade.

Cookie configuration objects have been reformatted to multi-line format with trailing commas, improving readability of the test setup. All property values remain unchanged, preserving test behavior.

Also applies to: 946-951, 1135-1140, 1174-1179, 1215-1220

tegg/standalone/standalone/test/index.test.ts (1)

188-193: Formatting-only reflow; no semantic changes.

Multiline object + trailing commas align with formatter rules. Looks good.

tegg/core/types/src/dynamic-inject.ts (1)

3-5: Type alias formatting LGTM.

Only layout/semicolon changes; type remains identical.

packages/cluster/test/master/after-start.test.ts (2)

29-30: Good isolation improvement.

Moving afterEach(mm.restore) inside the describe block properly scopes the cleanup to this test suite, preventing mock leakage while keeping the app lifecycle (managed by beforeAll/afterAll) intact.


9-10: The Windows skip is not masking real bugs—it's addressing a known environmental issue.

This skip pattern is widespread across the codebase (40+ tests), consistently applied to cluster, process, and timing-sensitive operations. Related test files (e.g., packages/cluster/test/options.test.ts, packages/cluster/test/agent_worker.test.ts) have identical TODOs citing "Hook timed out in 20000ms"—indicating Windows CI environment timing issues, not code defects. This is a pragmatic, established workaround, not a hidden bug.

Likely an incorrect or invalid review comment.

@fengmk2 fengmk2 merged commit 70b6614 into next Oct 22, 2025
89 of 92 checks passed
@fengmk2 fengmk2 deleted the use-oxfmt-0.8-v2 branch October 22, 2025 12:35
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.

1 participant