Skip to content

feat: enable unplugin-unused for detecting unused dependencies#5580

Merged
fengmk2 merged 4 commits intonextfrom
enable-unplugin-unused
Oct 4, 2025
Merged

feat: enable unplugin-unused for detecting unused dependencies#5580
fengmk2 merged 4 commits intonextfrom
enable-unplugin-unused

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 4, 2025

  • Add unplugin-unused@^0.5.3 to pnpm catalog
  • Enable unused: true in all tsdown.config.ts files across the monorepo
  • Update koa-static-cache to use catalog mode for @types dependencies

This helps detect and prevent unused dependencies during the build process, improving package maintenance and reducing bundle sizes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enforced unused-code detection at error level across many packages for stricter quality checks.
    • Added a development plugin for unused-code analysis and registered it in the workspace catalog.
    • Removed an unused dependency and moved some packages to devDependencies; aligned versions via workspace catalog.
    • Updated CI to run a build during typecheck.
    • Added .egg/ to template .gitignore files.
    • No runtime or public API changes.

- Add unplugin-unused@^0.5.3 to pnpm catalog
- Enable unused: true in all tsdown.config.ts files across the monorepo
- Update koa-static-cache to use catalog mode for @types dependencies

This helps detect and prevent unused dependencies during the build process,
improving package maintenance and reducing bundle sizes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@fengmk2 fengmk2 requested a review from Copilot October 4, 2025 08:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables unused dependency detection across the Eggjs monorepo by integrating the unplugin-unused plugin. It adds unplugin-unused as a centralized dependency and enables unused dependency detection in all TypeScript build configurations.

Key changes:

  • Add unplugin-unused to the pnpm catalog for centralized dependency management
  • Enable unused: true in all tsdown.config.ts files across packages, plugins, tools, and examples
  • Remove detected unused dependency (globby) from mock plugin and update koa-static-cache to use catalog mode

Reviewed Changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pnpm-workspace.yaml Add unplugin-unused^0.5.3 to catalog dependencies
package.json Add unplugin-unused to root package devDependencies using catalog
Multiple tsdown.config.ts files Enable unused dependency detection across all build configurations
plugins/mock/package.json Remove unused globby dependency detected by the new tooling
packages/koa-static-cache/package.json Migrate @types dependencies to catalog mode for consistency
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 4, 2025

Walkthrough

Adds unplugin-unused to tooling and enables unused-code detection at error level across many tsdown.config.ts files, updates some package.json entries and pnpm catalog, and adds a CI "Run build" step to run pnpm build after typechecks.

Changes

Cohort / File(s) Summary
Root tooling & catalog
package.json, pnpm-workspace.yaml
Add devDependency unplugin-unused and add unplugin-unused: ^0.5.3 to pnpm catalog.
CI: typecheck workflow
.github/workflows/ci.yml
Add a "Run build" step to the typecheck workflow that runs pnpm run build after lint/dedupe/typecheck.
Tsdown: add unused error policy (many packages / plugins / tools)
packages/*/tsdown.config.ts, plugins/*/tsdown.config.ts, tools/*/tsdown.config.ts (see repo list)
Add unused: { level: 'error' } to numerous tsdown configuration objects (some with existing ignore arrays); extends config shape without other control-flow changes.
Tsdown: unused with ignore lists
packages/koa/tsdown.config.ts, packages/supertest/tsdown.config.ts, tools/egg-bin/tsdown.config.ts
Add unused object with level: 'error' and package-specific ignore arrays.
Tsdown: boolean -> object migration
plugins/multipart/tsdown.config.ts, plugins/session/tsdown.config.ts
Replace prior boolean unused (or implied) with unused: { level: 'error' }.
Package.json adjustments
packages/koa-static-cache/package.json, plugins/mock/package.json, tools/egg-bin/package.json
Koa-static-cache: switch two devDependencies to catalog: spec. Mock: remove globby dependency. tools/egg-bin: move @eggjs/supertest and @types/mocha from dependencies into devDependencies.
Template .gitignore updates
tools/create-egg/src/templates/*/_.gitignore
Add .egg/ to multiple template .gitignore files.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub Actions (CI)
  participant PNPM as pnpm
  participant Build as Build script
  participant Tsdown as tsdown
  participant Unused as unplugin-unused

  Dev->>GH: push / open PR
  GH->>PNPM: pnpm install / pnpm -s dedupe
  GH->>PNPM: pnpm run lint / typecheck
  GH->>Build: pnpm run build
  Build->>Tsdown: run tsdown per package
  Tsdown->>Unused: run unused analysis (level: error)
  Unused-->>Tsdown: report unused findings
  Tsdown-->>Build: return success/failure
  Build-->>GH: job status
  GH-->>Dev: notify result
  note right of Unused: Some packages include ignore lists
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • Dependency Dashboard #5439 — Renovate/dependency dashboard overlap: this PR adds unplugin-unused to tooling and updates pnpm catalog entries.

