Conversation
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughBumps workspace catalog deps and adds a new catalog entry; many package.json "typecheck" scripts now run "tsgo --noEmit && tsc --noEmit"; lint ignore patterns expanded; small TypeScript typing tweak in tsdown config; create-egg package.json reorganized; multiple template/config files refactored to export named typed constants. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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. Comment |
Summary of ChangesHello @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 primarily focuses on routine maintenance by updating various development dependencies and their associated type definitions to their latest versions. It also includes a targeted fix within a Highlights
Using Gemini Code AssistThe 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
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 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
|
Deploying egg with
|
| Latest commit: |
154a42b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8b261274.egg-cci.pages.dev |
| Branch Preview URL: | https://fix-typecheck.egg-cci.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #5726 +/- ##
=======================================
Coverage 87.60% 87.61%
=======================================
Files 561 569 +8
Lines 10933 10941 +8
Branches 1238 1238
=======================================
+ Hits 9578 9586 +8
Misses 1271 1271
Partials 84 84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request primarily consists of dependency updates to address type-checking issues, which is a good maintenance practice. The main packages updated are @types/node, oxlint, and oxlint-tsgolint. Additionally, there's a code change in tools/egg-bin/tsdown.config.ts to fix a type error related to a JSON import. I've provided one suggestion on that file to improve type safety by using a const assertion instead of a direct type cast. Overall, the changes are correct and achieve the goal of fixing the typecheck.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tools/egg-bin/tsdown.config.ts (1)
1-7: Type cast fixes tsdown config typing; consider explicit typed intermediate for clarityThe
UserConfigimport plusbaseConfig as UserConfigspread is a reasonable way to fix the typecheck and matches tsdown’s expectations. To better align with the guideline for config files, you might optionally introduce an explicitly typed intermediate config object and keepdefineConfigjust as a wrapper, e.g.:import { defineConfig, type UserConfig } from 'tsdown'; import baseConfig from '../../tsdown.config.json' with { type: 'json' }; const userConfig: UserConfig = { ...baseConfig, // MEMO: @oclif/core only work on unbundle mode unbundle: true, unused: { level: 'error', ignore: ['utility'], }, copy: [ { from: 'scripts', to: 'dist/scripts', }, ], }; export default defineConfig(userConfig);This keeps the JSON merge strongly typed and explicit while preserving current behavior. As per coding guidelines for
tsdown.config.ts, ...
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
pnpm-workspace.yaml(2 hunks)tools/egg-bin/tsdown.config.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Use explicit return types for all exported functions, methods, and getters to support TypeScript's isolatedDeclarations flag
Useunique symboltype for exported symbol constants
All exported functions in TypeScript files must have explicit return type annotations
Use camelCase for variable and function names in TypeScript
Prefer interfaces over type aliases for object shapes in TypeScript
Usereadonlymodifiers where appropriate in TypeScript class properties and interfaces
Avoidanytype; useunknownwhen the type is truly unknown in TypeScript
Use weak references for caches when appropriate to prevent memory leaks
Useexportstatements instead ofmodule.exportsin ESM packages
Useimportstatements instead ofrequire()in ESM packages
Add.tsfile extensions in import statements for proper TypeScript resolution
Avoid computed property names with symbols in class declarations to support isolatedDeclarations
Files:
tools/egg-bin/tsdown.config.ts
{**/tsdown.config.ts,**/vitest.config.ts}
📄 CodeRabbit inference engine (CLAUDE.md)
For TypeScript config files (tsdown.config.ts, vitest.config.ts), use typed intermediate variables with explicit type annotations to support isolatedDeclarations
Files:
tools/egg-bin/tsdown.config.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Name files in lowercase with hyphens (e.g.,loader-context.ts)
Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint
Files:
tools/egg-bin/tsdown.config.ts
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js}: Name classes in PascalCase
Name functions and variables in camelCase
Files:
tools/egg-bin/tsdown.config.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Re-export types thoughtfully to keep the public API stable
Files:
tools/egg-bin/tsdown.config.ts
pnpm-workspace.yaml
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'
Files:
pnpm-workspace.yaml
🧠 Learnings (21)
📓 Common learnings
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use catalog: for external dependencies defined in pnpm-workspace.yaml
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to pnpm-workspace.yaml : Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use oxlint with `--type-aware` flag for linting across all packages instead of ESLint
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {**/tsdown.config.ts,**/vitest.config.ts} : For TypeScript config files (tsdown.config.ts, vitest.config.ts), use typed intermediate variables with explicit type annotations to support isolatedDeclarations
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/*/tsdown.config.ts : Use tsdown for unbundled ESM builds that preserves file structure; configure via tsdown.config.ts in each package
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/tsdown.config.ts : All plugins MUST use this tsdown configuration template with entry pattern `src/**/*.ts`, `unbundle: true`, `dts: true`, and `exports.devExports: true`
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx} : Re-export types thoughtfully to keep the public API stable
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/*.ts : Use TypeScript throughout all packages in the Eggjs monorepo
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/tsconfig.json : Include tsconfig.json extending eggjs/tsconfig in each core package
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.ts : Use explicit return types for all exported functions, methods, and getters to support TypeScript's isolatedDeclarations flag
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/src/types.ts : Module augmentation in plugin types.ts MUST extend the 'egg' module using `declare module 'egg'`
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/src/types.ts : Include JSDoc comments for configuration properties in plugin type definitions
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to config/*.ts : Use `config/` directory for application configuration files
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tsconfig.json : Use `${configDir}` variable in root TypeScript configurations for per-package path resolution
Applied to files:
tools/egg-bin/tsdown.config.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use catalog: for external dependencies defined in pnpm-workspace.yaml
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to pnpm-workspace.yaml : Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to package.json : Keep local Node.js and pnpm versions aligned with the repo's `packageManager` field in configuration files
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use workspace:* for internal package dependencies in package.json
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: All packages in this monorepo require Node.js >= 22.18.0
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Node.js >= 20.19.0 is required - this is a hard requirement
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use oxlint with `--type-aware` flag for linting across all packages instead of ESLint
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {.eslintrc,.eslintrc.js,.eslintrc.json} : Remove `.eslintrc`, `.eslintrc.js`, and `.eslintrc.json` files when migrating packages to oxlint
Applied to files:
pnpm-workspace.yaml
🧬 Code graph analysis (1)
tools/egg-bin/tsdown.config.ts (1)
packages/egg/src/lib/define.ts (1)
defineConfig(29-31)
⏰ 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). (22)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: Test (macos-latest, 24, 2/3)
- GitHub Check: Test (windows-latest, 20, 1/3)
- GitHub Check: Test (windows-latest, 22, 2/3)
- GitHub Check: Test (macos-latest, 20, 2/3)
- GitHub Check: Test (ubuntu-latest, 24, 1/3)
- GitHub Check: Test (windows-latest, 22, 3/3)
- GitHub Check: Test (ubuntu-latest, 20, 2/3)
- GitHub Check: Test (macos-latest, 20, 3/3)
- GitHub Check: Test (windows-latest, 20, 2/3)
- GitHub Check: Test (ubuntu-latest, 24, 3/3)
- GitHub Check: Test (ubuntu-latest, 22, 1/3)
- GitHub Check: Test (macos-latest, 22, 3/3)
- GitHub Check: Test bin (windows-latest, 22, 2/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 1/3)
- GitHub Check: Test bin (windows-latest, 22, 0/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
- GitHub Check: Test bin (windows-latest, 22, 1/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 2/3)
- GitHub Check: typecheck
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Cloudflare Pages: egg-v3
🔇 Additional comments (1)
pnpm-workspace.yaml (1)
53-53: Version bumps for types and lint tooling look fine; verify CI passesThe catalog bumps for
@types/node,oxlint, andoxlint-tsgolintare consistent with the workspace’s catalog setup; there’s no config smell here. Please just make sure the updated versions run cleanly in CI (typecheck, lint scripts) across all packages, especially given the stricter oxlint releases. Based on learnings about using the catalog for shared tooling, ...Also applies to: 174-175
There was a problem hiding this comment.
Pull request overview
This PR fixes TypeScript type checking errors by adding explicit type annotations and updating related dependencies. The changes address type compatibility issues when spreading a JSON-imported configuration object.
- Fix type checking error in tsdown configuration by importing and using the
UserConfigtype - Update development dependencies to latest patch versions (@types/node, oxlint, oxlint-tsgolint)
- Update lockfile to reflect dependency version changes
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tools/egg-bin/tsdown.config.ts |
Add UserConfig type import and explicit type cast for JSON configuration to resolve TypeScript type checking errors |
pnpm-workspace.yaml |
Update catalog dependencies to latest patch versions (@types/node 24.10.1→24.10.2, oxlint 1.31.0→1.32.0, oxlint-tsgolint 0.8.3→0.8.5) |
pnpm-lock.yaml |
Update lockfile to reflect new dependency versions and their transitive dependency changes |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tools/create-egg/src/templates/tegg/app/module/bar/controller/home.ts (1)
1-1: Logger typing update matches new egg Logger typeUsing
type Loggerfrom'egg'for the injectedloggerproperty brings this controller in line with the updated service templates and should satisfy typecheck without affecting behavior.If you later tighten template typing (e.g.,
isolatedDeclarations), consider adding an explicit return type likePromise<string>toindexfor full consistency, though that’s orthogonal to this PR.Also applies to: 8-8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
.oxlintrc.json(1 hunks)package.json(2 hunks)pnpm-workspace.yaml(3 hunks)tools/create-egg/package.json(1 hunks)tools/create-egg/src/templates/tegg/app/module/bar/controller/home.ts(1 hunks)tools/create-egg/src/templates/tegg/app/module/bar/controller/user.ts(1 hunks)tools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Use explicit return types for all exported functions, methods, and getters to support TypeScript's isolatedDeclarations flag
Useunique symboltype for exported symbol constants
All exported functions in TypeScript files must have explicit return type annotations
Use camelCase for variable and function names in TypeScript
Prefer interfaces over type aliases for object shapes in TypeScript
Usereadonlymodifiers where appropriate in TypeScript class properties and interfaces
Avoidanytype; useunknownwhen the type is truly unknown in TypeScript
Use weak references for caches when appropriate to prevent memory leaks
Useexportstatements instead ofmodule.exportsin ESM packages
Useimportstatements instead ofrequire()in ESM packages
Add.tsfile extensions in import statements for proper TypeScript resolution
Avoid computed property names with symbols in class declarations to support isolatedDeclarations
Files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Name files in lowercase with hyphens (e.g.,loader-context.ts)
Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint
Files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js}: Name classes in PascalCase
Name functions and variables in camelCase
Files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Re-export types thoughtfully to keep the public API stable
Files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
package.json
📄 CodeRabbit inference engine (AGENTS.md)
Keep local Node.js and pnpm versions aligned with the repo's
packageManagerfield in configuration files
Files:
package.json
{packages/*/package.json,plugins/*/package.json,tools/*/package.json}
📄 CodeRabbit inference engine (CLAUDE.md)
{packages/*/package.json,plugins/*/package.json,tools/*/package.json}: Use workspace:* for internal package dependencies in package.json
Use catalog: for external dependencies defined in pnpm-workspace.yaml
Settype: modulein package.json for ESM packages
Includebuild,typecheck,lint,test, andprepublishOnlyscripts in all package.json files
Files:
tools/create-egg/package.json
pnpm-workspace.yaml
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'
Files:
pnpm-workspace.yaml
🧠 Learnings (43)
📓 Common learnings
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `workspace:*` protocol for internal tegg and egg monorepo dependencies in package.json
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/*.ts : Use TypeScript throughout all packages in the Eggjs monorepo
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/package.json : Plugin package.json MUST include egg in peerDependencies to ensure framework compatibility
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Follow standard Egg plugin structure with `src/`, `test/`, `package.json`, and `tsdown.config.ts` files
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/plugin/*/package.json : Define eggPlugin in package.json and create app.ts for initialization in plugin packages
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use workspace:* for internal package dependencies in package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {.eslintrc,.eslintrc.js,.eslintrc.json} : Remove `.eslintrc`, `.eslintrc.js`, and `.eslintrc.json` files when migrating packages to oxlint
Applied to files:
.oxlintrc.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to tools/egg-bin/tsconfig.json : Set `isolatedDeclarations: false` in tsconfig.json for oclif CLI tools (tools/egg-bin) due to Flags API incompatibility
Applied to files:
.oxlintrc.jsonpackage.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint
Applied to files:
.oxlintrc.jsonpackage.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use oxlint with `--type-aware` flag for linting across all packages instead of ESLint
Applied to files:
.oxlintrc.jsonpackage.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/tsconfig.json : Include tsconfig.json extending eggjs/tsconfig in each core package
Applied to files:
.oxlintrc.jsontools/create-egg/src/templates/tegg/app/module/bar/controller/user.tspackage.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/!(egg|cookies)/test/**/*.test.ts,plugins/*/test/**/*.test.ts,tools/!(egg-bin)/test/**/*.test.ts} : All new packages MUST use Vitest for testing (exception: egg-bin and cookies packages use Mocha)
Applied to files:
.oxlintrc.jsontools/create-egg/package.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc
Applied to files:
.oxlintrc.jsonpackage.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/cookies/test/**/*.test.ts,tools/egg-bin/test/**/*.test.ts} : Use Mocha test framework for egg-bin and cookies packages
Applied to files:
.oxlintrc.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Follow standard Egg plugin structure with `src/`, `test/`, `package.json`, and `tsdown.config.ts` files
Applied to files:
.oxlintrc.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Include `build`, `typecheck`, `lint`, `test`, and `prepublishOnly` scripts in all package.json files
Applied to files:
.oxlintrc.jsonpackage.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/tsconfig.json,plugins/*/tsconfig.json,tools/*/tsconfig.json} : Enable strict mode in all TypeScript packages
Applied to files:
.oxlintrc.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.{test,spec}.{ts,tsx} : Use Vitest for testing all tegg packages with configuration from monorepo root vitest.config.ts
Applied to files:
.oxlintrc.jsonpackage.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/*.ts : Use TypeScript throughout all packages in the Eggjs monorepo
Applied to files:
.oxlintrc.jsontools/create-egg/src/templates/tegg/app/module/bar/controller/user.tspackage.jsontools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.{ts,tsx,js,mjs} : Use `.js` extensions in ESM imports across all tegg packages
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/src/types.ts : Module augmentation in plugin types.ts MUST extend the 'egg' module using `declare module 'egg'`
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/package.jsontools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/src/index.ts : Export public API through src/index.ts in each package
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : Use qualifiers (InitTypeQualifier, ModuleQualifier, EggQualifier) to disambiguate multiple implementations
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.{test,spec}.{ts,tsx} : Use MockApplication from eggjs/mock for testing context-scoped objects with mockModuleContextScope()
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/package.jsontools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : Implement EggObjectLifecycle interface or use lifecycle decorators (LifecyclePostConstruct, LifecyclePostInject, LifecycleInit, LifecyclePreDestroy, LifecycleDestroy)
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.ts : Use `import` statements instead of `require()` in ESM packages
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : Cannot inject ctx/app directly - inject specific services instead
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : Use Inject() decorator for property and constructor dependency injection
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/bar/controller/home.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : Use InjectOptional() or Inject({ optional: true }) for optional dependencies
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : SingletonProto cannot inject ContextProto - only ContextProto can inject any prototype
Applied to files:
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.tstools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `catalog:` protocol for shared external dependencies in package.json
Applied to files:
package.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use catalog: for external dependencies defined in pnpm-workspace.yaml
Applied to files:
package.jsontools/create-egg/package.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to pnpm-workspace.yaml : Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'
Applied to files:
package.jsontools/create-egg/package.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `workspace:*` protocol for internal tegg and egg monorepo dependencies in package.json
Applied to files:
package.jsontools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use workspace:* for internal package dependencies in package.json
Applied to files:
package.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to **/*.{js,jsx,cjs,mjs} : Prefer `.ts` sources and exports over CommonJS in the ESM-first, TypeScript-heavy repository
Applied to files:
package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Build all packages first using 'pnpm run build' before making changes, then validate with lint, tests, and documentation site checks
Applied to files:
package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run bootstrap and build commands in sequence: corepack enable pnpm → pnpm install → pnpm run build → pnpm run lint
Applied to files:
package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run 'pnpm run build' after making changes (set timeout to 60+ seconds) and never cancel the command
Applied to files:
package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use `tsc --noEmit` for pure TypeScript type checking in all packages
Applied to files:
package.json
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run 'pnpm run test' to validate changes (set timeout to 180+ seconds for all tests, 120+ seconds for coverage) and never cancel the command
Applied to files:
package.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/package.json : Plugin package.json MUST include egg in peerDependencies to ensure framework compatibility
Applied to files:
tools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/plugin/*/package.json : Define eggPlugin in package.json and create app.ts for initialization in plugin packages
Applied to files:
tools/create-egg/package.jsontools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to plugins/*/src/types.ts : All plugins MUST include a `src/types.ts` file that extends Egg module declarations using module augmentation
Applied to files:
tools/create-egg/package.json
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: All packages in this monorepo require Node.js >= 22.18.0
Applied to files:
tools/create-egg/package.jsonpnpm-workspace.yaml
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.ts : Use ContextProto() for request-scoped instances and SingletonProto() for application-lifecycle instances
Applied to files:
tools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Applies to package.json : Keep local Node.js and pnpm versions aligned with the repo's `packageManager` field in configuration files
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Node.js >= 20.19.0 is required - this is a hard requirement
Applied to files:
pnpm-workspace.yaml
⏰ 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). (22)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: Test (windows-latest, 24, 2/3)
- GitHub Check: Test (macos-latest, 20, 1/3)
- GitHub Check: Test (ubuntu-latest, 24, 1/3)
- GitHub Check: Test (ubuntu-latest, 22, 3/3)
- GitHub Check: Test (ubuntu-latest, 20, 1/3)
- GitHub Check: Test (windows-latest, 24, 3/3)
- GitHub Check: Test (macos-latest, 22, 1/3)
- GitHub Check: Test (macos-latest, 24, 3/3)
- GitHub Check: Test (ubuntu-latest, 22, 1/3)
- GitHub Check: Test (windows-latest, 20, 2/3)
- GitHub Check: Test (macos-latest, 24, 1/3)
- GitHub Check: Test (macos-latest, 22, 3/3)
- GitHub Check: Test (ubuntu-latest, 20, 3/3)
- GitHub Check: Test bin (windows-latest, 22, 1/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 0/3)
- GitHub Check: Test bin (windows-latest, 22, 2/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 2/3)
- GitHub Check: Test bin (ubuntu-latest, 22, 1/3)
- GitHub Check: Test bin (windows-latest, 22, 0/3)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Cloudflare Pages: egg-v3
🔇 Additional comments (6)
tools/create-egg/src/templates/tegg/app/module/foo/service/HelloService.ts (1)
1-1: Logger type import and injection look correctImporting
type Loggerfrom'egg'and updating the injectedloggerproperty toLoggeraligns this template with the core egg typings and keeps the injection pattern unchanged.Also applies to: 10-10
tools/create-egg/src/templates/tegg/app/module/bar/controller/user.ts (1)
1-1: Controller/decorator imports now consistent with egg entrypointSwitching
Inject/HTTPController/HTTPMethod*imports to come from'egg'matches the other updated templates and keeps the controller wiring intact, with the.tsextension on the local import satisfying the TS import-guideline..oxlintrc.json (1)
6-10: Expanded oxlint ignorePatterns are reasonable for templatesExcluding the egg3 tegg/simple-TS template paths (plus existing fixtures) from oxlint makes sense for generated scaffolding and avoids lint/type-check noise in template sources.
tools/create-egg/package.json (1)
14-19: Dependencies now follow workspace/catalog conventionsUsing
catalog:for external tooling libs andworkspace:*for internal packages like@eggjs/tracer,@eggjs/mock, andeggmatches the monorepo dependency rules and keeps this CLI aligned with the shared catalog.Also applies to: 21-25
package.json (1)
15-16: Type tooling tightened via @typescript/native-preview and oxlint --type-checkAdding
@typescript/native-previewfrom the catalog and switching the rootlintscript tooxlint --type-aware --type-checkaligns the tooling with stricter TS checks so type issues are caught during lint, consistent with the oxlint-first guidelines.Also applies to: 39-39
pnpm-workspace.yaml (1)
53-53: Catalog pins updated to match new lint/typecheck toolingThe bumped versions for
@types/node,oxlint, andoxlint-tsgolint, plus the new@typescript/native-previewcatalog entry, keep the workspace catalog in sync with the root devDependencies and support the stricteroxlint --type-checkflow.Also applies to: 66-66, 175-176
There was a problem hiding this comment.
Actionable comments posted: 30
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
plugins/onerror/package.json (1)
52-58: Thetsgodependency is missing and must be added before the typecheck script can work.The typecheck script references
tsgo --noEmit && tsc --noEmit, buttsgois not defined in the pnpm-workspace.yaml catalog and does not appear in any package.json dependencies. Addtsgoto the workspace catalog in pnpm-workspace.yaml and reference it withcatalog:in this package's devDependencies, or add it directly to devDependencies if it's not a shared dependency.tegg/plugin/aop/package.json (1)
1-84: Add missingtsgodevDependency for typecheck script.The
typecheckscript on line 33 referencestsgo --noEmit && tsc --noEmit, buttsgois not listed indevDependencies. This will cause the script to fail at runtime. Addtsgo: "catalog:"to thedevDependenciesobject.tegg/standalone/standalone/package.json (1)
58-69: Addtsgoto devDependencies usingcatalog:protocol.The script at line 24 uses
tsgobut it is not declared in devDependencies. Add"tsgo": "catalog:"to the devDependencies section (lines 58-69) and ensure it is defined in pnpm-workspace.yaml's catalog section.
♻️ Duplicate comments (5)
tegg/core/ajv-decorator/package.json (1)
23-23: Verify tsgo tool availability in monorepo.The typecheck script references
tsgobut this tool is not listed in this package's devDependencies. Confirm thattsgois available through the workspace root catalog dependencies or root package.json.examples/helloworld-typescript/package.json (1)
33-33: Verify tsgo tool availability in monorepo.The typecheck script references
tsgobut this tool is not listed in this package's devDependencies. Confirm thattsgois available through the workspace root catalog dependencies or root package.json. This is particularly important for example files that users may follow.plugins/view/package.json (1)
75-75: Verify tsgo tool availability in monorepo.The typecheck script references
tsgobut this tool is not listed in this package's devDependencies. Confirm thattsgois available through the workspace root catalog dependencies or root package.json.tools/scripts/package.json (1)
61-61: Verify tsgo tool availability in monorepo.The typecheck script references
tsgobut this tool is not listed in this package's devDependencies. Confirm thattsgois available through the workspace root catalog dependencies or root package.json.plugins/logrotator/package.json (1)
91-91: Verify tsgo tool availability across monorepo.The typecheck script references
tsgobut this tool is not listed in devDependencies. This appears to be a monorepo-wide issue. Confirm thattsgois available through the workspace root catalog dependencies or root package.json.
🟠 Major comments (2)
plugins/redis/package.json-54-54 (1)
54-54: Add missingoxlint-tsgolintto devDependencies.Line 54 uses the
tsgocommand in the typecheck script, which requiresoxlint-tsgolintas a devDependency. Compare with packages/koa-static-cache/package.json, which includes"oxlint-tsgolint": "catalog:"alongside the same typecheck script. Add it to devDependencies:"devDependencies": { "@eggjs/mock": "workspace:*", "@eggjs/tsconfig": "workspace:*", "@types/node": "catalog:", "detect-port": "^2.1.0", "egg": "workspace:*", "oxlint": "catalog:", + "oxlint-tsgolint": "catalog:", "rimraf": "catalog:", "tsdown": "catalog:", "typescript": "catalog:", "vitest": "catalog:" },Committable suggestion skipped: line range outside the PR's diff.
tools/egg-bin/package.json-69-69 (1)
69-69: Removetsgofrom the typecheck script—use onlytsc --noEmit.The typecheck script on line 64 should not include
tsgo. According to project guidelines, typecheck scripts should use onlytsc --noEmitfor pure TypeScript type checking. The current script attempts to invoke a non-existent tool that is not defined anywhere in the monorepo dependencies or tooling.Apply this correction:
- "typecheck": "tsc --noEmit", + "typecheck": "tsc --noEmit",(If the proposed change includes
tsgo, remove it entirely.)Committable suggestion skipped: line range outside the PR's diff.
🧹 Nitpick comments (1)
plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/config/config.default.ts (1)
6-38: LGTM! Configuration factory correctly implements test fixture settings.The typed constant pattern supports isolatedDeclarations and the configuration logic is correct. The custom Ajv formats (byte, json-string, semver) have appropriate validation functions.
For maximum explicitness, consider adding the parameter type annotation:
-const config: EggConfigFactory = defineConfigFactory(() => { +const config: EggConfigFactory = defineConfigFactory((appInfo) => {However, since the type is already constrained by
EggConfigFactory, this is purely a style preference.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/koa-static-cache/test/index.test.ts (1)
116-117:describe.skipIfis valid Vitest syntax and correctly used here.
The concern about narrowing the Windows skip scope remains valid—currently, the entire suite is skipped on Windows, losing all Windows signal. A follow-up could isolate the EPERM-prone tests (e.g., those writing totest/a.js) while keeping read-only/static tests running on Windows.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/koa-static-cache/test/index.test.ts(2 hunks)plugins/mock/test/format_options.test.ts(1 hunks)plugins/schedule/test/customTypeParams.test.ts(1 hunks)plugins/schedule/test/safe-timers.test.ts(1 hunks)plugins/schedule/test/schedule-type-worker2.test.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Use explicit return types for all exported functions, methods, and getters to support TypeScript's isolatedDeclarations flag
Useunique symboltype for exported symbol constants
All exported functions in TypeScript files must have explicit return type annotations
Use camelCase for variable and function names in TypeScript
Prefer interfaces over type aliases for object shapes in TypeScript
Usereadonlymodifiers where appropriate in TypeScript class properties and interfaces
Avoidanytype; useunknownwhen the type is truly unknown in TypeScript
Use weak references for caches when appropriate to prevent memory leaks
Useexportstatements instead ofmodule.exportsin ESM packages
Useimportstatements instead ofrequire()in ESM packages
Add.tsfile extensions in import statements for proper TypeScript resolution
Avoid computed property names with symbols in class declarations to support isolatedDeclarations
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
{packages/!(egg|cookies)/test/**/*.test.ts,plugins/*/test/**/*.test.ts,tools/!(egg-bin)/test/**/*.test.ts}
📄 CodeRabbit inference engine (CLAUDE.md)
All new packages MUST use Vitest for testing (exception: egg-bin and cookies packages use Mocha)
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
**/*.test.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.test.ts: Import test functions from vitest usingimport { describe, it } from 'vitest'in Vitest test files
Use Node.js built-inassertmodule for assertions in Vitest tests
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Name files in lowercase with hyphens (e.g.,loader-context.ts)
Use two-space indentation, trailing commas, and semicolons enforced by Prettier and oxlint
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js}: Name classes in PascalCase
Name functions and variables in camelCase
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Re-export types thoughtfully to keep the public API stable
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
**/test/**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
Mirror the test pattern
**/test/**/*.test.tswhen adding Vitest suites
Files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
packages/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/**/*.ts: Use TypeScript throughout all packages in the Eggjs monorepo
Use strict TypeScript mode in all packages
Files:
packages/koa-static-cache/test/index.test.ts
packages/**/test/**/*.test.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
packages/**/test/**/*.test.ts: Use Vitest as the standard test runner for all packages; test files follow pattern 'test/**/*.test.ts'
Use 'import { describe, it } from "vitest"' for test functions in Vitest test files
Use Node.js built-in 'assert' module for assertions in tests
Files:
packages/koa-static-cache/test/index.test.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/core/*/package.json : Include standard build scripts in package.json: typecheck, clean, and build with tsdown and tsc
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `catalog:` protocol for shared external dependencies in package.json
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/package.json : Use `workspace:*` protocol for internal tegg and egg monorepo dependencies in package.json
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/*/tsdown.config.ts : Use tsdown for unbundled ESM builds that preserves file structure; configure via tsdown.config.ts in each package
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/*.ts : Use TypeScript throughout all packages in the Eggjs monorepo
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to pnpm-workspace.yaml : Define dependencies in pnpm-workspace.yaml catalog section and reference catalog entries with 'package-name': 'catalog:' or internal workspace dependencies with 'package-name': 'workspace:*'
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/*/package.json,plugins/*/package.json,tools/*/package.json} : Use catalog: for external dependencies defined in pnpm-workspace.yaml
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Follow standard Egg plugin structure with `src/`, `test/`, `package.json`, and `tsdown.config.ts` files
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Use `tsc --noEmit` for pure TypeScript type checking in all packages
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/plugin/*/package.json : Define eggPlugin in package.json and create app.ts for initialization in plugin packages
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.{test,spec}.{ts,tsx} : Use MockApplication from eggjs/mock for testing context-scoped objects with mockModuleContextScope()
Applied to files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Add regression test cases that exercise both the CommonJS and TypeScript example apps when updating HTTP or process orchestration features
Applied to files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/cookies/test/**/*.test.ts,tools/egg-bin/test/**/*.test.ts} : Use Mocha test framework for egg-bin and cookies packages
Applied to files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to {packages/!(egg|cookies)/test/**/*.test.ts,plugins/*/test/**/*.test.ts,tools/!(egg-bin)/test/**/*.test.ts} : All new packages MUST use Vitest for testing (exception: egg-bin and cookies packages use Mocha)
Applied to files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.ts
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/test/**/*.test.ts : Use 'import { describe, it } from "vitest"' for test functions in Vitest test files
Applied to files:
plugins/mock/test/format_options.test.tsplugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.test.ts : Import test functions from vitest using `import { describe, it } from 'vitest'` in Vitest test files
Applied to files:
plugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.ts
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Applies to packages/**/test/**/*.test.ts : Use Node.js built-in 'assert' module for assertions in tests
Applied to files:
plugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/schedule-type-worker2.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Applies to **/*.test.ts : Use Node.js built-in `assert` module for assertions in Vitest tests
Applied to files:
plugins/schedule/test/customTypeParams.test.tspackages/koa-static-cache/test/index.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:38:55.513Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: tegg/CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:55.513Z
Learning: Applies to tegg/**/*.{test,spec}.{ts,tsx} : Use Vitest for testing all tegg packages with configuration from monorepo root vitest.config.ts
Applied to files:
plugins/schedule/test/customTypeParams.test.ts
📚 Learning: 2025-11-27T14:37:59.711Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T14:37:59.711Z
Learning: Run 'pnpm run test' to validate changes (set timeout to 180+ seconds for all tests, 120+ seconds for coverage) and never cancel the command
Applied to files:
packages/koa-static-cache/test/index.test.tsplugins/schedule/test/safe-timers.test.ts
📚 Learning: 2025-11-27T14:38:37.671Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-27T14:38:37.671Z
Learning: Follow test file naming pattern of `test/**/*.test.ts` for all packages
Applied to files:
packages/koa-static-cache/test/index.test.ts
📚 Learning: 2025-11-27T14:39:09.305Z
Learnt from: CR
Repo: eggjs/egg PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-27T14:39:09.305Z
Learning: Include integration coverage when touching cluster or agent behavior
Applied to files:
plugins/schedule/test/safe-timers.test.ts
⏰ 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). (20)
- GitHub Check: Cloudflare Pages: egg-v3
- GitHub Check: Test (windows-latest, 20, 3/3)
- GitHub Check: Test (windows-latest, 20, 2/3)
- GitHub Check: Test (windows-latest, 22, 2/3)
- GitHub Check: Test (macos-latest, 22, 3/3)
- GitHub Check: Test (ubuntu-latest, 20, 2/3)
- GitHub Check: Test (ubuntu-latest, 22, 2/3)
- GitHub Check: Test (windows-latest, 24, 2/3)
- GitHub Check: Test (windows-latest, 24, 3/3)
- GitHub Check: Test (macos-latest, 20, 1/3)
- GitHub Check: Test (ubuntu-latest, 20, 1/3)
- GitHub Check: Test (macos-latest, 22, 2/3)
- GitHub Check: Test bin (windows-latest, 22, 1/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: typecheck
- GitHub Check: Test bin (windows-latest, 22, 0/3)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
packages/koa-static-cache/test/index.test.ts (1)
140-140: Good: re-enabling “abnormal path” test is consistent with suite-level Windows skip.
Withdescribe.skipIf(process.platform === 'win32'), this test will still be skipped on Windows but run elsewhere.plugins/schedule/test/schedule-type-worker2.test.ts (1)
8-9: LGTM.describe.skipIfis a supported Vitest API for conditional suite skipping. The test file correctly imports from vitest and properly documents the Windows-specific flakiness with the FIXME comment.plugins/schedule/test/safe-timers.test.ts (1)
8-9:describe.skipIfis fully supported by Vitest 4.0.15.The code is correct. Vitest has supported
describe.skipIfsince at least v0.34, and the repository uses v4.0.15, which includes this API. The Windows skip is pragmatic and consistent with the repo's existing pattern for flaky tests on Windows (e.g., similar TODO/FIXME comments appear in multiple test files across packages and plugins).plugins/schedule/test/customTypeParams.test.ts (1)
8-9: Remove verification request—describe.skipIfis a supported Vitest API.
describe.skipIfhas been available in Vitest since v0.x and is documented in current Vitest docs. The code at lines 8-9 correctly uses this API to skip the test suite on Windows. No changes needed.

Summary by CodeRabbit
Chores
Style / Tooling
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.