You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(repo): switch package manager references from pnpm to utoo (#5963)
## Summary
- switch documented repository workflows from pnpm to utoo/ut
- update CI/release/E2E workflow commands for utoo install/build paths
- address review feedback from #5961 by making release install
retry-safe and making `ut create egg@beta` the primary package README
quickstart command
This supersedes #5961 because the local OAuth git push path cannot
update workflow files on the fork branch without `workflow` scope.
## Tests
- `ut install --from pnpm`
- `ut run fmtcheck -- .github/workflows/release.yml
packages/egg/README.md`
- `ut run lint`
## Notes
- `git commit` used `--no-verify` locally because the repo pre-commit
hook runs `oxlint --type-aware --fix` on a Markdown/YAML-only staged set
and fails with `No files found to lint`; full `ut run lint` passed.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated development and quickstart guides to reflect new monorepo
tooling workflow.
* Updated CI/CD workflows and build processes for new tooling.
* Refreshed command examples across all documentation and guides.
* **Chores**
* Node.js minimum version requirement increased to 22.18.0+.
* Monorepo tooling updated from `pnpm` to `utoo` (`ut` CLI).
* Development and build commands updated accordingly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+35-35Lines changed: 35 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,33 @@
6
6
7
7
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.
8
8
9
-
This is a **pnpm monorepo** with multiple packages using pnpm workspaces and catalog mode for centralized dependency management.
9
+
This is a **utoo monorepo** with multiple packages using utoo workspaces and catalog mode for centralized dependency management.
10
10
11
11
## Prerequisites and Environment Setup
12
12
13
13
-**Node.js >= 22.18.0 required** - This is a hard requirement
14
-
- Enable pnpm first: `corepack enable pnpm` (uses the `packageManager` version from `package.json`, currently pnpm v10.28.0)
14
+
- Enable utoo first: `corepack enable utoo`
15
15
-**NEVER CANCEL** any build or test commands - they can take several minutes to complete
16
16
17
17
## Bootstrap and Build Process
18
18
19
19
**Run these commands after a fresh clone:**
20
20
21
21
```bash
22
-
# 1. Enable pnpm (required first)
23
-
corepack enablepnpm
22
+
# 1. Enable utoo (required first)
23
+
corepack enableutoo
24
24
25
25
# 2. Install all dependencies - takes ~63 seconds. NEVER CANCEL. Set timeout to 120+ seconds.
26
-
pnpm install
26
+
ut install --from pnpm
27
27
28
-
# 3. Run pnpm run lint to check code quality across all packages - takes ~2 seconds
29
-
pnpm run lint
28
+
# 3. Run lint to check code quality across all packages - takes ~2 seconds
29
+
ut run lint
30
30
31
31
# 4. Build all packages when validating build output - takes ~14 seconds. NEVER CANCEL. Set timeout to 60+ seconds.
32
-
pnpm run build
32
+
ut run build
33
33
```
34
34
35
-
Run unit tests from a clean source tree, not immediately after `pnpm run build`.
35
+
Run unit tests from a clean source tree, not immediately after `ut run build`.
36
36
The main CI test job installs dependencies with `ut install --from pnpm` and
37
37
runs tests with `ut run ci`; it does not run `build` before tests.
38
38
@@ -52,44 +52,44 @@ runs tests with `ut run ci`; it does not run `build` before tests.
52
52
### Supporting Directories
53
53
54
54
-**`examples/`** - Two example apps: `helloworld-commonjs` and `helloworld-typescript` (currently have runtime issues)
55
-
-**`site/`** - Documentation website built with Dumi
55
+
-**`site/`** - Documentation website built with VitePress
56
56
57
57
## Essential Commands and Timing
58
58
59
59
### Build Commands
60
60
61
-
-`pnpm run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
62
-
-`pnpm run clean` - Clean all dist directories
61
+
-`ut run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
62
+
-`ut run clean-dist` - Clean all dist directories
63
63
64
64
### Testing Commands
65
65
66
-
-`pnpm run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
67
-
-`pnpm run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
68
-
-`pnpm run ci` - **Run tests with coverage (~2.1 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
66
+
-`ut run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
67
+
-`ut run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
68
+
-`ut run ci` - **Run tests with coverage (~2.1 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
69
69
70
70
### Linting Commands
71
71
72
-
-`pnpm run lint` - Run oxlint across all packages (~2 seconds)
72
+
-`ut run lint` - Run oxlint across all packages (~2 seconds)
73
73
74
74
### Documentation Commands
75
75
76
-
-`pnpm run site:dev` - Start documentation dev server at http://localhost:8000
77
-
-`cd site && pnpm run build:skip` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
76
+
-`ut run site:dev` - Start documentation dev server (defaults to VitePress port 5173)
77
+
-`ut run site:build` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
78
78
79
79
### Example Applications (Currently Not Working)
80
80
81
-
-`pnpm run example:commonjs` - Start CommonJS example (has runtime issues)
82
-
-`pnpm run example:typescript` - Start TypeScript example (has runtime issues)
81
+
-`ut run example:dev:commonjs` - Start CommonJS example (has runtime issues)
82
+
-`ut run example:dev:typescript` - Start TypeScript example (has runtime issues)
83
83
84
84
## Package-Specific Commands
85
85
86
-
Run commands for specific packages using `pnpm --filter=<package>`:
86
+
Run commands for specific packages using `ut --filter=<package>`:
87
87
88
88
```bash
89
89
# Examples
90
-
pnpm --filter=egg run test
91
-
pnpm --filter=@eggjs/core run build
92
-
pnpm --filter=site run dev
90
+
ut --filter=egg run test
91
+
ut --filter=@eggjs/core run build
92
+
ut --filter=site run dev
93
93
```
94
94
95
95
## Development Workflow
@@ -111,17 +111,17 @@ pnpm --filter=site run dev
111
111
**Always perform these validation steps after making changes:**
112
112
113
113
```bash
114
-
# 1. Run pnpm run lint to check code quality across all packages
115
-
pnpm run lint
114
+
# 1. Run lint to check code quality across all packages
115
+
ut run lint
116
116
117
117
# 2. Run tests from a clean tree (some failures are expected in fresh environment)
118
-
pnpm run test
118
+
ut run test
119
119
120
120
# 3. Build all packages when build output or packaging behavior is relevant
121
-
pnpm run build
121
+
ut run build
122
122
123
123
# 4. Test documentation site when docs changed
124
-
pnpm run site:dev
124
+
ut run site:dev
125
125
```
126
126
127
127
### 3. Testing Strategy
@@ -166,7 +166,7 @@ pnpm run site:dev
166
166
-**All sub-project tsconfig.json files MUST extend from root:**`"extends": "../../tsconfig.json"`
167
167
- Root tsconfig.json includes all packages in `references` array
168
168
169
-
## pnpm Workspace & Catalog Dependencies
169
+
## utoo Workspace & Catalog Dependencies
170
170
171
171
- Dependencies defined in `pnpm-workspace.yaml` catalog section
- Run `pnpm run build` when validating build output, package exports, or changes
190
+
- Run `ut run build` when validating build output, package exports, or changes
191
191
that affect generated artifacts.
192
192
- TypeScript compilation errors will show clearly
193
193
- Build warnings are generally acceptable
@@ -226,10 +226,10 @@ pnpm run site:dev
226
226
227
227
After making changes, always verify:
228
228
229
-
1.**Linting Passes**: `pnpm run lint` shows no new errors
230
-
2.**Tests Run From Clean Sources**: `pnpm run test` executes without stale build artifacts interfering
231
-
3.**Documentation Loads**: `pnpm run site:dev` starts successfully and site loads at http://localhost:8000
232
-
4.**Build Success When Relevant**: `pnpm run build` completes without errors
229
+
1.**Linting Passes**: `ut run lint` shows no new errors
230
+
2.**Tests Run From Clean Sources**: `ut run test` executes without stale build artifacts interfering
231
+
3.**Documentation Loads**: `ut run site:dev` starts successfully and the printed VitePress URL responds
232
+
4.**Build Success When Relevant**: `ut run build` completes without errors
233
233
234
234
**Remember**: This is a complex enterprise framework. Validate incrementally, keep unit tests isolated from stale build artifacts, and focus on the core packages (`egg`, `core`, `utils`) for most development work.
Copy file name to clipboardExpand all lines: AGENTS.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ If another agent-specific file exists, it should import or defer to this file fo
6
6
7
7
## Project Map
8
8
9
-
Egg is maintained as a pnpm monorepo.
9
+
Egg is maintained as a utoo monorepo.
10
10
11
11
-`packages/` contains core framework packages and shared internals.
12
12
-`plugins/` contains optional Egg integrations.
@@ -20,6 +20,7 @@ Egg is maintained as a pnpm monorepo.
20
20
21
21
The repository runs on [utoo](https://github.com/utooland/utoo) (`ut`); the workspace is still defined in `pnpm-workspace.yaml` (catalog mode), so `ut install` reads it via `--from pnpm`.
22
22
23
+
-`corepack enable utoo` enables utoo on a clean machine.
23
24
-`ut install --from pnpm` hydrates the workspace.
24
25
-`ut run build` builds all packages.
25
26
-`ut run test` runs the main test suite.
@@ -29,7 +30,7 @@ The repository runs on [utoo](https://github.com/utooland/utoo) (`ut`); the work
29
30
30
31
### Local CI
31
32
32
-
Run tests **without building first**. The CI workflow (`ut install → ut run ci`) never runs `build` before tests. If `dist/` directories exist from a prior build, tegg plugin tests will fail with `duplicate proto` errors because globby scans both `src/*.ts` and `dist/*.js`, loading the same decorated class twice.
33
+
Run tests **without building first**. The CI workflow (`ut install --from pnpm → ut run ci`) never runs `build` before tests. If `dist/` directories exist from a prior build, tegg plugin tests will fail with `duplicate proto` errors because globby scans both `src/*.ts` and `dist/*.js`, loading the same decorated class twice.
Copy file name to clipboardExpand all lines: README.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,72 +27,73 @@ English | [简体中文](./README.zh-CN.md)
27
27
Follow the commands listed below.
28
28
29
29
```bash
30
+
$ corepack enable utoo
30
31
$ mkdir showcase &&cd showcase
31
-
$ pnpm create egg@beta
32
-
$ pnpm install
33
-
$ pnpm run dev
32
+
$ ut create egg@beta
33
+
$ ut install
34
+
$ ut run dev
34
35
$ open http://localhost:7001
35
36
```
36
37
37
-
> Node.js >= 20.19.0 required, [supports `require(esm)` by default](https://nodejs.org/en/blog/release/v20.19.0).
38
+
> Node.js >= 22.18.0 required.
38
39
39
40
## Monorepo Structure
40
41
41
-
This project is structured as a pnpm monorepo with the following packages:
42
+
This project is structured as a utoo monorepo with the following packages:
42
43
43
44
-`packages/egg` - Main Eggjs framework
44
45
-`examples/helloworld-commonjs` - CommonJS example application
45
46
-`examples/helloworld-typescript` - TypeScript example application
46
47
-`site` - Documentation website
47
48
48
-
The monorepo uses **pnpm catalog mode** for centralized dependency management, ensuring consistent versions across all packages.
49
+
The monorepo uses **utoo catalog mode** for centralized dependency management, ensuring consistent versions across all packages.
49
50
50
51
### Development Commands
51
52
52
53
```bash
53
54
# Install dependencies for all packages
54
-
pnpm install
55
+
ut install --from pnpm
55
56
56
57
# Build all packages
57
-
pnpm run build
58
+
ut run build
58
59
59
60
# Test all packages
60
-
pnpm run test
61
+
ut run test
61
62
62
63
# Run specific package commands
63
-
pnpm --filter=egg run test
64
-
pnpm --filter=@examples/helloworld-typescript run dev
65
-
pnpm --filter=site run dev
64
+
ut --filter=egg run test
65
+
ut --filter=@examples/helloworld-typescript run dev
66
+
ut --filter=site run dev
66
67
```
67
68
68
69
### Local External Services
69
70
70
71
Some DAL, ORM, Redis, and ecosystem benchmark paths need local MySQL and Redis services. Start the repository-aligned Docker services before running those tests on a clean machine:
71
72
72
73
```bash
73
-
utoo run dev:services:start
74
+
ut run dev:services:start
74
75
```
75
76
76
77
This starts MySQL 8 and Redis 7, matching the main CI service versions, and creates the databases used by local DAL/ORM/e2e fixtures: `test`, `apple`, `banana`, `test_runtime_datasource`, `test_runtime_dao`, `test_dal_plugin`, `test_dal_standalone`, `cnpmcore`, and `cnpmcore_unittest`.
77
78
78
79
Useful commands:
79
80
80
81
```bash
81
-
utoo run dev:services:status
82
-
utoo run dev:services:stop
83
-
utoo run dev:services:reset
82
+
ut run dev:services:status
83
+
ut run dev:services:stop
84
+
ut run dev:services:reset
84
85
```
85
86
86
87
The default host ports are `127.0.0.1:3306` for MySQL and `127.0.0.1:6379` for Redis. If either port is already used, the start command stops before changing containers. Keep using the existing service if it is compatible with CI, or stop it and run the command again. You can change Docker host ports with `EGG_DEV_SERVICES_MYSQL_PORT` and `EGG_DEV_SERVICES_REDIS_PORT`; however, the full DAL/ORM/Redis local test path still expects the default host ports.
87
88
88
89
Image overrides are available for compatibility checks:
89
90
90
91
```bash
91
-
EGG_DEV_SERVICES_MYSQL_IMAGE=mysql:5.7 utoo run dev:services:start
92
-
EGG_DEV_SERVICES_REDIS_IMAGE=redis:7 utoo run dev:services:start
92
+
EGG_DEV_SERVICES_MYSQL_IMAGE=mysql:5.7 ut run dev:services:start
93
+
EGG_DEV_SERVICES_REDIS_IMAGE=redis:7 ut run dev:services:start
93
94
```
94
95
95
-
Run `utoo run dev:services:reset` before switching MySQL image families, for example between MySQL 8 and MySQL 5.7, because MySQL data directories are not downgrade-compatible across major versions.
96
+
Run `ut run dev:services:reset` before switching MySQL image families, for example between MySQL 8 and MySQL 5.7, because MySQL data directories are not downgrade-compatible across major versions.
0 commit comments