Commit a8a7572
chore: migrate to utoo CI (#5830)
## Summary
Migrate the main CI workflow from pnpm to [utoo
(`ut`)](https://github.com/utooland/utoo). The E2E workflow keeps pnpm
for now — it requires `catalog:` / `workspace:` protocol resolution and
`publishConfig` overrides during pack which `ut pm-pack` does not yet
provide.
## Install speedup
The direct win of this migration: **`ut install --from pnpm` is 2.2–3.6×
faster than `pnpm install`** across all test matrix platforms.
| Platform | pnpm install | ut install | Speedup |
|---|---|---|---|
| ubuntu-22 | 16.8s | **5.2s** | 3.2× |
| ubuntu-24 | 17.7s | **4.9s** | 3.6× |
| macos-22 | 26.3s | **9.5s** | 2.8× |
| macos-24 | 30.1s | **9.1s** | 3.3× |
| windows-22 | 31.1s | **12.0s** | 2.6× |
| windows-24 | 28.4s | **12.7s** | 2.2× |
Every test matrix job re-installs from scratch, so this 15–20s savings
per job compounds into the per-job reductions below.
## Overall CI wall-clock
On a clean run (no reruns), the full workflow shaves **~1 minute off
wall-clock** (25m34s → 24m32s, ~4% faster). The critical path is still
bounded by Windows Test (~20–24m), so faster jobs elsewhere can't
meaningfully shrink wall-clock. Flaky reruns on the critical path can
degrade practical times further.
The win of this PR is **per-job speedup** (especially macOS, where Test
jobs drop 6–8 minutes each) and **developer-machine ergonomics** (`ut
install` on your laptop is also 3× faster).
## CI changes
- `.github/workflows/ci.yml`: replace `pnpm/action-setup` + `pnpm
install` with `utooland/setup-utoo` + `ut install --from pnpm`
- `package.json`: convert pnpm-specific scripts to ut equivalents (`ut
run --workspaces`, `ut run --workspace <name>`)
- `site:build` / `site:dev` use `cd site && npm run build/dev` so
Cloudflare Pages works (its env has neither pnpm nor utoo)
- `.gitignore`: add `.utoo.toml` and `.claude/`
- `.oxfmtrc.json`: ignore root `package.json` (ut rewrites it with
npm-style `workspaces` field)
## egg-bin fixes
### CJS resolution (`baseCommand.ts`)
`ts-node`, `tsconfig-paths` are CJS packages without `exports`. On
flat-hoisted layouts (npm/utoo), `importResolve` (which uses
`import.meta.resolve`) fails because the ESM resolver doesn't
auto-append `.js` for bare subpaths. Fix: use `createRequire` for these
CJS packages.
### Self-test fixture opt-out (`test.ts` + `coffee.ts`)
Under flat-hoisting, egg-bin's own test fixtures reach `@eggjs/mock` and
`@eggjs/tegg-vitest` via monorepo root hoist even though the fixture
projects don't use them. This caused every test fork to load both
frameworks unnecessarily (~90s for mock, ~7s/fork for tegg runner → ~70s
for the test-bin suite).
Solution: the test harness (`coffee.ts`) sets
`EGG_BIN_SELF_TEST_FIXTURE=1` when spawning egg-bin against its own
fixtures. `test.ts` checks this env var and skips both mock and
tegg-runner auto-detection.
For real projects, behaviour is unchanged: both frameworks are
resolve-then-use. The tegg runner also falls back to egg-bin's own
dirname for E2E scenarios (cnpmcore uses tegg transitively via egg
without declaring it directly).
## Build perf: publint pack
`publint` runs `pnpm pack` by default against each of ~80 packages. On
main CI (utoo env, no pnpm binary) this fails. On E2E (pnpm env,
symlinked node_modules) npm pack is ~10× slower per package —
`create-egg` alone took 85s vs 1s under pnpm.
Fix: `tsdown.config.ts` reads `PUBLINT_PACK` env var, defaulting to
`npm` (works in main CI). E2E workflow sets `PUBLINT_PACK=pnpm` so it
stays fast there.
## Dependency fixes
| Change | Why |
|---|---|
| `oxlint-tsgolint: ^0.15.0` → `^0.18.1` | Peer requirement of oxlint
1.60.0 |
| Add `@types/content-type`, `@types/koa-compose` to root devDeps |
oxlint type-check needs these at workspace root, not just hoisted from
sub-packages |
## Other source adaptations
| File | What |
|---|---|
| `packages/cluster/test/options.test.ts` | Accept flat-hoisted
`node_modules/egg` path |
| `packages/tsconfig/test/index.test.ts` | Use `require.resolve` instead
of hardcoded path |
| `tegg/plugin/controller`, `tegg/plugin/mcp-proxy` | Remove
`@ts-expect-error` for types discoverable under flat hoisting |
## Per-job timing (clean run, no reruns)
| Job | next | chore-ut-ci | Delta |
|---|---|---|---|
| typecheck | 2m7s | **1m39s** | -28s |
| Test (ubuntu, 22) | 14m52s | 15m20s | +28s |
| Test (ubuntu, 24) | 13m38s | **13m28s** | -10s |
| Test (macos, 22) | 21m5s | **14m40s** | **-6m25s** |
| Test (macos, 24) | 18m54s | **10m38s** | **-8m16s** |
| Test (windows, 22) | 25m24s | **24m23s** | -1m1s |
| Test (windows, 24) | 23m7s | **20m59s** | -2m8s |
| Test bin (ubuntu) | 2m19s | **2m2s** | -17s |
| Test bin (windows) | 3m51s | **2m56s** | -55s |
| Test scripts (ubuntu, 22) | 1m41s | **1m13s** | -28s |
| Test scripts (ubuntu, 24) | 1m36s | **1m16s** | -20s |
| cnpmcore E2E | 6m0s | **5m58s** | -2s |
| examples E2E | 2m35s | **2m25s** | -10s |
Almost every job is faster; the small Test (ubuntu 22) +28s regression
is within run-to-run variance.
## Test plan
- [x] typecheck
- [x] Test matrix (ubuntu/macos/windows × Node 22/24)
- [x] Test bin, Test scripts
- [x] E2E (cnpmcore + examples)
- [x] Cloudflare Pages
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **Chores**
* Migrated build and dependency management tooling from pnpm to utoo
across the monorepo.
* Updated CI workflows, workspace configurations, and npm scripts to
support the new tooling.
* Added build configuration for egg-bin TypeScript compilation.
* Enhanced test infrastructure for environment isolation and
compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 490f849 commit a8a7572
File tree
16 files changed
+123
-73
lines changed- .github/workflows
- packages
- cluster/test
- tsconfig/test
- utils/test
- tools
- egg-bin
- src
- commands
- test
- scripts
16 files changed
+123
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
154 | | - | |
| 154 | + | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | | - | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | | - | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | | - | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
211 | | - | |
| 211 | + | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
239 | | - | |
| 239 | + | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
247 | | - | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
251 | | - | |
252 | | - | |
| 252 | + | |
| 253 | + | |
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | | - | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | | - | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments