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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 52 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ The framework follows a specific loading order:

- **`pnpm-workspace.yaml`** - pnpm workspace configuration with catalog dependencies
- **`package.json`** - Root monorepo configuration with pnpm scripts
- **`tsconfig.json`** - Root TypeScript configuration for all packages (extends @eggjs/tsconfig)
- **`tsconfig.build.json`** - Root build configuration (extends tsconfig.json)
- **`packages/egg/package.json`** - Main egg package with hybrid CommonJS/ESM exports
- **`packages/egg/tsconfig.json`** - Extends @eggjs/tsconfig with strict mode enabled
- **`packages/egg/tsconfig.json`** - Extends workspace root tsconfig.json
- **`packages/egg/tsdown.config.ts`** - tsdown build configuration for unbundled ESM output
- **`packages/egg/src/config/plugin.ts`** - Built-in plugin configurations
- **`packages/egg/src/config/config.default.ts`** - Default framework configuration
Expand Down Expand Up @@ -276,7 +278,9 @@ The framework extends Koa's context with Egg-specific features:
- `plugins/` - for Egg plugins
- `tools/` - for development tools
2. Add package.json with workspace dependencies using `workspace:*`
3. Create tsconfig.json that extends from root: `"extends": "../../tsconfig.json"`
3. Create minimal TypeScript config files:
- `tsconfig.json` → `{"extends": "../../tsconfig.json"}`
- `tsconfig.build.json` → `{"extends": "../../tsconfig.build.json"}`
4. Add package reference to root tsconfig.json `references` array
5. Update root pnpm-workspace.yaml if needed (plugins/\* is already included)
6. Use `pnpm --filter=<package>` for package-specific commands
Expand Down Expand Up @@ -488,11 +492,52 @@ Tool packages (like egg-bin) should be placed in the `tools/` directory:

#### TypeScript Configuration Requirements

- **IMPORTANT: All sub-project tsconfig.json files MUST extend from the root project tsconfig.json**
- Use `"extends": "../../tsconfig.json"` in package tsconfig.json files
- Include `"baseUrl": "./"` in compilerOptions for proper path resolution
- Root tsconfig.json must include all packages in the `references` array
- This ensures consistent TypeScript configuration across the entire monorepo
**IMPORTANT: The monorepo uses a standardized TypeScript configuration pattern where all sub-projects extend from the workspace root.**

**Root Configuration Files:**

- `tsconfig.json` - Base TypeScript configuration for all packages
- Extends from `@eggjs/tsconfig` with common compiler options
- Uses `${configDir}` variable for dynamic path resolution
- Includes project `references` array listing all sub-packages
- Sets `composite: true` and `incremental: true` for project references
- `tsconfig.build.json` - Build-specific configuration
- Extends from root `tsconfig.json`
- Defines `rootDir` as `${configDir}/src` and `outDir` as `${configDir}/dist`
- Excludes test files, dist directories, and config files

**Sub-Project Configuration Pattern:**

All packages, plugins, and tools MUST follow this minimal pattern:

```json
// packages/*/tsconfig.json, plugins/*/tsconfig.json, tools/*/tsconfig.json
{
"extends": "../../tsconfig.json"
}
```

```json
// packages/*/tsconfig.build.json, plugins/*/tsconfig.build.json
{
"extends": "../../tsconfig.build.json"
}
```
Comment on lines +521 to +525
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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".


**Key Requirements:**

- **Keep it minimal** - Sub-project configs should ONLY contain the `extends` field
- **No additional options** - Don't add `compilerOptions`, `baseUrl`, or other settings
- **Centralized configuration** - All settings are managed at the workspace root
- **Use ${configDir}** - Root configs use this variable for per-package path resolution
- **Update references** - When adding new packages, add them to root tsconfig.json `references` array

This approach ensures:

- Consistent TypeScript configuration across all 31+ sub-projects
- Easy maintenance (change once at root, applies everywhere)
- Proper TypeScript project references for fast builds
- Clean and readable per-package configuration files

