Skip to content

refactor(egg-bin): remove dead --no-tegg bundle flag#5982

Merged
killagu merged 1 commit into
nextfrom
worktree-remove-dead-no-tegg-flag
Jun 21, 2026
Merged

refactor(egg-bin): remove dead --no-tegg bundle flag#5982
killagu merged 1 commit into
nextfrom
worktree-remove-dead-no-tegg-flag

Conversation

@killagu

@killagu killagu commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Motivation

The bundle command's --no-tegg flag was plumbed from the CLI into @eggjs/egg-bundler's tegg option, but Bundler.run() never reads that option. tegg decoratedFile collection is driven entirely by whether the manifest (<baseDir>/.egg/manifest.json) contains a populated extensions.tegg block — passing --no-tegg did not change the bundle output at all.

So the flag was a dead no-op that only misled users into thinking they could disable tegg processing.

Scope

  • Remove the --no-tegg flag from tools/egg-bin/src/commands/bundle.ts (and the now-unused tegg field it passed through, plus the debug arg).
  • Remove the tegg?: boolean option from BundlerConfig in tools/egg-bundler/src/index.ts (it was never consumed by the bundler).
  • Drop the README note that already documented the flag as "not applied by the current bundler".
  • Remove the related tegg: assertions and --no-tegg arg from tools/egg-bin/test/commands/bundle.test.ts.

If a real "force-skip tegg" escape hatch is ever needed, it should be wired properly into Bundler.run() rather than left as an unconsumed option.

Test evidence

  • vitest run test/commands/bundle.test.ts → 4 passed
  • tsgo --noEmit clean for both egg-bin and egg-bundler

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Removed --no-tegg CLI flag documentation from bundle command options.
  • Refactor

    • The --no-tegg CLI flag has been removed from the bundle command.
    • The tegg configuration option is no longer supported in the bundler configuration.

The `--no-tegg` flag was plumbed from the CLI into egg-bundler's `tegg`
option, but `Bundler.run()` never reads that option. tegg decoratedFile
collection is driven entirely by whether the manifest contains an
`extensions.tegg` block, so the flag was a no-op — passing it changed
nothing in the bundle output and only misled users.

Remove the flag, its `tegg` option on `BundlerConfig`, the README note,
and the related test assertions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 21, 2026 02:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b257d999-59e9-42b1-b43d-0e43d7568e26

📥 Commits

Reviewing files that changed from the base of the PR and between 6be44d2 and 7d3d1c5.

📒 Files selected for processing (4)
  • tools/egg-bin/README.md
  • tools/egg-bin/src/commands/bundle.ts
  • tools/egg-bin/test/commands/bundle.test.ts
  • tools/egg-bundler/src/index.ts
💤 Files with no reviewable changes (3)
  • tools/egg-bundler/src/index.ts
  • tools/egg-bin/README.md
  • tools/egg-bin/test/commands/bundle.test.ts

📝 Walkthrough

Walkthrough

Removes the --no-tegg CLI flag from the bundle command. The flag declaration is deleted from Bundle.flags, the derived tegg boolean is no longer passed to @eggjs/egg-bundler, the BundlerConfig interface drops the tegg property, and the README and tests are updated to match.

Changes

Remove --no-tegg from bundle pipeline

Layer / File(s) Summary
Remove tegg from BundlerConfig interface
tools/egg-bundler/src/index.ts
Removes the optional tegg?: boolean property from the BundlerConfig interface.
Remove --no-tegg flag from Bundle command, docs, and tests
tools/egg-bin/src/commands/bundle.ts, tools/egg-bin/README.md, tools/egg-bin/test/commands/bundle.test.ts
Deletes the no-tegg flag from Bundle.flags, drops tegg from the debug log and bundle() call in run(), removes the --no-tegg README entry, and removes tegg: true/false expectations from tests.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • eggjs/egg#5888: Directly inverse — this PR reverses the --no-tegg flag and tegg option that was originally introduced in that PR's bundle subcommand implementation.

Poem

🐇 Hippity-hop, a flag hops away,
--no-tegg had nothing left to say.
The bundler shed its boolean coat,
One less option, one less note.
Simpler configs make this rabbit's day! 🥚

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing a dead/non-functional --no-tegg flag from the bundle command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-remove-dead-no-tegg-flag

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 gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 removes the unused and unimplemented --no-tegg CLI flag and its corresponding tegg configuration option from the bundler, documentation, and tests. I have no feedback to provide as there are no review comments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d3d1c5
Status: ✅  Deploy successful!
Preview URL: https://e3dc1599.egg-cci.pages.dev
Branch Preview URL: https://worktree-remove-dead-no-tegg.egg-cci.pages.dev

View logs

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.60%. Comparing base (4f49d4b) to head (7d3d1c5).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #5982   +/-   ##
=======================================
  Coverage   85.59%   85.60%           
=======================================
  Files         669      669           
  Lines       19892    19904   +12     
  Branches     3942     3947    +5     
=======================================
+ Hits        17026    17038   +12     
  Misses       2478     2478           
  Partials      388      388           

☔ View full report in Codecov by Harness.
📢 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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d3d1c5
Status: ✅  Deploy successful!
Preview URL: https://a95b0d3c.egg-v3.pages.dev
Branch Preview URL: https://worktree-remove-dead-no-tegg.egg-v3.pages.dev

View logs

@killagu killagu merged commit b6e0776 into next Jun 21, 2026
26 checks passed
@killagu killagu deleted the worktree-remove-dead-no-tegg-flag branch June 21, 2026 04:17
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.

2 participants