Skip to content

docs: document egg bundler tooling#5909

Open
killagu wants to merge 2 commits intonextfrom
agent/egg-doc/434f8fd6
Open

docs: document egg bundler tooling#5909
killagu wants to merge 2 commits intonextfrom
agent/egg-doc/434f8fd6

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented May 1, 2026

Summary

  • Document the new egg-bin bundle command in tools/egg-bin/README.md.
  • Add a package README for @eggjs/egg-bundler with usage, options, result fields, and runtime notes.
  • Record the bundler package in the LLM wiki index/log for future doc maintenance.

Validation

  • git diff --cached --check passed before commit.
  • pnpm exec oxfmt --check tools/egg-bin/README.md tools/egg-bundler/README.md wiki/index.md wiki/log.md wiki/packages/egg-bundler.md could not run because this worktree has no installed dependencies and oxfmt was not available.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for the new Egg Bundler tool for packaging Egg applications.
    • Documented the egg-bin bundle CLI and programmatic API, options (mode, framework, externals control), output/resolution behavior, and how to run generated artifacts.
    • Expanded externals guidance and artifact layout details.
    • Updated wiki index and changelog with bundler references.

Copilot AI review requested due to automatic review settings May 1, 2026 18:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9336a35b-870f-4d65-80df-3e483c45a0cf

📥 Commits

Reviewing files that changed from the base of the PR and between f7a32e0 and 4b80740.

📒 Files selected for processing (4)
  • tools/egg-bin/README.md
  • tools/egg-bundler/README.md
  • tools/egg-bundler/docs/output-structure.md
  • wiki/packages/egg-bundler.md
✅ Files skipped from review due to trivial changes (4)
  • tools/egg-bin/README.md
  • tools/egg-bundler/docs/output-structure.md
  • wiki/packages/egg-bundler.md
  • tools/egg-bundler/README.md

📝 Walkthrough

Walkthrough

Adds documentation and wiki pages for the new egg-bin bundle command and the @eggjs/egg-bundler package, documenting CLI usage, programmatic API, options, externals rules, output structure, and runtime invocation of the generated artifact.

Changes

Cohort / File(s) Summary
Egg-bin README
tools/egg-bin/README.md
Documented new egg-bin bundle script, CLI examples (--output, --mode, --framework), default output behavior, and runtime start instructions (node worker.js).
Egg-bundler package README
tools/egg-bundler/README.md
New README describing @eggjs/egg-bundler CLI and programmatic bundle() usage, config options (framework, mode, tegg, externals.*, pack.*), resolved output/manifest paths, and promise result shape.
Wiki: index & package page
wiki/index.md, wiki/packages/egg-bundler.md
Added “Egg Bundler” to wiki index and new package page detailing API (bundle(config), Bundler), control flow (manifest load, externals, synthetic worker, @utoo/pack, bundle-manifest.json) and observed behavior (outputDir resolution, mode, externals rules, tegg flag not applied).
Wiki: changelog
wiki/log.md
Appended 2026-05-02 log entry recording the egg bundler documentation and touched sources.
Docs: output structure
tools/egg-bundler/docs/output-structure.md
Expanded Externals section: explicitly names egg, @swc/helpers, root peerDependencies, @eggjs/*, native addons, and ESM-only packages as externals.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (CLI)
    participant EggBin as egg-bin (bundle)
    participant Bundler as `@eggjs/egg-bundler`
    participant Pack as `@utoo/pack`
    participant FS as Output Dir / worker.js

    Dev->>EggBin: run `egg-bin bundle` (args: --output, --mode, --framework)
    EggBin->>Bundler: invoke bundle(config)
    Bundler->>Bundler: load manifest (.egg/manifest.json) & resolve externals
    Bundler->>Pack: run `@utoo/pack` (build)
    Pack-->>Bundler: built artifacts
    Bundler->>FS: write output files & bundle-manifest.json
    FS-->>Dev: final outputDir and files (dev runs `node worker.js`)
Loading

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly Related PRs

Suggested Reviewers

  • jerryliang64

Poem

🐰 I packed an egg with careful paws,

docs and README, neat as laws.
A worker springs from output bright,
bundle done — hop, take flight! 🎉

🚥 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 'docs: document egg bundler tooling' directly and accurately summarizes the main change—adding documentation for the egg bundler tooling across multiple files.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/egg-doc/434f8fd6

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
Review rate limit: 6/8 reviews remaining, refill in 8 minutes and 3 seconds.

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 1, 2026

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4b80740
Status: ✅  Deploy successful!
Preview URL: https://063e7669.egg-cci.pages.dev
Branch Preview URL: https://agent-egg-doc-434f8fd6.egg-cci.pages.dev

View logs

Copy link
Copy Markdown
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 introduces the @eggjs/egg-bundler package and adds a bundle command to egg-bin, with documentation provided in READMEs and the project wiki. The feedback recommends removing the meta-commentary in the 'Inference' section of the wiki documentation to maintain a professional public-facing document.

Comment thread wiki/packages/egg-bundler.md Outdated
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 1, 2026

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4b80740
Status: ✅  Deploy successful!
Preview URL: https://b7403631.egg-v3.pages.dev
Branch Preview URL: https://agent-egg-doc-434f8fd6.egg-v3.pages.dev

View logs

Copy link
Copy Markdown
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 adds documentation for the new Egg bundling tooling, covering both the egg-bin bundle CLI surface and the underlying @eggjs/egg-bundler package, and records the package in the repository’s wiki index/log for future maintenance.

Changes:

  • Document egg-bin bundle usage and flags in tools/egg-bin/README.md.
  • Add tools/egg-bundler/README.md describing the programmatic API, options, results, and runtime behavior.
  • Add/record @eggjs/egg-bundler in the wiki index/log with a package page.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wiki/packages/egg-bundler.md Adds a wiki package page describing bundler surfaces/flow and behavior notes.
wiki/log.md Adds a log entry for the bundler documentation update.
wiki/index.md Adds the bundler page link to the wiki package index.
tools/egg-bundler/README.md Introduces a package README with API usage/options/results and runtime notes.
tools/egg-bin/README.md Documents the new bundle command and its CLI options.

Comment thread tools/egg-bin/README.md Outdated
Comment thread wiki/packages/egg-bundler.md Outdated
Comment thread tools/egg-bundler/README.md Outdated
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