### Documentation

Expand Down
8 changes: 1 addition & 7 deletions packages/cluster/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/cluster/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
8 changes: 1 addition & 7 deletions packages/cookies/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/cookies/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Suggested change
{
"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).

4 changes: 2 additions & 2 deletions packages/core/test/egg-ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { mm } from 'mm';
import { request } from '@eggjs/supertest';
import coffee from 'coffee';

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';
Copy link

Copilot AI Oct 9, 2025

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.

Suggested change
import { createApp, getFilepath, type Application } from './helper.ts';
import { createApp, getFilepath, type Application } from './helper';

Copilot uses AI. Check for mistakes.

describe('test/egg-ts.test.ts', () => {
let app: Application | undefined;
Expand Down
8 changes: 1 addition & 7 deletions packages/core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts", "example"]
"extends": "../../tsconfig.build.json"
}
3 changes: 0 additions & 3 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
},
"exclude": ["test/fixtures/**/*.ts"]
}
8 changes: 1 addition & 7 deletions packages/egg/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
3 changes: 0 additions & 3 deletions packages/egg/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
},
"exclude": ["test/fixtures/**/*.ts"]
}
5 changes: 1 addition & 4 deletions packages/errors/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
8 changes: 1 addition & 7 deletions packages/extend2/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/extend2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Suggested change
{
"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.

8 changes: 1 addition & 7 deletions packages/koa-static-cache/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/koa-static-cache/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

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.

8 changes: 1 addition & 7 deletions packages/koa/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts", "example"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/koa/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
5 changes: 1 addition & 4 deletions packages/path-matching/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Reinstate required compilerOptions.baseUrl

Per the monorepo instructions, each package tsconfig.json must both extend the root config and specify "compilerOptions": { "baseUrl": "./" }. Please restore that block to keep this package compliant.

As per coding guidelines

 {
-  "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.

Suggested change
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
}
🤖 Prompt for AI Agents
In packages/path-matching/tsconfig.json around lines 1 to 3, the file currently
only extends the root tsconfig but is missing the required
compilerOptions.baseUrl; restore a "compilerOptions" block with "baseUrl": "./"
(keeping the existing "extends" line) so the package tsconfig both extends
../../tsconfig.json and explicitly sets baseUrl to "./" in JSON format.

8 changes: 1 addition & 7 deletions packages/router/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/router/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Restore per-package baseUrl requirement.

Guidelines for {packages,plugins,tools}/**/tsconfig.json mandate each config both extends "../../tsconfig.json" and keeps "compilerOptions": { "baseUrl": "./" }. Dropping the local baseUrl violates that rule and risks breaking tooling expecting the override. Please reintroduce it. [As per coding guidelines]

🤖 Prompt for AI Agents
In packages/router/tsconfig.json around lines 1 to 3, the config extends
"../../tsconfig.json" but is missing the required per-package
compilerOptions.baseUrl override; restore a "compilerOptions": { "baseUrl": "./"
} entry alongside the existing "extends" so the file both extends the root
tsconfig and explicitly sets baseUrl to "./" (do not modify other properties).

8 changes: 1 addition & 7 deletions packages/supertest/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/supertest/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
8 changes: 1 addition & 7 deletions packages/utils/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Restore compilerOptions.baseUrl

Per our tsconfig standards every package-level tsconfig.json must both extend the root config and declare "compilerOptions": { "baseUrl": "./" }. Dropping the local baseUrl breaks that contract and risks resolving modules relative to the repo root (especially now that the root config sets baseUrl with ${configDir}). Please add the compilerOptions.baseUrl block back in this file.

As per coding guidelines

🤖 Prompt for AI Agents
In packages/utils/tsconfig.json around lines 1 to 3, the file currently only
extends the root tsconfig and is missing the package-level
compilerOptions.baseUrl; restore the contract by adding a "compilerOptions"
object with "baseUrl": "./" to this file so module resolution remains local to
the package and not the repo root.

8 changes: 1 addition & 7 deletions plugins/development/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions plugins/development/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add back package-level baseUrl

Each plugin tsconfig.json must extend the root config and explicitly set "compilerOptions.baseUrl": "./". Removing the local baseUrl makes this plugin inherit the root ${configDir} value, so module lookups will resolve from the monorepo root instead of the plugin folder. Please restore the compilerOptions.baseUrl block.

As per coding guidelines

🤖 Prompt for AI Agents
In plugins/development/tsconfig.json lines 1-3, the local
compilerOptions.baseUrl was removed causing module resolution to inherit the
monorepo root; restore a compilerOptions block that sets "baseUrl": "./" (while
keeping the existing "extends": "../../tsconfig.json") so module lookups resolve
relative to the plugin folder rather than the repo root.

8 changes: 1 addition & 7 deletions plugins/i18n/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions plugins/i18n/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Bring back the per-plugin baseUrl.

The shared guidance for {packages,plugins,tools}/**/tsconfig.json says each must explicitly set "compilerOptions": { "baseUrl": "./" }. Dropping that block leaves this plugin out of compliance. Please restore it.

 {
-  "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.

Suggested change
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
}
🤖 Prompt for AI Agents
In plugins/i18n/tsconfig.json around lines 1 to 3, the file currently only
extends the root tsconfig and is missing the required per-plugin compilerOptions
baseUrl; restore a "compilerOptions": { "baseUrl": "./" } block alongside the
existing "extends" so the file explicitly sets baseUrl to "./" (preserve the
extends line and add the compilerOptions object immediately after it).

8 changes: 1 addition & 7 deletions plugins/jsonp/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions plugins/jsonp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Reintroduce package-level baseUrl.

Guidelines require every {packages,plugins,tools}/**/tsconfig.json to keep "compilerOptions.baseUrl": "./". Dropping it here violates that rule and risks module resolution drifting from package scope. Please add the block back. Based on learnings

 {
-  "extends": "../../tsconfig.json"
+  "extends": "../../tsconfig.json",
+  "compilerOptions": {
+    "baseUrl": "./"
+  }
 }
🤖 Prompt for AI Agents
In plugins/jsonp/tsconfig.json around lines 1 to 3, the file removed the
package-level compilerOptions.baseUrl setting; restore a "compilerOptions" block
that sets "baseUrl": "./" so the package-local module resolution is preserved
and follows repo guidelines, ensuring the tsconfig extends remains and you only
add the minimal compilerOptions.baseUrl entry.

8 changes: 1 addition & 7 deletions plugins/logrotator/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
5 changes: 1 addition & 4 deletions plugins/logrotator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
Comment on lines 1 to 3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Required baseUrl missing

This plugin tsconfig.json must define "compilerOptions": { "baseUrl": "./" } while extending the shared config. Please add the compilerOptions block back to satisfy the repository rule.

As per coding guidelines

 {
-  "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.

Suggested change
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
"extends": "../../tsconfig.json"
}
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
}
}
🤖 Prompt for AI Agents
In plugins/logrotator/tsconfig.json around lines 1 to 3, the file extends the
shared tsconfig but is missing the required "compilerOptions": { "baseUrl": "./"
} entry; update the file to keep the "extends": "../../tsconfig.json" and add a
"compilerOptions" block that sets "baseUrl" to "./" (merging with any inherited
options) so it satisfies the repository rule.

8 changes: 1 addition & 7 deletions plugins/mock/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./src",
"outDir": "./dist"
},
"exclude": ["test", "dist", "tsdown.config.ts", "vitest.config.ts"]
"extends": "../../tsconfig.build.json"
}
3 changes: 0 additions & 3 deletions plugins/mock/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./"
},
"exclude": ["test/fixtures/**/*.ts"]
}
Loading
Loading