Possibly related PRs

Poem

In configs I nibble, tidy and spry,
I find stray exports and give them a try.
CI hums, build hops, no crumbs remain,
Catalog carrots lined up in a train.
A rabbit's small cheer for a repo made lean. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change of enabling the unplugin-unused plugin to detect unused dependencies, directly reflecting the main purpose of the pull request without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enable-unplugin-unused

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 206faf7 and 00d0587.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • tools/create-egg/src/templates/egg3-simple-js/_.gitignore (1 hunks)
  • tools/create-egg/src/templates/egg3-simple-ts/_.gitignore (1 hunks)
  • tools/create-egg/src/templates/egg3-tegg/_.gitignore (1 hunks)
  • tools/create-egg/src/templates/simple-ts/_.gitignore (1 hunks)
  • tools/create-egg/src/templates/tegg/_.gitignore (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • tools/create-egg/src/templates/tegg/_.gitignore
  • tools/create-egg/src/templates/egg3-simple-js/_.gitignore
  • tools/create-egg/src/templates/egg3-tegg/_.gitignore
⏰ 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). (15)
  • GitHub Check: Test (windows-latest, 22, packages)
  • GitHub Check: Test (windows-latest, 24, packages)
  • GitHub Check: Test (ubuntu-latest, 22, packages)
  • GitHub Check: Test (macos-latest, 22, plugins)
  • GitHub Check: Test (macos-latest, 24, packages)
  • GitHub Check: Test (windows-latest, 24, plugins)
  • GitHub Check: Test (windows-latest, 22, plugins)
  • GitHub Check: Test (macos-latest, 24, plugins)
  • GitHub Check: Test (ubuntu-latest, 24, packages)
  • GitHub Check: Test (ubuntu-latest, 24, plugins)
  • GitHub Check: Test (macos-latest, 22, packages)
  • GitHub Check: Test (ubuntu-latest, 22, plugins)
  • GitHub Check: Test egg-bin (ubuntu-latest, 22)
  • GitHub Check: Test egg-bin (windows-latest, 22)
  • GitHub Check: typecheck

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

❤️ Share

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

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

This pull request focuses on enhancing dependency management and build efficiency across the monorepo. It introduces a new plugin, unplugin-unused, to proactively identify and eliminate unused dependencies, which will lead to improved package maintenance and reduced bundle sizes. Additionally, it refines existing dependency declarations to leverage the pnpm catalog more effectively and removes an unnecessary dependency.

Highlights

  • Unused Dependency Detection: The unplugin-unused package has been integrated into the monorepo, added to the pnpm catalog, and enabled in all tsdown.config.ts files to detect and prevent unused dependencies.
  • Dependency Catalog Updates: Dependencies like @types/fs-readdir-recursive and @types/mime-types in koa-static-cache have been updated to utilize the pnpm catalog for consistent management.
  • Dependency Removal: The globby dependency has been removed from plugins/mock/package.json, indicating a cleanup of an identified unused package.
Using Gemini Code Assist

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

Invoking Gemini

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

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

Customization

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

Limitations & Feedback

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

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

Footnotes

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

@cloudflare-workers-and-pages
Copy link

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

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 00d0587
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

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

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 00d0587
Status:🚫  Build failed.

View logs

Copy link
Contributor

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

Choose a reason for hiding this comment

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

Code Review

This pull request effectively enables unplugin-unused across the monorepo to help detect and remove unused dependencies. The configuration changes in tsdown.config.ts files are applied consistently, and dependency management is improved by adding unplugin-unused to the pnpm catalog and updating a package to use catalog versions for its @types dependencies. The removal of the globby package demonstrates the immediate benefit of this new tooling. Overall, these changes are a valuable improvement for project maintenance and are well-implemented.

