-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(repo): switch package manager references from pnpm to utoo #5959
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
Open
killagu
wants to merge
15
commits into
eggjs:next
Choose a base branch
from
killagu:chore/replace-pnpm-with-utoo
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ab76d57
chore(repo): switch package manager references from pnpm to utoo
killagu 26b1a40
fix(ci,docs): drop unsupported PUBLINT_PACK value, sync utoo/node ver…
killagu 8a96e3e
chore(repo): address CodeRabbit review feedback
killagu a0c2ddf
fix(ci): replace unsupported `utoo -r pack` with per-package npm pack
killagu 585d981
fix(docs,scripts): use \`ut\` CLI alias and real script names
killagu 80b413b
fix(ci): restore pnpm for E2E pack step
killagu f88b87b
fix(ci): pin pnpm version in E2E setup-pnpm action
killagu 2a4c085
docs: fix script descriptions and prepend corepack bootstrap
killagu 38ee2ad
fix(ci): disable pnpm's packageManager strict check for the pack step
killagu e38249c
docs: fix \`ut test\` → \`ut run test\` and Dumi → VitePress reference
killagu 5f8b4c3
fix(ci): move pnpm setup after \`ut install\` to avoid SIGPIPE
killagu 842a307
ci: retry \`ut install\` up to 3 times for transient SIGPIPE (141)
killagu c522197
fix(ci): use correct env name for pnpm packageManager strict bypass
killagu 5c856b3
fix(ci): run \`pnpm install\` before \`pnpm -r pack\` so workspace de…
killagu 2a5ba86
perf(ci): shard tests for ≤60s per ubuntu job; PR runs ubuntu-only fa…
killagu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,30 +6,30 @@ | |
|
|
||
| Eggjs is a progressive Node.js framework for building enterprise-class server-side applications. Built on top of Koa.js, it provides a plugin system, conventions over configuration, and enterprise-grade features like clustering, logging, and security. | ||
|
|
||
| This is a **pnpm monorepo** with multiple packages using pnpm workspaces and catalog mode for centralized dependency management. | ||
| This is a **utoo monorepo** with multiple packages using utoo workspaces and catalog mode for centralized dependency management. | ||
|
|
||
| ## Prerequisites and Environment Setup | ||
|
|
||
| - **Node.js >= 20.19.0 required** - This is a hard requirement | ||
| - Enable pnpm first: `corepack enable pnpm` (installs pnpm v10.16.0) | ||
| - **Node.js >= 22.18.0 required** - This is a hard requirement | ||
| - Enable utoo first: `corepack enable utoo` (installs utoo v1.0.28) | ||
| - **NEVER CANCEL** any build or test commands - they can take several minutes to complete | ||
|
|
||
| ## Bootstrap and Build Process | ||
|
|
||
| **Always run these commands in sequence after fresh clone:** | ||
|
|
||
| ```bash | ||
| # 1. Enable pnpm (required first) | ||
| corepack enable pnpm | ||
| # 1. Enable utoo (required first) | ||
| corepack enable utoo | ||
|
|
||
| # 2. Install all dependencies - takes ~63 seconds. NEVER CANCEL. Set timeout to 120+ seconds. | ||
| pnpm install | ||
| ut install | ||
|
|
||
| # 3. Build all packages - takes ~14 seconds. NEVER CANCEL. Set timeout to 60+ seconds. | ||
| pnpm run build | ||
| ut run build | ||
|
|
||
| # 4. Run linting (optional but recommended) - takes ~2 seconds | ||
| pnpm run lint | ||
| ut run lint | ||
| ``` | ||
|
|
||
| ## Monorepo Structure | ||
|
|
@@ -48,51 +48,51 @@ pnpm run lint | |
| ### Supporting Directories | ||
|
|
||
| - **`examples/`** - Two example apps: `helloworld-commonjs` and `helloworld-typescript` (currently have runtime issues) | ||
| - **`site/`** - Documentation website built with Dumi | ||
| - **`site/`** - Documentation website built with VitePress | ||
|
|
||
| ## Essential Commands and Timing | ||
|
|
||
| ### Build Commands | ||
|
|
||
| - `pnpm run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.** | ||
| - `pnpm run clean` - Clean all dist directories | ||
| - `ut run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.** | ||
| - `ut run clean-dist` - Clean all dist directories | ||
|
|
||
| ### Testing Commands | ||
|
|
||
| - `pnpm run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.** | ||
| - `pnpm run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.** | ||
| - `pnpm run ci` - **Run test coverage + build (~2.1 minutes). NEVER CANCEL. Set timeout to 180+ seconds.** | ||
| - `ut run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.** | ||
| - `ut run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.** | ||
| - `ut run ci` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.** | ||
|
|
||
| ### Linting Commands | ||
|
|
||
| - `pnpm run lint` - Run oxlint across all packages (~2 seconds) | ||
| - `ut run lint` - Run oxlint across all packages (~2 seconds) | ||
|
|
||
| ### Documentation Commands | ||
|
|
||
| - `pnpm run site:dev` - Start documentation dev server at http://localhost:8000 | ||
| - `cd site && pnpm run build:skip` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.** | ||
| - `ut run site:dev` - Start documentation dev server (defaults to VitePress port 5173) | ||
|
Comment on lines
70
to
+72
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in e38249c — site/ description now correctly says VitePress (matches |
||
| - `ut run site:build` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.** | ||
|
|
||
| ### Example Applications (Currently Not Working) | ||
|
|
||
| - `pnpm run example:commonjs` - Start CommonJS example (has runtime issues) | ||
| - `pnpm run example:typescript` - Start TypeScript example (has runtime issues) | ||
| - `ut run example:dev:commonjs` - Start CommonJS example (has runtime issues) | ||
| - `ut run example:dev:typescript` - Start TypeScript example (has runtime issues) | ||
|
|
||
| ## Package-Specific Commands | ||
|
|
||
| Run commands for specific packages using `pnpm --filter=<package>`: | ||
| Run commands for specific packages using `ut --filter=<package>`: | ||
|
|
||
| ```bash | ||
| # Examples | ||
| pnpm --filter=egg run test | ||
| pnpm --filter=@eggjs/core run build | ||
| pnpm --filter=site run dev | ||
| ut --filter=egg run test | ||
| ut --filter=@eggjs/core run build | ||
| ut --filter=site run dev | ||
| ``` | ||
|
|
||
| ## Development Workflow | ||
|
|
||
| ### 1. Making Changes | ||
|
|
||
| - Always build packages first: `pnpm run build` | ||
| - Always build packages first: `ut run build` | ||
| - Work primarily in `packages/egg/src/` for core framework features | ||
| - Use TypeScript throughout - all packages are TypeScript-based | ||
| - Follow the existing directory conventions in `packages/egg/src/`: | ||
|
|
@@ -108,16 +108,16 @@ pnpm --filter=site run dev | |
|
|
||
| ```bash | ||
| # 1. Build all packages (required) | ||
| pnpm run build | ||
| ut run build | ||
|
|
||
| # 2. Run linting | ||
| pnpm run lint | ||
| ut run lint | ||
|
|
||
| # 3. Run tests (some failures are expected in fresh environment) | ||
| pnpm run test | ||
| ut run test | ||
|
|
||
| # 4. Test documentation site | ||
| pnpm run site:dev | ||
| ut run site:dev | ||
| ``` | ||
|
|
||
| ### 3. Testing Strategy | ||
|
|
@@ -162,7 +162,7 @@ pnpm run site:dev | |
| - **All sub-project tsconfig.json files MUST extend from root:** `"extends": "../../tsconfig.json"` | ||
| - Root tsconfig.json includes all packages in `references` array | ||
|
|
||
| ## pnpm Workspace & Catalog Dependencies | ||
| ## utoo Workspace & Catalog Dependencies | ||
|
|
||
| - Dependencies defined in `pnpm-workspace.yaml` catalog section | ||
| - Reference catalog entries: `"package-name": "catalog:"` | ||
|
|
@@ -179,7 +179,7 @@ pnpm run site:dev | |
|
|
||
| ### Build Issues | ||
|
|
||
| - Always run `pnpm run build` after making changes | ||
| - Always run `ut run build` after making changes | ||
| - TypeScript compilation errors will show clearly | ||
| - Build warnings are generally acceptable | ||
|
|
||
|
|
@@ -217,10 +217,10 @@ pnpm run site:dev | |
|
|
||
| After making changes, always verify: | ||
|
|
||
| 1. **Build Success**: `pnpm run build` completes without errors | ||
| 2. **Linting Passes**: `pnpm run lint` shows no new errors | ||
| 3. **Documentation Loads**: `pnpm run site:dev` starts successfully and site loads at http://localhost:8000 | ||
| 4. **Tests Run**: `pnpm run test` executes (some failures expected, focus on your changes) | ||
| 1. **Build Success**: `ut run build` completes without errors | ||
| 2. **Linting Passes**: `ut run lint` shows no new errors | ||
| 3. **Documentation Loads**: `ut run site:dev` starts successfully and the printed VitePress URL responds | ||
| 4. **Tests Run**: `ut run test` executes (some failures expected, focus on your changes) | ||
|
|
||
| **Remember**: This is a complex enterprise framework. Always build first, validate incrementally, and focus on the core packages (`egg`, `core`, `utils`) for most development work. | ||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.