-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
refactor(tsconfig): standardize TypeScript configuration across monorepo #5601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Simplify all sub-project tsconfig files to extend from workspace root configuration.
This centralizes TypeScript settings and makes maintenance easier.
Changes:
- All packages/*/tsconfig.json now extend from ../../tsconfig.json
- All packages/*/tsconfig.build.json now extend from ../../tsconfig.build.json
- All plugins/*/tsconfig.json now extend from ../../tsconfig.json
- All plugins/*/tsconfig.build.json now extend from ../../tsconfig.build.json
- All tools/*/tsconfig.json now extend from ../../tsconfig.json
- Add baseUrl with ${configDir} to root tsconfig.json
- Create tsconfig.build.json at workspace root for build configuration
- Update tsdown to 0.15.6 in catalog
This follows the pattern already established in packages/router and ensures
consistent TypeScript configuration across all 31 sub-projects.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
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 significantly refactors the TypeScript configuration across the monorepo by consolidating common settings into root-level 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
|
|
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. WalkthroughCentralizes TypeScript configuration by adding root Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant TSC as tsc
participant PkgConfig as package tsconfig(.build).json
participant SharedBuild as ../../tsconfig.build.json
participant RootConfig as ../../tsconfig.json
Dev->>TSC: tsc -p packages/{pkg}/tsconfig.build.json
TSC->>PkgConfig: read package config (extends ../../tsconfig.build.json)
PkgConfig-->>SharedBuild: inherit build compilerOptions/includes/excludes
SharedBuild-->>RootConfig: extends root tsconfig.json (baseUrl & shared options)
Note right of SharedBuild: compile uses inherited rootDir/outDir/includes/excludes
TSC-->>Dev: compile using combined options
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
{packages/!(cookies),plugins}/**/vitest.config.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
plugins/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-10-07T03:38:30.682ZApplied to files:
📚 Learning: 2025-09-14T08:41:30.618ZApplied to files:
⏰ 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)
🔇 Additional comments (2)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #5601 +/- ##
=======================================
Coverage 81.26% 81.26%
=======================================
Files 265 265
Lines 6320 6320
Branches 965 965
=======================================
Hits 5136 5136
Misses 1106 1106
Partials 78 78 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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 is a great initiative to standardize the TypeScript configuration across the monorepo, which will certainly improve maintainability. However, the current implementation seems to have removed some necessary package-specific configurations from the tsconfig.json and tsconfig.build.json files. This could lead to issues like broken type-checking for tests or including unintended files/directories in the compilation. I've left a few specific comments on these issues.
Additionally, the changes to pnpm-lock.yaml are very extensive and seem to indicate a significant dependency cleanup, which wasn't mentioned in the description. Such a large change to dependencies should be carefully tested to ensure no regressions are introduced.
Could you please review the package-specific settings and ensure they are either preserved or correctly handled by the new root configurations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 26
♻️ Duplicate comments (6)
plugins/tracer/tsconfig.json (1)
1-3: Same baseUrl requirement applies hereSee my comment on packages/koa-static-cache/tsconfig.json; this plugin config needs the local
"compilerOptions": { "baseUrl": "./" }restored as well. Based on learningsplugins/session/tsconfig.json (1)
1-3: LocalbaseUrlstill requiredAs noted on packages/koa-static-cache/tsconfig.json, please add back
"compilerOptions": { "baseUrl": "./" }so this plugin complies with the shared tsconfig contract. Based on learningspackages/cluster/tsconfig.json (1)
1-3: Needs package-scopedbaseUrlRefer to my earlier comment: this package also has to declare
"compilerOptions": { "baseUrl": "./" }locally when extending the root config. Based on learningspackages/errors/tsconfig.json (1)
1-3: Reintroduce"baseUrl": "./"here tooFollowing the guidance cited previously, please restore the local baseUrl override in this package tsconfig. Based on learnings
plugins/watcher/tsconfig.json (1)
1-3: Missing required baseUrl overrideThis plugin config also needs the
"compilerOptions": { "baseUrl": "./" }block reinstated to satisfy the shared tsconfig expectations. Based on learningspackages/supertest/tsconfig.json (1)
1-3: Ensure local baseUrl override is presentSame as the earlier files: please add back
"compilerOptions": { "baseUrl": "./" }so this package tsconfig stays compliant. Based on learnings
📜 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 (60)
packages/cluster/tsconfig.build.json(1 hunks)packages/cluster/tsconfig.json(1 hunks)packages/cookies/tsconfig.build.json(1 hunks)packages/cookies/tsconfig.json(1 hunks)packages/core/tsconfig.build.json(1 hunks)packages/core/tsconfig.json(1 hunks)packages/egg/tsconfig.build.json(1 hunks)packages/egg/tsconfig.json(1 hunks)packages/errors/tsconfig.json(1 hunks)packages/extend2/tsconfig.build.json(1 hunks)packages/extend2/tsconfig.json(1 hunks)packages/koa-static-cache/tsconfig.build.json(1 hunks)packages/koa-static-cache/tsconfig.json(1 hunks)packages/koa/tsconfig.build.json(1 hunks)packages/koa/tsconfig.json(1 hunks)packages/path-matching/tsconfig.json(1 hunks)packages/router/tsconfig.build.json(1 hunks)packages/router/tsconfig.json(1 hunks)packages/supertest/tsconfig.build.json(1 hunks)packages/supertest/tsconfig.json(1 hunks)packages/utils/tsconfig.build.json(1 hunks)packages/utils/tsconfig.json(1 hunks)plugins/development/tsconfig.build.json(1 hunks)plugins/development/tsconfig.json(1 hunks)plugins/i18n/tsconfig.build.json(1 hunks)plugins/i18n/tsconfig.json(1 hunks)plugins/jsonp/tsconfig.build.json(1 hunks)plugins/jsonp/tsconfig.json(1 hunks)plugins/logrotator/tsconfig.build.json(1 hunks)plugins/logrotator/tsconfig.json(1 hunks)plugins/mock/tsconfig.build.json(1 hunks)plugins/mock/tsconfig.json(1 hunks)plugins/multipart/tsconfig.build.json(1 hunks)plugins/multipart/tsconfig.json(1 hunks)plugins/onerror/tsconfig.build.json(1 hunks)plugins/onerror/tsconfig.json(1 hunks)plugins/redis/tsconfig.build.json(1 hunks)plugins/redis/tsconfig.json(1 hunks)plugins/schedule/tsconfig.build.json(1 hunks)plugins/schedule/tsconfig.json(1 hunks)plugins/security/tsconfig.build.json(1 hunks)plugins/security/tsconfig.json(1 hunks)plugins/session/tsconfig.build.json(1 hunks)plugins/session/tsconfig.json(1 hunks)plugins/static/tsconfig.build.json(1 hunks)plugins/static/tsconfig.json(1 hunks)plugins/tracer/tsconfig.build.json(1 hunks)plugins/tracer/tsconfig.json(1 hunks)plugins/typebox-validate/tsconfig.build.json(1 hunks)plugins/typebox-validate/tsconfig.json(1 hunks)plugins/view/tsconfig.build.json(1 hunks)plugins/view/tsconfig.json(1 hunks)plugins/watcher/tsconfig.build.json(1 hunks)plugins/watcher/tsconfig.json(1 hunks)pnpm-workspace.yaml(1 hunks)tools/create-egg/tsconfig.json(1 hunks)tools/egg-bin/tsconfig.json(1 hunks)tools/scripts/tsconfig.json(1 hunks)tsconfig.build.json(1 hunks)tsconfig.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
plugins/**
📄 CodeRabbit inference engine (CLAUDE.md)
All Egg framework plugins must be placed under the plugins/ directory
Files:
plugins/view/tsconfig.build.jsonplugins/redis/tsconfig.build.jsonplugins/logrotator/tsconfig.jsonplugins/session/tsconfig.build.jsonplugins/jsonp/tsconfig.build.jsonplugins/multipart/tsconfig.build.jsonplugins/schedule/tsconfig.jsonplugins/onerror/tsconfig.build.jsonplugins/i18n/tsconfig.build.jsonplugins/logrotator/tsconfig.build.jsonplugins/development/tsconfig.jsonplugins/static/tsconfig.build.jsonplugins/development/tsconfig.build.jsonplugins/typebox-validate/tsconfig.jsonplugins/redis/tsconfig.jsonplugins/i18n/tsconfig.jsonplugins/tracer/tsconfig.build.jsonplugins/typebox-validate/tsconfig.build.jsonplugins/watcher/tsconfig.build.jsonplugins/security/tsconfig.build.jsonplugins/watcher/tsconfig.jsonplugins/static/tsconfig.jsonplugins/schedule/tsconfig.build.jsonplugins/view/tsconfig.jsonplugins/jsonp/tsconfig.jsonplugins/mock/tsconfig.build.jsonplugins/mock/tsconfig.jsonplugins/security/tsconfig.jsonplugins/tracer/tsconfig.jsonplugins/onerror/tsconfig.jsonplugins/multipart/tsconfig.jsonplugins/session/tsconfig.json
{packages,plugins,tools}/**/tsconfig.json
📄 CodeRabbit inference engine (CLAUDE.md)
{packages,plugins,tools}/**/tsconfig.json: All sub-project tsconfig.json files MUST extend the root tsconfig.json using "extends": "../../tsconfig.json" and set "compilerOptions.baseUrl": "./"
Enable TypeScript strict mode in all packages ("compilerOptions.strict": true)
Files:
plugins/logrotator/tsconfig.jsonplugins/schedule/tsconfig.jsontools/scripts/tsconfig.jsonpackages/supertest/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/cluster/tsconfig.jsontools/create-egg/tsconfig.jsonplugins/development/tsconfig.jsonplugins/typebox-validate/tsconfig.jsonpackages/path-matching/tsconfig.jsonpackages/koa/tsconfig.jsonplugins/redis/tsconfig.jsonplugins/i18n/tsconfig.jsonpackages/extend2/tsconfig.jsonpackages/egg/tsconfig.jsontools/egg-bin/tsconfig.jsonplugins/watcher/tsconfig.jsonplugins/static/tsconfig.jsonpackages/core/tsconfig.jsonpackages/router/tsconfig.jsonplugins/view/tsconfig.jsonplugins/jsonp/tsconfig.jsonplugins/mock/tsconfig.jsonpackages/utils/tsconfig.jsonplugins/security/tsconfig.jsonplugins/tracer/tsconfig.jsonplugins/onerror/tsconfig.jsonpackages/errors/tsconfig.jsonplugins/multipart/tsconfig.jsonpackages/koa-static-cache/tsconfig.jsonplugins/session/tsconfig.json
{tsconfig.json,packages/*/tsconfig.json}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Enable strict TypeScript mode across all packages
Files:
tsconfig.jsonpackages/supertest/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/path-matching/tsconfig.jsonpackages/koa/tsconfig.jsonpackages/extend2/tsconfig.jsonpackages/egg/tsconfig.jsonpackages/core/tsconfig.jsonpackages/router/tsconfig.jsonpackages/utils/tsconfig.jsonpackages/errors/tsconfig.jsonpackages/koa-static-cache/tsconfig.json
tsconfig.json
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Root tsconfig.json must include all packages in the references array
Files:
tsconfig.json
packages/*/tsconfig.json
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
All sub-project tsconfig.json files must extend from the root via "extends": "../../tsconfig.json"
Files:
packages/supertest/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/path-matching/tsconfig.jsonpackages/koa/tsconfig.jsonpackages/extend2/tsconfig.jsonpackages/egg/tsconfig.jsonpackages/core/tsconfig.jsonpackages/router/tsconfig.jsonpackages/utils/tsconfig.jsonpackages/errors/tsconfig.jsonpackages/koa-static-cache/tsconfig.json
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:"
Use pnpm catalog mode with dependencies defined once in pnpm-workspace.yaml
Files:
pnpm-workspace.yaml
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsconfig.json : All sub-project tsconfig.json files MUST extend the root tsconfig.json using "extends": "../../tsconfig.json" and set "compilerOptions.baseUrl": "./"
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsdown.config.ts : Each package should use tsdown for TypeScript builds (include a tsdown.config.ts)
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/*/tsconfig.json : All sub-project tsconfig.json files must extend from the root via "extends": "../../tsconfig.json"
📚 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/*/tsconfig.json : All sub-project tsconfig.json files must extend from the root via "extends": "../../tsconfig.json"
Applied to files:
plugins/view/tsconfig.build.jsonplugins/redis/tsconfig.build.jsonplugins/logrotator/tsconfig.jsonplugins/session/tsconfig.build.jsonplugins/jsonp/tsconfig.build.jsonplugins/multipart/tsconfig.build.jsonplugins/schedule/tsconfig.jsontools/scripts/tsconfig.jsonplugins/onerror/tsconfig.build.jsonpackages/supertest/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/cluster/tsconfig.jsonplugins/i18n/tsconfig.build.jsonplugins/logrotator/tsconfig.build.jsonpackages/cookies/tsconfig.build.jsontools/create-egg/tsconfig.jsonplugins/development/tsconfig.jsonplugins/static/tsconfig.build.jsonplugins/development/tsconfig.build.jsonplugins/typebox-validate/tsconfig.jsonpackages/path-matching/tsconfig.jsonpackages/koa/tsconfig.jsonplugins/redis/tsconfig.jsonplugins/i18n/tsconfig.jsonplugins/tracer/tsconfig.build.jsonpackages/extend2/tsconfig.jsonplugins/typebox-validate/tsconfig.build.jsonplugins/watcher/tsconfig.build.jsonpackages/core/tsconfig.build.jsonpackages/cluster/tsconfig.build.jsonpackages/egg/tsconfig.jsonplugins/security/tsconfig.build.jsonpackages/koa/tsconfig.build.jsontools/egg-bin/tsconfig.jsonplugins/watcher/tsconfig.jsonplugins/static/tsconfig.jsonpackages/core/tsconfig.jsonpackages/router/tsconfig.jsonplugins/schedule/tsconfig.build.jsonpackages/router/tsconfig.build.jsonplugins/view/tsconfig.jsonpackages/egg/tsconfig.build.jsonplugins/jsonp/tsconfig.jsonplugins/mock/tsconfig.build.jsonpackages/extend2/tsconfig.build.jsonpackages/koa-static-cache/tsconfig.build.jsonplugins/mock/tsconfig.jsonpackages/supertest/tsconfig.build.jsonpackages/utils/tsconfig.jsonpackages/utils/tsconfig.build.jsonplugins/security/tsconfig.jsonplugins/tracer/tsconfig.jsontsconfig.build.jsonplugins/onerror/tsconfig.jsonpackages/errors/tsconfig.jsonplugins/multipart/tsconfig.jsonpackages/koa-static-cache/tsconfig.jsonplugins/session/tsconfig.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsconfig.json : All sub-project tsconfig.json files MUST extend the root tsconfig.json using "extends": "../../tsconfig.json" and set "compilerOptions.baseUrl": "./"
Applied to files:
plugins/view/tsconfig.build.jsonplugins/redis/tsconfig.build.jsonplugins/logrotator/tsconfig.jsonplugins/session/tsconfig.build.jsonplugins/jsonp/tsconfig.build.jsonplugins/multipart/tsconfig.build.jsonplugins/schedule/tsconfig.jsontsconfig.jsontools/scripts/tsconfig.jsonplugins/onerror/tsconfig.build.jsonpackages/supertest/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/cluster/tsconfig.jsonplugins/i18n/tsconfig.build.jsonplugins/logrotator/tsconfig.build.jsonpackages/cookies/tsconfig.build.jsontools/create-egg/tsconfig.jsonplugins/development/tsconfig.jsonplugins/static/tsconfig.build.jsonplugins/development/tsconfig.build.jsonplugins/typebox-validate/tsconfig.jsonpackages/path-matching/tsconfig.jsonpackages/koa/tsconfig.jsonplugins/redis/tsconfig.jsonplugins/i18n/tsconfig.jsonplugins/tracer/tsconfig.build.jsonpackages/extend2/tsconfig.jsonplugins/typebox-validate/tsconfig.build.jsonplugins/watcher/tsconfig.build.jsonpackages/core/tsconfig.build.jsonpackages/cluster/tsconfig.build.jsonpackages/egg/tsconfig.jsonplugins/security/tsconfig.build.jsonpackages/koa/tsconfig.build.jsontools/egg-bin/tsconfig.jsonplugins/watcher/tsconfig.jsonplugins/static/tsconfig.jsonpackages/core/tsconfig.jsonpackages/router/tsconfig.jsonplugins/schedule/tsconfig.build.jsonpackages/router/tsconfig.build.jsonplugins/view/tsconfig.jsonpackages/egg/tsconfig.build.jsonplugins/jsonp/tsconfig.jsonplugins/mock/tsconfig.build.jsonpackages/extend2/tsconfig.build.jsonpackages/koa-static-cache/tsconfig.build.jsonplugins/mock/tsconfig.jsonpackages/supertest/tsconfig.build.jsonpackages/utils/tsconfig.jsonpackages/utils/tsconfig.build.jsonplugins/security/tsconfig.jsonplugins/tracer/tsconfig.jsontsconfig.build.jsonplugins/onerror/tsconfig.jsonpackages/errors/tsconfig.jsonplugins/multipart/tsconfig.jsonpackages/koa-static-cache/tsconfig.jsonplugins/session/tsconfig.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to plugins/*/tsdown.config.ts : All future plugins MUST use the standard tsdown configuration template (entry: 'src/**/*.ts', unbundle: true, dts: true, exports.devExports: true, unused.level: 'error')
Applied to files:
plugins/multipart/tsconfig.build.jsonplugins/schedule/tsconfig.jsonplugins/onerror/tsconfig.build.jsonplugins/i18n/tsconfig.build.jsonplugins/development/tsconfig.jsonplugins/development/tsconfig.build.jsonplugins/redis/tsconfig.jsonplugins/static/tsconfig.jsonplugins/tracer/tsconfig.jsontsconfig.build.jsonplugins/onerror/tsconfig.jsonplugins/multipart/tsconfig.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to packages/egg/src/config/{plugin.ts,config.default.ts} : Maintain built-in plugin configuration in src/config/plugin.ts and default framework configuration in src/config/config.default.ts
Applied to files:
plugins/i18n/tsconfig.build.jsonpackages/egg/tsconfig.jsonpackages/egg/tsconfig.build.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to plugins/**/src/**/*.ts : In plugin TypeScript sources, use ESM-style extensioned imports with .ts in relative imports
Applied to files:
plugins/development/tsconfig.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages/cookies,tools/egg-bin}/**/test/**/*.test.ts : cookies and egg-bin tests should be located at test/**/*.test.ts (Mocha)
Applied to files:
packages/egg/tsconfig.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages/!(cookies),plugins}/**/vitest.config.ts : Packages using Vitest should include a vitest.config.ts (all packages except cookies and egg-bin)
Applied to files:
packages/egg/tsconfig.json
📚 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
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsdown.config.ts : Each package should use tsdown for TypeScript builds (include a tsdown.config.ts)
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). (18)
- GitHub Check: Test (windows-latest, 24, 1/5)
- GitHub Check: Test (ubuntu-latest, 22, 5/5)
- GitHub Check: Test (ubuntu-latest, 22, 1/5)
- GitHub Check: Test (macos-latest, 24, 2/5)
- GitHub Check: Test (macos-latest, 22, 4/5)
- GitHub Check: Test (macos-latest, 24, 5/5)
- GitHub Check: Test (ubuntu-latest, 24, 2/5)
- GitHub Check: Test (windows-latest, 22, 5/5)
- GitHub Check: Test (windows-latest, 24, 4/5)
- GitHub Check: Test (windows-latest, 24, 3/5)
- GitHub Check: Test (macos-latest, 22, 5/5)
- GitHub Check: Test bin (windows-latest, 22, 4/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 1/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 5/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 3/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 4/5)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Cloudflare Pages: egg-v3
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-add mandated baseUrl setting.
Our TypeScript config guidelines require each package tsconfig to set "compilerOptions.baseUrl": "./" alongside the root extends. Since this file now lacks that block, it’s non-compliant. Please put the baseUrl override back.
{
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}[Based on learnings]
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "extends": "../../tsconfig.json", | |
| "compilerOptions": { | |
| "baseUrl": "./" | |
| } | |
| "extends": "../../tsconfig.json" | |
| } | |
| { | |
| "extends": "../../tsconfig.json", | |
| "compilerOptions": { | |
| "baseUrl": "./" | |
| } | |
| } |
🤖 Prompt for AI Agents
In packages/cookies/tsconfig.json around lines 1 to 3, the file extends the root
tsconfig but is missing the mandated package-level override for
compilerOptions.baseUrl; re-add a "compilerOptions" block that sets "baseUrl":
"./" (so keep the existing "extends": "../../tsconfig.json" and add the
compilerOptions.baseUrl override directly in this file).
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reintroduce "baseUrl": "./" per repo standard.
Every {packages,plugins,tools}/**/tsconfig.json must extend the root config and set "compilerOptions.baseUrl": "./". This file currently lacks the baseUrl override, so please add it back to stay compliant. [As per coding guidelines]
🤖 Prompt for AI Agents
In packages/core/tsconfig.json lines 1-3, the config extends the root but is
missing the required override for "compilerOptions.baseUrl"; update the file to
keep "extends": "../../tsconfig.json" and add a "compilerOptions" object that
sets "baseUrl": "./" (preserving any other compilerOptions if present) so the
package complies with the repo standard.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reintroduce baseUrl for this package
Our TypeScript guideline requires each package tsconfig.json to extend the root config and set "compilerOptions.baseUrl": "./". With only extends, this package now inherits the root ${configDir} setting, effectively pointing baseUrl at the monorepo root and breaking local path resolution. Add the compilerOptions block with baseUrl: "./" back.
As per coding guidelines
🤖 Prompt for AI Agents
In packages/egg/tsconfig.json around lines 1 to 3, the file currently only
extends the root tsconfig which causes this package to inherit the root
configDir baseUrl; add a compilerOptions block that sets "baseUrl": "./" so the
package resolves local paths correctly while still extending the root
configuration; ensure the compilerOptions object is merged into the existing
JSON and that the file remains valid JSON.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reinstate compilerOptions.baseUrl for package build.
Our config standard requires each package tsconfig to declare "baseUrl": "./" explicitly. Dropping it here conflicts with that policy and could break local module resolution. Please add it back. Based on learnings
{
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "extends": "../../tsconfig.json", | |
| "compilerOptions": { | |
| "baseUrl": "./" | |
| } | |
| "extends": "../../tsconfig.json" | |
| } | |
| { | |
| "extends": "../../tsconfig.json", | |
| "compilerOptions": { | |
| "baseUrl": "./" | |
| } | |
| } |
🤖 Prompt for AI Agents
In packages/extend2/tsconfig.json around lines 1 to 3, the package tsconfig no
longer declares compilerOptions.baseUrl which violates the repo standard and can
break local module resolution; update the file to add a compilerOptions block
with "baseUrl": "./" (e.g. add "compilerOptions": { "baseUrl": "./" }) so the
package explicitly sets baseUrl while preserving the existing "extends"
reference.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore package-level baseUrl override
Per the workspace guidelines, each sub-project tsconfig must still declare "compilerOptions": { "baseUrl": "./" }. With only the extends, this package now inherits the root baseUrl, which no longer meets that contract and risks path resolution drifting from the package root. Please reintroduce the local baseUrl block. Based on learnings
🤖 Prompt for AI Agents
In packages/koa-static-cache/tsconfig.json around lines 1 to 3, the file
currently only extends the root tsconfig and thus inherits the workspace
baseUrl; restore a package-level override by adding a "compilerOptions" object
with "baseUrl": "./" so the package resolves paths from its own root. Update the
JSON to keep the existing "extends" and add the local "compilerOptions": {
"baseUrl": "./" } entry.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add back the required "baseUrl": "./".
Per the repo’s TypeScript config guidelines, each plugin/package tsconfig must both extend "../../tsconfig.json" and explicitly set "compilerOptions.baseUrl": "./". Please restore that property here. [As per coding guidelines]
🤖 Prompt for AI Agents
In plugins/view/tsconfig.json around lines 1 to 3, the file extends
"../../tsconfig.json" but is missing the required "compilerOptions.baseUrl":
"./". Update the tsconfig to include a "compilerOptions" object with baseUrl set
to "./" (while still extending "../../tsconfig.json") so the plugin adheres to
the repo TypeScript config guidelines.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| } | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore compilerOptions.baseUrl for tool config.
Per the shared tsconfig guidance, each sub-project config must explicitly set "baseUrl": "./". Removing it here breaks that contract and can change module resolution. Please restore the block. Based on learnings
{
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "extends": "../../tsconfig.json", | |
| "compilerOptions": { | |
| "baseUrl": "./" | |
| } | |
| "extends": "../../tsconfig.json" | |
| } | |
| { | |
| "extends": "../../tsconfig.json", | |
| "compilerOptions": { | |
| "baseUrl": "./" | |
| } | |
| } |
🤖 Prompt for AI Agents
In tools/create-egg/tsconfig.json lines 1-3, the compilerOptions.baseUrl was
removed; restore an explicit "compilerOptions": { "baseUrl": "./" } block so
this sub-project explicitly sets baseUrl to "./" per shared tsconfig guidance,
ensuring correct module resolution and preserving the contract with the root
tsconfig.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "types": ["mocha", "node"] | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add back the mandated baseUrl override.
Tool tsconfig files must explicitly declare "compilerOptions": { "baseUrl": "./" } in addition to extending ../../tsconfig.json. Removing that block breaks the requirement. Please restore it.
{
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}[Based on learnings]
🤖 Prompt for AI Agents
In tools/egg-bin/tsconfig.json around lines 1 to 3, the mandated override for
compilerOptions.baseUrl was removed; restore a top-level "compilerOptions"
object that sets "baseUrl": "./" while keeping the existing "extends":
"../../tsconfig.json". Add only the minimal override (compilerOptions with
baseUrl "./") so the file extends the root tsconfig but enforces the local
baseUrl requirement.
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["test/fixtures/**/*.ts"] | ||
| "extends": "../../tsconfig.json" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reintroduce the required baseUrl block.
The documented rule for {packages,plugins,tools}/**/tsconfig.json is to extend the root config and explicitly set "compilerOptions.baseUrl": "./". This file currently omits the latter, so please add it back.
{
- "extends": "../../tsconfig.json"
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": "./"
+ }
}[Based on learnings]
🤖 Prompt for AI Agents
In tools/scripts/tsconfig.json around lines 1 to 3, the file extends the root
tsconfig but is missing the required compilerOptions.baseUrl setting; update the
JSON to include a compilerOptions block with "baseUrl": "./" (i.e., add
"compilerOptions": { "baseUrl": "./" }) so this package-specific tsconfig
explicitly sets baseUrl while still extending the root config.
| { | ||
| "extends": "@eggjs/tsconfig", | ||
| "compilerOptions": { | ||
| "baseUrl": "${configDir}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid baseUrl placeholder breaks module resolution
TypeScript treats "${configDir}" as a literal directory name, not a macro, so every package now points baseUrl to a non-existent ./${configDir} folder. Module resolution will fail as soon as a non-relative import relies on baseUrl. Restore the previous relative path (e.g., ".") so the compiler can resolve modules correctly.
- "baseUrl": "${configDir}",
+ "baseUrl": ".",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "baseUrl": "${configDir}", | |
| "baseUrl": ".", |
🤖 Prompt for AI Agents
In tsconfig.json around line 4, the "baseUrl" is set to the literal placeholder
"${configDir}" which causes TypeScript to resolve imports against a non-existent
"./${configDir}" directory; change the value back to a real relative path (for
example ".") so module resolution works correctly across packages by pointing
baseUrl to the project root or desired folder.
There was a problem hiding this 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 standardizes TypeScript configuration across the entire Eggjs monorepo by centralizing settings at the workspace root. Instead of maintaining individual configuration files with duplicated settings across 31+ sub-projects, all packages, plugins, and tools now extend from shared root configurations.
- Creates centralized
tsconfig.build.jsonat workspace root with standardized build settings - Simplifies all sub-project TypeScript configs to minimal extends-only format
- Updates tsdown dependency to version 0.15.6 in the catalog
Reviewed Changes
Copilot reviewed 61 out of 63 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.build.json | New root build configuration using ${configDir} for dynamic path resolution |
| packages/*/tsconfig.json | Simplified to only extend from root configuration |
| packages/*/tsconfig.build.json | Simplified to only extend from root build configuration |
| plugins/*/tsconfig.json | Simplified to only extend from root configuration |
| plugins/*/tsconfig.build.json | Simplified to only extend from root build configuration |
| tools/*/tsconfig.json | Simplified to only extend from root configuration |
| pnpm-workspace.yaml | Updated tsdown catalog version from 0.15.4 to 0.15.6 |
| packages/core/test/egg-ts.test.ts | Updated import paths from .js to .ts extensions |
| CLAUDE.md | Updated documentation to reflect new centralized TypeScript configuration pattern |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| import { utils } from '../src/index.js'; | ||
| import { createApp, getFilepath, type Application } from './helper.js'; | ||
| import { utils } from '../src/index.ts'; | ||
| import { createApp, getFilepath, type Application } from './helper.ts'; |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing with .ts extensions may cause runtime issues. TypeScript imports should typically use .js extensions or no extensions to ensure proper module resolution after compilation.
| import { createApp, getFilepath, type Application } from './helper.ts'; | |
| import { createApp, getFilepath, type Application } from './helper'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (27)
plugins/onerror/tsconfig.json (1)
1-3: Restore requiredcompilerOptions.baseUrloverride.Per the repo guidelines every sub-project tsconfig must both extend the root file and keep a local
"compilerOptions": { "baseUrl": "./" }. This change drops the mandated override, so please add it back.{ "extends": "../../tsconfig.json" + , + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/typebox-validate/tsconfig.json (1)
1-3: Reintroduce the mandatedbaseUrloverride.Each sub-project tsconfig must extend the root config and declare
"compilerOptions": { "baseUrl": "./" }. This file now lacks the required override; please restore it.{ "extends": "../../tsconfig.json" + , + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
packages/cluster/tsconfig.json (1)
1-3: Add back the requiredcompilerOptions.baseUrl.Guidelines insist every package tsconfig both extends
"../../tsconfig.json"and sets"compilerOptions": { "baseUrl": "./" }. The override was removed here—please put it back.{ "extends": "../../tsconfig.json" + , + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/view/tsconfig.json (1)
1-3: Bring back"compilerOptions": { "baseUrl": "./" }.Our TypeScript config policy requires every plugin tsconfig to keep that local baseUrl override while extending the root config. Please restore it.
{ "extends": "../../tsconfig.json" + , + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
packages/cookies/tsconfig.json (1)
1-3: Re-add the localbaseUrloverride.Every package tsconfig must extend the root config and declare
"compilerOptions": { "baseUrl": "./" }. Since that block was dropped, the file is non-compliant—please restore it.{ "extends": "../../tsconfig.json" + , + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
packages/errors/tsconfig.json (1)
1-3: Restore"compilerOptions.baseUrl": "./"setting.Per the monorepo TS config rules, each package tsconfig must extend the root file and still declare a
"compilerOptions": { "baseUrl": "./" }block. Please add it back.{ "extends": "../../tsconfig.json" + , + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
packages/path-matching/tsconfig.json (1)
1-3: Reintroduce mandatorycompilerOptions.baseUrl.Dropping the local
baseUrlbreaks the repo rule that every sub-project tsconfig must both extend the root file and pin"baseUrl": "./". Please restore it.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/logrotator/tsconfig.json (1)
1-3: Restore requiredbaseUrloverride.Each plugin tsconfig must explicitly set
"compilerOptions": { "baseUrl": "./" }while extending the shared config. Add the block back to stay compliant.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
tools/create-egg/tsconfig.json (1)
1-3: Bring back the tool’sbaseUrlsetting.Repository guidance mandates every sub-project tsconfig declare
"baseUrl": "./". Reintroduce the compilerOptions block alongside the existing extend.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/tracer/tsconfig.json (1)
1-3: Add back the tracer pluginbaseUrl.The shared policy requires
"compilerOptions.baseUrl": "./"in every plugin tsconfig. Please restore that block while keeping the root extend.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/security/tsconfig.json (1)
1-3: Reinstate the security plugin’sbaseUrl.Per the monorepo standard, every plugin tsconfig must declare
"compilerOptions": { "baseUrl": "./" }. Please add the block back.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/i18n/tsconfig.json (1)
1-3: Restore the i18n plugin’sbaseUrl.Guidelines demand each plugin tsconfig explicitly set
"baseUrl": "./". Please reintroduce the compilerOptions block while extending the root config.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/schedule/tsconfig.json (1)
1-3: Put the schedule plugin back in compliance.This tsconfig must set
"compilerOptions": { "baseUrl": "./" }in addition to extending the shared root. Please restore the block.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/session/tsconfig.json (1)
1-3: Reintroduce the session pluginbaseUrl.Every sub-project tsconfig must explicitly keep
"compilerOptions.baseUrl": "./". Please add the compilerOptions block back.{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
packages/koa-static-cache/tsconfig.json (1)
1-3: Restore the package-localbaseUrl.Repo guidelines require every
{packages,plugins,tools}/**/tsconfig.jsonto both extend the root config and declare"compilerOptions": { "baseUrl": "./" }. Dropping that override here violates the policy and shifts module resolution away from the package root. Please add thecompilerOptions.baseUrlblock back. Based on learningsplugins/jsonp/tsconfig.json (1)
1-3: ReinstatecompilerOptions.baseUrlfor this plugin.Each plugin tsconfig must extend the root config and set
"baseUrl": "./"locally; otherwise imports resolve from the workspace root. Reintroduce the required block. Based on learningspackages/supertest/tsconfig.json (1)
1-3: Add back the mandatedbaseUrloverride.Per the monorepo config rules, every package tsconfig must keep
"compilerOptions": { "baseUrl": "./" }alongside theextends. Without it, path resolution targets the workspace root instead of the package. Please restore the block. Based on learningsplugins/watcher/tsconfig.json (1)
1-3: Bring back the watcher plugin’sbaseUrloverride.The documented requirement is that every sub-project tsconfig extends the root config and explicitly sets
"compilerOptions.baseUrl": "./". Please restore that entry to keep module resolution scoped correctly. Based on learningsplugins/multipart/tsconfig.json (1)
1-3: Restore the mandatorybaseUrlsetting.This plugin tsconfig now violates the standard that mandates
"compilerOptions": { "baseUrl": "./" }in addition to the rootextends. Please add the block back so paths resolve from the plugin root. Based on learningsplugins/redis/tsconfig.json (1)
1-3: ReintroducecompilerOptions.baseUrlfor the Redis plugin.Removing the
"baseUrl": "./"override conflicts with the enforced configuration contract for{packages,plugins,tools}/**/tsconfig.jsonand shifts module resolution. Please restore the compilerOptions block. Based on learningspackages/extend2/tsconfig.json (1)
1-3: Restore package-levelbaseUrl.Policy still requires each package tsconfig to declare
"compilerOptions.baseUrl": "./"; inheriting${configDir}from the root resolves to the repo root and breaks local module lookups. Please add back the local compilerOptions block. Based on learnings{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }plugins/static/tsconfig.json (1)
1-3: Keep the pluginbaseUrlscoped locally.Per the repo standard every plugin tsconfig must set
"compilerOptions.baseUrl": "./"; relying on the root’s${configDir}points resolution at the monorepo root and breaks plugin-relative imports. Please reintroduce the local compilerOptions block. Based on learnings{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }packages/router/tsconfig.json (1)
2-2: Reintroduce package-levelbaseUrl.Removing the local
"compilerOptions": { "baseUrl": "./" }violates our monorepo guideline and now forces this package to inherit the root"baseUrl": "${configDir}", which TypeScript treats as a literal path. That path does not exist, so any non-relative imports relying on the package root will stop resolving. Please restore the explicit baseUrl here.
As per coding guidelines{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }tsconfig.json (1)
4-4: Fix invalidbaseUrl.TypeScript does not interpolate
"${configDir}"; it treats it as a literal folder name. This makes the compiler look for./${configDir}and breaks every non-relative import across the repo. PointbaseUrlto a real directory (e.g.,".") instead.
As per coding guidelines- "baseUrl": "${configDir}", + "baseUrl": ".",packages/koa/tsconfig.json (1)
1-3: Restore package-localbaseUrl.Dropping the
compilerOptions.baseUrloverride now inherits the root setting (${configDir}), which resolves to the repo root and breaks this package’s absolute imports. It also violates the documented requirement that every sub-project tsconfig declares"compilerOptions": { "baseUrl": "./" }. Please add it back.{ "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
packages/utils/tsconfig.json (1)
1-3: ReintroducecompilerOptions.baseUrl.Without the local override this package inherits the root
${configDir}baseUrl, pointing resolution at the workspace root and breaking local absolute imports. Our tsconfig standards also mandate"baseUrl": "./"in every package config. Please restore it.{ "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./" + } }As per coding guidelines
plugins/development/tsconfig.json (1)
1-3: Restore plugin-localbaseUrlandstrict.Per repo guidelines, every sub-project tsconfig.json must both extend the root config and explicitly set
"compilerOptions": { "baseUrl": "./", "strict": true }. Leaving only theextendsmakes this plugin inherit the root${configDir}baseUrl, so module resolution will point at the monorepo root instead ofplugins/development, and strict mode is no longer enforced locally. Please add back the compilerOptions block with the expected values.
As per coding guidelines{ - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "strict": true + } }
📜 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 (62)
CLAUDE.md(3 hunks)packages/cluster/tsconfig.build.json(1 hunks)packages/cluster/tsconfig.json(1 hunks)packages/cookies/tsconfig.build.json(1 hunks)packages/cookies/tsconfig.json(1 hunks)packages/core/test/egg-ts.test.ts(1 hunks)packages/core/tsconfig.build.json(1 hunks)packages/core/tsconfig.json(0 hunks)packages/egg/tsconfig.build.json(1 hunks)packages/egg/tsconfig.json(0 hunks)packages/errors/tsconfig.json(1 hunks)packages/extend2/tsconfig.build.json(1 hunks)packages/extend2/tsconfig.json(1 hunks)packages/koa-static-cache/tsconfig.build.json(1 hunks)packages/koa-static-cache/tsconfig.json(1 hunks)packages/koa/tsconfig.build.json(1 hunks)packages/koa/tsconfig.json(1 hunks)packages/path-matching/tsconfig.json(1 hunks)packages/router/tsconfig.build.json(1 hunks)packages/router/tsconfig.json(1 hunks)packages/supertest/tsconfig.build.json(1 hunks)packages/supertest/tsconfig.json(1 hunks)packages/utils/tsconfig.build.json(1 hunks)packages/utils/tsconfig.json(1 hunks)plugins/development/tsconfig.build.json(1 hunks)plugins/development/tsconfig.json(1 hunks)plugins/i18n/tsconfig.build.json(1 hunks)plugins/i18n/tsconfig.json(1 hunks)plugins/jsonp/tsconfig.build.json(1 hunks)plugins/jsonp/tsconfig.json(1 hunks)plugins/logrotator/tsconfig.build.json(1 hunks)plugins/logrotator/tsconfig.json(1 hunks)plugins/mock/tsconfig.build.json(1 hunks)plugins/mock/tsconfig.json(0 hunks)plugins/multipart/tsconfig.build.json(1 hunks)plugins/multipart/tsconfig.json(1 hunks)plugins/onerror/tsconfig.build.json(1 hunks)plugins/onerror/tsconfig.json(1 hunks)plugins/redis/tsconfig.build.json(1 hunks)plugins/redis/tsconfig.json(1 hunks)plugins/schedule/tsconfig.build.json(1 hunks)plugins/schedule/tsconfig.json(1 hunks)plugins/security/tsconfig.build.json(1 hunks)plugins/security/tsconfig.json(1 hunks)plugins/session/tsconfig.build.json(1 hunks)plugins/session/tsconfig.json(1 hunks)plugins/static/tsconfig.build.json(1 hunks)plugins/static/tsconfig.json(1 hunks)plugins/tracer/tsconfig.build.json(1 hunks)plugins/tracer/tsconfig.json(1 hunks)plugins/typebox-validate/tsconfig.build.json(1 hunks)plugins/typebox-validate/tsconfig.json(1 hunks)plugins/view/tsconfig.build.json(1 hunks)plugins/view/tsconfig.json(1 hunks)plugins/watcher/tsconfig.build.json(1 hunks)plugins/watcher/tsconfig.json(1 hunks)pnpm-workspace.yaml(1 hunks)tools/create-egg/tsconfig.json(1 hunks)tools/egg-bin/tsconfig.json(0 hunks)tools/scripts/tsconfig.json(0 hunks)tsconfig.build.json(1 hunks)tsconfig.json(1 hunks)
💤 Files with no reviewable changes (5)
- packages/egg/tsconfig.json
- tools/scripts/tsconfig.json
- plugins/mock/tsconfig.json
- packages/core/tsconfig.json
- tools/egg-bin/tsconfig.json
🧰 Additional context used
📓 Path-based instructions (11)
plugins/**
📄 CodeRabbit inference engine (CLAUDE.md)
All Egg framework plugins must be placed under the plugins/ directory
Files:
plugins/security/tsconfig.build.jsonplugins/onerror/tsconfig.jsonplugins/onerror/tsconfig.build.jsonplugins/mock/tsconfig.build.jsonplugins/watcher/tsconfig.jsonplugins/static/tsconfig.build.jsonplugins/static/tsconfig.jsonplugins/logrotator/tsconfig.jsonplugins/typebox-validate/tsconfig.build.jsonplugins/multipart/tsconfig.jsonplugins/schedule/tsconfig.build.jsonplugins/view/tsconfig.build.jsonplugins/watcher/tsconfig.build.jsonplugins/session/tsconfig.jsonplugins/typebox-validate/tsconfig.jsonplugins/i18n/tsconfig.jsonplugins/i18n/tsconfig.build.jsonplugins/session/tsconfig.build.jsonplugins/logrotator/tsconfig.build.jsonplugins/schedule/tsconfig.jsonplugins/redis/tsconfig.jsonplugins/tracer/tsconfig.build.jsonplugins/jsonp/tsconfig.build.jsonplugins/multipart/tsconfig.build.jsonplugins/view/tsconfig.jsonplugins/jsonp/tsconfig.jsonplugins/security/tsconfig.jsonplugins/development/tsconfig.jsonplugins/tracer/tsconfig.jsonplugins/development/tsconfig.build.jsonplugins/redis/tsconfig.build.json
{packages,plugins,tools}/**/tsconfig.json
📄 CodeRabbit inference engine (CLAUDE.md)
{packages,plugins,tools}/**/tsconfig.json: All sub-project tsconfig.json files MUST extend the root tsconfig.json using "extends": "../../tsconfig.json" and set "compilerOptions.baseUrl": "./"
Enable TypeScript strict mode in all packages ("compilerOptions.strict": true)
Files:
plugins/onerror/tsconfig.jsonplugins/watcher/tsconfig.jsonpackages/koa-static-cache/tsconfig.jsonplugins/static/tsconfig.jsonpackages/router/tsconfig.jsonplugins/logrotator/tsconfig.jsonplugins/multipart/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/extend2/tsconfig.jsonplugins/session/tsconfig.jsonplugins/typebox-validate/tsconfig.jsonplugins/i18n/tsconfig.jsonplugins/schedule/tsconfig.jsonplugins/redis/tsconfig.jsonplugins/view/tsconfig.jsonplugins/jsonp/tsconfig.jsonplugins/security/tsconfig.jsonpackages/supertest/tsconfig.jsonpackages/errors/tsconfig.jsontools/create-egg/tsconfig.jsonplugins/development/tsconfig.jsonplugins/tracer/tsconfig.jsonpackages/koa/tsconfig.jsonpackages/utils/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/path-matching/tsconfig.json
packages/*/tsconfig.json
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
All sub-project tsconfig.json files must extend from the root via "extends": "../../tsconfig.json"
Files:
packages/koa-static-cache/tsconfig.jsonpackages/router/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/extend2/tsconfig.jsonpackages/supertest/tsconfig.jsonpackages/errors/tsconfig.jsonpackages/koa/tsconfig.jsonpackages/utils/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/path-matching/tsconfig.json
{tsconfig.json,packages/*/tsconfig.json}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Enable strict TypeScript mode across all packages
Files:
packages/koa-static-cache/tsconfig.jsonpackages/router/tsconfig.jsonpackages/cookies/tsconfig.jsonpackages/extend2/tsconfig.jsontsconfig.jsonpackages/supertest/tsconfig.jsonpackages/errors/tsconfig.jsonpackages/koa/tsconfig.jsonpackages/utils/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/path-matching/tsconfig.json
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:"
Use pnpm catalog mode with dependencies defined once in pnpm-workspace.yaml
Files:
pnpm-workspace.yaml
tsconfig.json
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Root tsconfig.json must include all packages in the references array
Files:
tsconfig.json
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/core/test/egg-ts.test.ts
**/*.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:
packages/core/test/egg-ts.test.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:
packages/core/test/egg-ts.test.ts
{packages/!(cookies),plugins}/**/test/**/*.test.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Test files should follow the pattern test/**/*.test.ts and use Vitest APIs (import { describe, it } from 'vitest')
Files:
packages/core/test/egg-ts.test.ts
{packages,plugins}/**/test/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use Node.js built-in assert module for assertions in tests
Files:
packages/core/test/egg-ts.test.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsdown.config.ts : Each package should use tsdown for TypeScript builds (include a tsdown.config.ts)
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsconfig.json : All sub-project tsconfig.json files MUST extend the root tsconfig.json using "extends": "../../tsconfig.json" and set "compilerOptions.baseUrl": "./"
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/*/tsconfig.json : All sub-project tsconfig.json files must extend from the root via "extends": "../../tsconfig.json"
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to plugins/*/tsdown.config.ts : All future plugins MUST use the standard tsdown configuration template (entry: 'src/**/*.ts', unbundle: true, dts: true, exports.devExports: true, unused.level: 'error')
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsconfig.json : Enable TypeScript strict mode in all packages ("compilerOptions.strict": true)
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsconfig.json : All sub-project tsconfig.json files MUST extend the root tsconfig.json using "extends": "../../tsconfig.json" and set "compilerOptions.baseUrl": "./"
Applied to files:
plugins/security/tsconfig.build.jsonplugins/onerror/tsconfig.jsonplugins/onerror/tsconfig.build.jsonplugins/mock/tsconfig.build.jsonplugins/watcher/tsconfig.jsonpackages/koa/tsconfig.build.jsonplugins/static/tsconfig.build.jsonpackages/koa-static-cache/tsconfig.jsonplugins/static/tsconfig.jsonpackages/router/tsconfig.jsonplugins/logrotator/tsconfig.jsonplugins/typebox-validate/tsconfig.build.jsonpackages/egg/tsconfig.build.jsonpackages/supertest/tsconfig.build.jsonplugins/multipart/tsconfig.jsonpackages/cookies/tsconfig.jsonplugins/schedule/tsconfig.build.jsonpackages/extend2/tsconfig.jsonplugins/view/tsconfig.build.jsonplugins/watcher/tsconfig.build.jsonpackages/router/tsconfig.build.jsonpackages/cluster/tsconfig.build.jsontsconfig.jsonplugins/session/tsconfig.jsonplugins/typebox-validate/tsconfig.jsonplugins/i18n/tsconfig.jsonpackages/extend2/tsconfig.build.jsonplugins/i18n/tsconfig.build.jsonplugins/session/tsconfig.build.jsonplugins/logrotator/tsconfig.build.jsonplugins/schedule/tsconfig.jsonpackages/utils/tsconfig.build.jsonplugins/redis/tsconfig.jsonplugins/tracer/tsconfig.build.jsonplugins/jsonp/tsconfig.build.jsonplugins/multipart/tsconfig.build.jsonplugins/view/tsconfig.jsonplugins/jsonp/tsconfig.jsonplugins/security/tsconfig.jsonpackages/supertest/tsconfig.jsonpackages/errors/tsconfig.jsontools/create-egg/tsconfig.jsonplugins/development/tsconfig.jsontsconfig.build.jsonplugins/tracer/tsconfig.jsonCLAUDE.mdpackages/koa/tsconfig.jsonpackages/koa-static-cache/tsconfig.build.jsonplugins/development/tsconfig.build.jsonpackages/utils/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/core/tsconfig.build.jsonpackages/cookies/tsconfig.build.jsonpackages/path-matching/tsconfig.jsonplugins/redis/tsconfig.build.json
📚 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/*/tsconfig.json : All sub-project tsconfig.json files must extend from the root via "extends": "../../tsconfig.json"
Applied to files:
plugins/security/tsconfig.build.jsonplugins/onerror/tsconfig.jsonplugins/onerror/tsconfig.build.jsonplugins/mock/tsconfig.build.jsonplugins/watcher/tsconfig.jsonpackages/koa/tsconfig.build.jsonplugins/static/tsconfig.build.jsonpackages/koa-static-cache/tsconfig.jsonplugins/static/tsconfig.jsonpackages/router/tsconfig.jsonplugins/logrotator/tsconfig.jsonplugins/typebox-validate/tsconfig.build.jsonpackages/egg/tsconfig.build.jsonpackages/supertest/tsconfig.build.jsonplugins/multipart/tsconfig.jsonpackages/cookies/tsconfig.jsonplugins/schedule/tsconfig.build.jsonpackages/extend2/tsconfig.jsonplugins/view/tsconfig.build.jsonplugins/watcher/tsconfig.build.jsonpackages/router/tsconfig.build.jsonpackages/cluster/tsconfig.build.jsonplugins/session/tsconfig.jsonplugins/typebox-validate/tsconfig.jsonplugins/i18n/tsconfig.jsonpackages/extend2/tsconfig.build.jsonplugins/i18n/tsconfig.build.jsonplugins/session/tsconfig.build.jsonplugins/logrotator/tsconfig.build.jsonplugins/schedule/tsconfig.jsonpackages/utils/tsconfig.build.jsonplugins/redis/tsconfig.jsonplugins/tracer/tsconfig.build.jsonplugins/jsonp/tsconfig.build.jsonplugins/multipart/tsconfig.build.jsonplugins/view/tsconfig.jsonplugins/jsonp/tsconfig.jsonplugins/security/tsconfig.jsonpackages/supertest/tsconfig.jsonpackages/errors/tsconfig.jsontools/create-egg/tsconfig.jsonplugins/development/tsconfig.jsontsconfig.build.jsonplugins/tracer/tsconfig.jsonCLAUDE.mdpackages/koa/tsconfig.jsonpackages/koa-static-cache/tsconfig.build.jsonplugins/development/tsconfig.build.jsonpackages/utils/tsconfig.jsonpackages/cluster/tsconfig.jsonpackages/core/tsconfig.build.jsonpackages/cookies/tsconfig.build.jsonpackages/path-matching/tsconfig.jsonplugins/redis/tsconfig.build.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to plugins/*/tsdown.config.ts : All future plugins MUST use the standard tsdown configuration template (entry: 'src/**/*.ts', unbundle: true, dts: true, exports.devExports: true, unused.level: 'error')
Applied to files:
plugins/onerror/tsconfig.jsonplugins/onerror/tsconfig.build.jsonplugins/static/tsconfig.jsonplugins/logrotator/tsconfig.jsonplugins/multipart/tsconfig.jsonplugins/i18n/tsconfig.build.jsonplugins/schedule/tsconfig.jsonplugins/multipart/tsconfig.build.jsonplugins/view/tsconfig.jsonplugins/development/tsconfig.jsontsconfig.build.jsonplugins/development/tsconfig.build.json
📚 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
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to pnpm-workspace.yaml : Use pnpm catalog mode with dependencies defined once in pnpm-workspace.yaml
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages,plugins,tools}/**/tsdown.config.ts : Each package should use tsdown for TypeScript builds (include a tsdown.config.ts)
Applied to files:
pnpm-workspace.yaml
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to packages/egg/src/config/{plugin.ts,config.default.ts} : Maintain built-in plugin configuration in src/config/plugin.ts and default framework configuration in src/config/config.default.ts
Applied to files:
plugins/i18n/tsconfig.build.jsonCLAUDE.mdplugins/development/tsconfig.build.json
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to {packages/cookies,tools/egg-bin}/**/test/**/*.test.ts : cookies and egg-bin tests should be located at test/**/*.test.ts (Mocha)
Applied to files:
packages/core/test/egg-ts.test.ts
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to plugins/**/src/**/*.ts : In plugin TypeScript sources, use ESM-style extensioned imports with .ts in relative imports
Applied to files:
packages/core/test/egg-ts.test.tsplugins/development/tsconfig.build.json
📚 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 : Re-export types thoughtfully to keep the public API stable
Applied to files:
packages/core/test/egg-ts.test.ts
📚 Learning: 2025-10-07T03:38:30.682Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-07T03:38:30.682Z
Learning: Applies to plugins/*/package.json : All plugins must declare peerDependencies: { "egg": "workspace:*" }, include "files": ["dist"], and have scripts: build, typecheck, lint, test, prepublishOnly
Applied to files:
CLAUDE.md
📚 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 tsconfig.json : Root tsconfig.json must include all packages in the references array
Applied to files:
CLAUDE.md
⏰ 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). (19)
- GitHub Check: Test (macos-latest, 22, 2/5)
- GitHub Check: Test (macos-latest, 22, 5/5)
- GitHub Check: Test (windows-latest, 22, 3/5)
- GitHub Check: Test (windows-latest, 24, 4/5)
- GitHub Check: Test (ubuntu-latest, 22, 5/5)
- GitHub Check: Test (windows-latest, 22, 1/5)
- GitHub Check: Test (macos-latest, 24, 2/5)
- GitHub Check: Test (ubuntu-latest, 22, 3/5)
- GitHub Check: Test (macos-latest, 22, 4/5)
- GitHub Check: Test (macos-latest, 22, 3/5)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: Test bin (windows-latest, 22, 4/5)
- GitHub Check: Test bin (ubuntu-latest, 22, 1/5)
- GitHub Check: Test bin (ubuntu-latest, 22, 0/5)
- GitHub Check: Test bin (ubuntu-latest, 22, 3/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 4/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 3/5)
- GitHub Check: Test scripts (ubuntu-latest, 22, 5/5)
- GitHub Check: typecheck
🔇 Additional comments (1)
tsconfig.build.json (1)
1-14: Confirm TypeScript version supports${configDir}placeholders.This config relies on
${configDir}interpolation, which TypeScript introduced in 5.4. Please double-check that the workspace TypeScript (and build tooling like tsdown) resolves these placeholders; otherwiserootDir/outDirwill break.
Based on learnings
| // packages/*/tsconfig.build.json, plugins/*/tsconfig.build.json | ||
| { | ||
| "extends": "../../tsconfig.build.json" | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include tools tsconfig.build.json in the minimal pattern.
The snippet calls out packages and plugins, but this PR also standardizes tools/*/tsconfig.build.json to extend the root build config. Please add tools here so new tool packages follow the same rule.
🤖 Prompt for AI Agents
In CLAUDE.md around lines 521 to 525, the example pattern lists only packages/*
and plugins/* for tsconfig.build.json extension; update the snippet to also
include tools/* so tools/*/tsconfig.build.json extends the root build config.
Replace the snippet with a three-entry pattern (packages/*, plugins/*, tools/*)
so new tool packages inherit "../../tsconfig.build.json".
Simplify all sub-project tsconfig files to extend from workspace root configuration. This centralizes TypeScript settings and makes maintenance easier.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-5.html#the-configdir-template-variable-for-configuration-files
Changes:
This follows the pattern already established in packages/router and ensures consistent TypeScript configuration across all 31 sub-projects.
🤖 Generated with Claude Code
Summary by CodeRabbit