@codecov
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.06%. Comparing base (696e9b7) to head (00d0587).
⚠️ Report is 2 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #5580      +/-   ##
==========================================
- Coverage   81.08%   81.06%   -0.02%     
==========================================
  Files         209      209              
  Lines        5989     5989              
  Branches      876      873       -3     
==========================================
- Hits         4856     4855       -1     
- Misses       1059     1060       +1     
  Partials       74       74              

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

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

@socket-security
Copy link

socket-security bot commented Oct 4, 2025

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
plugins/mock/tsdown.config.ts (1)

4-8: Consider removing commented code.

The commented-out entry configuration should be removed if it's no longer needed, or restored with an explanatory comment if it's kept for reference.

Apply this diff to remove the commented code:

-  // entry: {
-  //   index: 'src/index.ts',
-  //   bootstrap: 'src/bootstrap.ts',
-  //   register: 'src/register.ts',
-  // },
   entry: 'src/**/*.ts',
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 00e396f and 206faf7.

📒 Files selected for processing (27)
  • packages/cluster/tsdown.config.ts (1 hunks)
  • packages/cookies/tsdown.config.ts (1 hunks)
  • packages/core/tsdown.config.ts (1 hunks)
  • packages/egg/tsdown.config.ts (1 hunks)
  • packages/extend2/tsdown.config.ts (1 hunks)
  • packages/koa-static-cache/tsdown.config.ts (1 hunks)
  • packages/koa/tsdown.config.ts (1 hunks)
  • packages/router/tsdown.config.ts (1 hunks)
  • packages/supertest/tsdown.config.ts (1 hunks)
  • packages/utils/tsdown.config.ts (1 hunks)
  • plugins/development/tsdown.config.ts (1 hunks)
  • plugins/i18n/tsdown.config.ts (1 hunks)
  • plugins/jsonp/tsdown.config.ts (1 hunks)
  • plugins/logrotator/tsdown.config.ts (1 hunks)
  • plugins/mock/tsdown.config.ts (1 hunks)
  • plugins/multipart/tsdown.config.ts (1 hunks)
  • plugins/onerror/tsdown.config.ts (1 hunks)
  • plugins/schedule/tsdown.config.ts (1 hunks)
  • plugins/security/tsdown.config.ts (1 hunks)
  • plugins/session/tsdown.config.ts (1 hunks)
  • plugins/static/tsdown.config.ts (1 hunks)
  • plugins/tracer/tsdown.config.ts (1 hunks)
  • plugins/view/tsdown.config.ts (1 hunks)
  • plugins/watcher/tsdown.config.ts (1 hunks)
  • tools/create-egg/tsdown.config.ts (1 hunks)
  • tools/egg-bin/package.json (1 hunks)
  • tools/egg-bin/tsdown.config.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/extend2/tsdown.config.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • plugins/i18n/tsdown.config.ts
  • packages/cluster/tsdown.config.ts
  • packages/core/tsdown.config.ts
  • packages/supertest/tsdown.config.ts
  • packages/egg/tsdown.config.ts
  • plugins/schedule/tsdown.config.ts
  • tools/create-egg/tsdown.config.ts
  • plugins/onerror/tsdown.config.ts
  • packages/utils/tsdown.config.ts
  • packages/koa-static-cache/tsdown.config.ts
  • plugins/session/tsdown.config.ts
🧰 Additional context used
📓 Path-based instructions (7)
**/*.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:

  • plugins/tracer/tsdown.config.ts
  • plugins/jsonp/tsdown.config.ts
  • packages/koa/tsdown.config.ts
  • plugins/view/tsdown.config.ts
  • plugins/mock/tsdown.config.ts
  • plugins/security/tsdown.config.ts
  • packages/router/tsdown.config.ts
  • packages/cookies/tsdown.config.ts
  • plugins/static/tsdown.config.ts
  • plugins/watcher/tsdown.config.ts
  • tools/egg-bin/tsdown.config.ts
  • plugins/multipart/tsdown.config.ts
  • plugins/development/tsdown.config.ts
  • plugins/logrotator/tsdown.config.ts
{packages,plugins,tools}/**/tsdown.config.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Each package should be configured with tsdown for unbundled ESM builds (have a tsdown.config.ts)

Files:

  • plugins/tracer/tsdown.config.ts
  • plugins/jsonp/tsdown.config.ts
  • packages/koa/tsdown.config.ts
  • plugins/view/tsdown.config.ts
  • plugins/mock/tsdown.config.ts
  • plugins/security/tsdown.config.ts
  • packages/router/tsdown.config.ts
  • packages/cookies/tsdown.config.ts
  • plugins/static/tsdown.config.ts
  • plugins/watcher/tsdown.config.ts
  • tools/egg-bin/tsdown.config.ts
  • plugins/multipart/tsdown.config.ts
  • plugins/development/tsdown.config.ts
  • plugins/logrotator/tsdown.config.ts
plugins/**/tsdown.config.ts

📄 CodeRabbit inference engine (CLAUDE.md)

All future plugins MUST use the standard tsdown configuration template (entry: 'src/**/*.ts', unbundle: true, dts: true, exports.devExports: true)

Files:

  • plugins/tracer/tsdown.config.ts
  • plugins/jsonp/tsdown.config.ts
  • plugins/view/tsdown.config.ts
  • plugins/mock/tsdown.config.ts
  • plugins/security/tsdown.config.ts
  • plugins/static/tsdown.config.ts
  • plugins/watcher/tsdown.config.ts
  • plugins/multipart/tsdown.config.ts
  • plugins/development/tsdown.config.ts
  • plugins/logrotator/tsdown.config.ts
plugins/**

📄 CodeRabbit inference engine (CLAUDE.md)

All Egg framework plugins must be located under the plugins/ directory and follow the standard plugin structure (src, test, package.json, tsdown.config.ts)

Files:

  • plugins/tracer/tsdown.config.ts
  • plugins/jsonp/tsdown.config.ts
  • plugins/view/tsdown.config.ts
  • plugins/mock/tsdown.config.ts
  • plugins/security/tsdown.config.ts
  • plugins/static/tsdown.config.ts
  • plugins/watcher/tsdown.config.ts
  • plugins/multipart/tsdown.config.ts
  • plugins/development/tsdown.config.ts
  • plugins/logrotator/tsdown.config.ts
packages/*/tsdown.config.ts

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

Each package must provide a tsdown.config.ts for unbundled ESM builds

Files:

  • packages/koa/tsdown.config.ts
  • packages/router/tsdown.config.ts
  • packages/cookies/tsdown.config.ts
{package.json,packages/**/package.json,plugins/**/package.json,tools/**/package.json}

📄 CodeRabbit inference engine (CLAUDE.md)

{package.json,packages/**/package.json,plugins/**/package.json,tools/**/package.json}: All packages must require Node.js >= 22.18.0 (set engines.node to ">=22.18.0" in package.json)
Use pnpm catalog mode: external dependencies referenced as "catalog:" and internal workspace deps as "workspace:*"

Files:

  • tools/egg-bin/package.json
{packages,plugins,tools}/**/package.json

📄 CodeRabbit inference engine (CLAUDE.md)

{packages,plugins,tools}/**/package.json: All packages must include a typecheck script running "tsc --noEmit"
All packages must use oxlint for linting with type awareness ("oxlint --type-aware") and provide a lint:fix script

Files:

  • tools/egg-bin/package.json
🧠 Learnings (7)
📚 Learning: 2025-09-28T08:01:03.941Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T08:01:03.941Z
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)

Applied to files:

  • plugins/tracer/tsdown.config.ts
  • plugins/jsonp/tsdown.config.ts
  • packages/koa/tsdown.config.ts
  • plugins/view/tsdown.config.ts
  • plugins/mock/tsdown.config.ts
  • plugins/security/tsdown.config.ts
  • packages/router/tsdown.config.ts
  • packages/cookies/tsdown.config.ts
  • plugins/static/tsdown.config.ts
  • plugins/watcher/tsdown.config.ts
  • plugins/multipart/tsdown.config.ts
  • plugins/development/tsdown.config.ts
  • plugins/logrotator/tsdown.config.ts
📚 Learning: 2025-09-28T08:01:03.941Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T08:01:03.941Z
Learning: Applies to {packages,plugins,tools}/**/tsdown.config.ts : Each package should be configured with tsdown for unbundled ESM builds (have a tsdown.config.ts)

Applied to files:

  • packages/koa/tsdown.config.ts
  • packages/cookies/tsdown.config.ts
  • plugins/static/tsdown.config.ts
📚 Learning: 2025-09-14T08:41:30.618Z
Learnt from: CR
PR: eggjs/egg#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-09-14T08:41:30.618Z
Learning: Applies to packages/*/tsdown.config.ts : Each package must provide a tsdown.config.ts for unbundled ESM builds

Applied to files:

  • packages/koa/tsdown.config.ts
  • packages/cookies/tsdown.config.ts
  • plugins/static/tsdown.config.ts
📚 Learning: 2025-09-28T08:01:03.941Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T08:01:03.941Z
Learning: Applies to {tools/egg-bin,packages/cookies}/test/**/*.test.ts : Only egg-bin and cookies use Mocha for tests

Applied to files:

  • tools/egg-bin/package.json
📚 Learning: 2025-09-28T08:01:03.941Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T08:01:03.941Z
Learning: Applies to plugins/*/package.json : All plugins must include egg in peerDependencies with version "workspace:*"

Applied to files:

  • tools/egg-bin/package.json
📚 Learning: 2025-09-28T08:01:03.941Z
Learnt from: CR
PR: eggjs/egg#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-28T08:01:03.941Z
Learning: Applies to {package.json,packages/**/package.json,plugins/**/package.json,tools/**/package.json} : Use pnpm catalog mode: external dependencies referenced as "catalog:" and internal workspace deps as "workspace:*"

Applied to files:

  • tools/egg-bin/package.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:

  • tools/egg-bin/package.json
🪛 GitHub Actions: CI
tools/egg-bin/package.json

[error] 1-1: Cannot install with 'frozen-lockfile' because pnpm-lock.yaml is not up to date with tools/egg-bin/package.json.

🔇 Additional comments (14)
plugins/jsonp/tsdown.config.ts (1)

7-9: LGTM! Consistent unused dependency detection enabled.

The addition of unused: { level: 'error' } aligns with the PR's objective to detect unused dependencies during the build process. The configuration follows the standard plugin template and is consistent with changes across the monorepo.

plugins/development/tsdown.config.ts (1)

7-9: LGTM! Configuration change consistent with monorepo-wide pattern.

packages/cookies/tsdown.config.ts (1)

9-11: LGTM! Unused detection enabled for package.

plugins/watcher/tsdown.config.ts (1)

7-9: LGTM! Configuration follows monorepo-wide pattern.

plugins/static/tsdown.config.ts (1)

7-9: LGTM! Unused dependency detection enabled.

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

7-9: LGTM! Configuration change consistent with PR objectives.

tools/egg-bin/tsdown.config.ts (1)

9-12: LGTM! Good use of ignore list for intentional exceptions.

The addition of unused: { level: 'error', ignore: ['utility'] } appropriately excludes the utility package from unused checks. This is a good practice for dependencies that are legitimately used but might be indirectly referenced or dynamically loaded.

plugins/tracer/tsdown.config.ts (1)

7-9: LGTM! Final configuration change completes monorepo-wide unused detection.

packages/router/tsdown.config.ts (1)

7-9: LGTM!

The unused dependency detection is correctly configured with error level, aligning with the PR objective to detect and prevent unused dependencies.

plugins/logrotator/tsdown.config.ts (1)

7-9: LGTM!

The configuration correctly follows the standard plugin template and enables strict unused dependency detection.

plugins/security/tsdown.config.ts (1)

7-9: LGTM!

The unused dependency detection is correctly configured, consistent with the monorepo-wide pattern.

plugins/multipart/tsdown.config.ts (1)

7-9: LGTM! Good upgrade from boolean to strict error level.

The change from unused: true to unused: { level: 'error' } provides more explicit control over unused dependency detection behavior.

plugins/mock/tsdown.config.ts (1)

12-14: LGTM!

The unused dependency detection is correctly configured with error level.

packages/koa/tsdown.config.ts (1)

8-11: LGTM — @types/content-disposition ignore is necessary The import of Options from content-disposition in packages/koa/src/response.ts relies on its type declarations, which the analyzer won’t detect.

@fengmk2 fengmk2 merged commit 5be8a53 into next Oct 4, 2025
29 of 34 checks passed
@fengmk2 fengmk2 deleted the enable-unplugin-unused branch October 4, 2025 14:20
@coderabbitai coderabbitai bot mentioned this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant