chore(repo): switch package manager references from pnpm to utoo#5961
chore(repo): switch package manager references from pnpm to utoo#5961killagu wants to merge 14 commits into
Conversation
Replace `pnpm` with `utoo` across docs, top-level scripts, and CI
workflows. Lockfile / workspace filenames (`pnpm-lock.yaml`,
`pnpm-workspace.yaml`) and the `ut install --from pnpm` flag value
are preserved because they refer to real artifacts on disk and to a
CLI argument, not to a tool invocation.
- AGENTS.md, README.md/README.zh-CN.md, packages/egg/README.md,
tools/create-egg/README.md, plugins/redis/README.md,
wiki/concepts/repository-map.md, tegg/CLAUDE.md,
.github/copilot-instructions.md: rewrite command snippets and prose.
- package.json: bump `packageManager` to `utoo@1.0.28`.
- scripts/{publish,version,utils}.js: invoke `utoo` instead of
`pnpm` and update comments.
- .github/workflows/release.yml, .github/workflows/e2e-test.yml:
swap pnpm/action-setup for utooland/setup-utoo and call `ut` / `utoo`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…sions - E2E `Build all packages` was failing because `PUBLINT_PACK: utoo` is not in publint's supported set (`npm | pnpm | yarn | bun`). Falling back to the default (`npm`) so publint's per-package pack succeeds again, matching the main CI environment. - Align `.github/copilot-instructions.md` Node and utoo versions with the values declared in `package.json` (`engines.node >=22.18.0`, `packageManager: utoo@1.0.28`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- scripts/publish.js: invoke `utoo publish` from each package's own directory so utoo's supported flag set works. Drop pnpm-only flags (`--filter`, `--no-git-checks`); keep the npm-standard `--access` and `--provenance` flags that utoo forwards to npm. - AGENTS.md: prepend `corepack enable utoo` to the canonical commands so a clean machine boots into the pinned utoo version. - scripts/version.js: print the `ut run version:<type>` alias used by the rest of the repo (workflows + package.json scripts). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
utoo doesn't implement pnpm's recursive `-r pack`, so the E2E "Pack packages into tgz" step was failing with `error: unexpected argument '-r' found`. Replace it with a small node script that reuses the publish-script's package discovery and runs `npm pack --pack-destination <repoRoot>` per publishable package, matching the tgz layout `ecosystem-ci/patch-project.ts` expects (repo-root-relative file:// overrides). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CodeRabbit / Copilot caught that the docs reference \`utoo run …\`
while package.json scripts and CI workflows all use the \`ut\` alias,
and some referenced root scripts (\`clean\`, \`build:skip\`,
\`example:commonjs\`/\`example:typescript\`) don't exist.
- Rewrite \`utoo install/run/create/test/pack/publish/--filter/-r\` to
the matching \`ut …\` form in README.md, README.zh-CN.md,
packages/egg/README.md, tools/create-egg/README.md,
plugins/redis/README.md, tegg/CLAUDE.md, AGENTS.md,
.github/copilot-instructions.md, scripts/publish.js, and
scripts/dev-services.js. Keep the \`utoo\` package name (corepack,
\`packageManager\`, prose) intact.
- Fix script name drift: \`ut run clean\` → \`ut run clean-dist\`,
\`ut run build:skip\` → \`ut run build\`,
\`ut run example:{commonjs,typescript}\` → \`ut run example:dev:{commonjs,typescript}\`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`ut pm-pack` does not yet resolve `workspace:` / `catalog:` protocols inside the packed manifests, so downstream `npm install` in the ecosystem-ci projects fails with `EUNSUPPORTEDPROTOCOL`. `npm pack` has the same limitation, which is why the previous attempt with scripts/pack-all.js also broke. Keep pnpm available just for the pack step and drop the unused scripts/pack-all.js. The rest of the workflow stays on utoo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Without an explicit \`version\` input, \`pnpm/action-setup\` reads \`packageManager\` from package.json — which now declares \`utoo@1.0.28\`, not pnpm — and aborts with \`Invalid packageManager field in package.json\`. Pin to \`10\` (matches the prior \`pnpm@10.28.0\` we used) so the pack step bootstraps regardless of the \`packageManager\` value. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- .github/copilot-instructions.md: `ut run ci` actually runs tests with coverage only (no build); rewrite description accordingly. Site dev server uses VitePress' default port, not :8000; drop the hard-coded URL. Replace the `cd site && ut run build` invocation with the root `ut run site:build` script. - scripts/utils.js: clarify the workspace-file comment — utoo reads `pnpm-workspace.yaml` as-is, so naming the file matters. - README.md / README.zh-CN.md / packages/egg/README.md: prepend `corepack enable utoo` to the quickstart so clean machines get the pinned utoo before `ut create`/`ut install`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pnpm sees \`packageManager: utoo@1.0.28\` in package.json and refuses to run with \`This project is configured to use utoo\`. Set \`PNPM_PACKAGE_MANAGER_STRICT=false\` for just the \`pnpm -r pack\` step so the workaround until utoo's own pack supports workspace:/catalog: resolution doesn't get blocked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- tegg/CLAUDE.md: switch the test command to the script form (\`ut run test\`) so it matches the root \`test\` script and the rest of the repo guidance. - .github/copilot-instructions.md: site/ is on VitePress (per site/package.json), not Dumi. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
\`pnpm/action-setup\` exports PNPM_HOME, which makes \`ut install --from pnpm\` read pnpm's config and crash with exit code 141 (SIGPIPE) right after the workspace summary is printed. Moving the pnpm setup step until after \`ut install\` / \`ut run build\` keeps PNPM_HOME out of utoo's environment, while still having pnpm available for the pack step that follows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
\`ut install --from pnpm\` intermittently exits with 141 (SIGPIPE) right after printing the workspace summary — observed on typecheck and on cnpmcore E2E in the same workflow run while other ubuntu jobs (\`Test bin\`, \`Test scripts\`, \`Test\`) using the identical command succeed. Wrap every install invocation in a 3-attempt retry with a 5s / 10s backoff so the workflow absorbs the flake while the upstream utoo bug is investigated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous env var \`PNPM_PACKAGE_MANAGER_STRICT\` is not recognized by pnpm, so pnpm kept refusing the pack step with \`This project is configured to use utoo\`. The actual setting is \`package-manager-strict\`, exposed via \`NPM_CONFIG_PACKAGE_MANAGER_STRICT\`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ps resolve \`pnpm -r pack\` needs pnpm's own \`node_modules\` symlink layout to resolve \`workspace:*\` versions; otherwise it errors with \`ERR_PNPM_CANNOT_RESOLVE_WORKSPACE_PROTOCOL\`. Run \`pnpm install --no-frozen-lockfile --ignore-scripts\` first — the packages are already in the global utoo store, so this is cheap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR migrates the entire egg.js monorepo from pnpm to utoo as the primary package manager. Changes span CI/CD workflows, root configuration, user documentation, package-specific guides, and internal build/publish scripts, with consistent command replacements throughout. ChangesMonorepo Migration to utoo
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request migrates the repository's package manager from pnpm to utoo (v1.0.28). It updates the packageManager configuration in package.json, adapts the helper scripts (such as publish.js and dev-services.js) to run ut commands, and updates all documentation files to reflect the new command syntax. The review feedback recommends changing 'ut test' to 'ut run test' in plugins/redis/README.md to maintain consistency with the rest of the documentation.
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.
|
|
||
| ```bash | ||
| pnpm test | ||
| ut test |
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s documented and automated package-manager workflows to use utoo (ut) instead of pnpm, aligning docs, scripts, and GitHub Actions with the repo’s current package manager while intentionally keeping pnpm-specific artifacts (e.g., pnpm-workspace.yaml, pnpm-lock.yaml, and ut install --from pnpm).
Changes:
- Update user-facing docs (READMEs, wiki, agent docs) to reference
corepack enable utoo,ut install, andut run .... - Switch release/e2e/ci workflows to set up utoo and run installs/builds via
ut(keeping pnpm only where required forpnpm -r packin e2e). - Update repo tooling scripts (
scripts/*) and rootpackageManagertoutoo@1.0.28.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
wiki/concepts/repository-map.md |
Updates repo description to “utoo monorepo”. |
tools/create-egg/README.md |
Updates create-egg usage examples to ut create. |
tegg/CLAUDE.md |
Updates tegg contributor commands from pnpm to ut. |
scripts/version.js |
Updates dry-run instructions to use ut run version:*. |
scripts/utils.js |
Clarifies workspace parsing comes from pnpm-workspace.yaml while using utoo. |
scripts/publish.js |
Switches publish implementation to invoke ut publish per package. |
scripts/dev-services.js |
Updates user guidance strings to ut run dev:services:*. |
README.zh-CN.md |
Updates quickstart to corepack enable utoo + ut commands. |
README.md |
Updates quickstart and monorepo commands to ut/utoo terminology. |
plugins/redis/README.md |
Updates local dev test command (but currently to a non-working command). |
packages/egg/README.md |
Updates package quickstart instructions to ut commands. |
package.json |
Sets "packageManager": "utoo@1.0.28". |
AGENTS.md |
Updates agent guidance to utoo (ut) commands and adds corepack enable utoo. |
.github/workflows/release.yml |
Replaces pnpm setup/install/build with utoo/ut. |
.github/workflows/e2e-test.yml |
Uses utoo for install/build; keeps pnpm only for packing step with documented rationale. |
.github/workflows/ci.yml |
Adds retry wrapper to ut install --from pnpm and standardizes ut usage. |
.github/copilot-instructions.md |
Updates Copilot guidance to utoo/ut and reflects current Node/site tooling. |
| - name: Install dependencies | ||
| run: pnpm install --no-frozen-lockfile | ||
| run: ut install --from pnpm |
| Run the unit tests | ||
|
|
||
| ```bash | ||
| pnpm test | ||
| ut test | ||
| ``` |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/egg/README.md (1)
26-26: ⚡ Quick winConsider making utoo the primary scaffolding option.
This line keeps
npm init eggas the primary command withut create eggonly as an optional comment. This is inconsistent with the root README.md (line 32) which fully switched tout create egg@beta, and with the PR's stated objective to replace pnpm references with utoo.For consistency with the migration, consider either:
- Making
ut create eggthe primary command (recommended), or- Showing both options more explicitly without designating npm as primary.
📝 Proposed alignment with root README
-$ npm init egg --type=simple # Optionally ut create egg --type=simple +$ ut create egg --type=simpleOr, to show both options explicitly:
-$ npm init egg --type=simple # Optionally ut create egg --type=simple +$ npm init egg --type=simple +# Or with utoo: +$ ut create egg --type=simple🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/egg/README.md` at line 26, Update the example command so it uses the new utoo scaffolding as the primary option: replace or re-order the existing "npm init egg --type=simple" line to show "ut create egg@beta" (or "ut create egg" if not using `@beta`) as the main command and present "npm init egg --type=simple" as the secondary/optional alternative; ensure the README text mirrors the root README wording and includes both command strings ("ut create egg@beta"/"ut create egg" and "npm init egg --type=simple") explicitly if you prefer showing both options.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Line 75: The workflow step currently calls the single-attempt command "ut
install --from pnpm"; make it retry-safe to match other workflows by replacing
that invocation with the retry wrapper used elsewhere (e.g., "ut retry install
--from pnpm" or the project’s standard retry helper), so transient failures are
retried automatically; update the step that runs "ut install --from pnpm" to use
the retry variant.
---
Nitpick comments:
In `@packages/egg/README.md`:
- Line 26: Update the example command so it uses the new utoo scaffolding as the
primary option: replace or re-order the existing "npm init egg --type=simple"
line to show "ut create egg@beta" (or "ut create egg" if not using `@beta`) as the
main command and present "npm init egg --type=simple" as the secondary/optional
alternative; ensure the README text mirrors the root README wording and includes
both command strings ("ut create egg@beta"/"ut create egg" and "npm init egg
--type=simple") explicitly if you prefer showing both options.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d44340e8-7712-4d63-9992-d0545e73b96b
📒 Files selected for processing (17)
.github/copilot-instructions.md.github/workflows/ci.yml.github/workflows/e2e-test.yml.github/workflows/release.ymlAGENTS.mdREADME.mdREADME.zh-CN.mdpackage.jsonpackages/egg/README.mdplugins/redis/README.mdscripts/dev-services.jsscripts/publish.jsscripts/utils.jsscripts/version.jstegg/CLAUDE.mdtools/create-egg/README.mdwiki/concepts/repository-map.md
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --no-frozen-lockfile | ||
| run: ut install --from pnpm |
There was a problem hiding this comment.
Add retry parity for ut install in release workflow.
Line 75 is a single-attempt install, while the same command was made retry-safe in other workflows for transient failures. This can cause avoidable manual release failures.
Suggested fix
- - name: Install dependencies
- run: ut install --from pnpm
+ - name: Install dependencies
+ # Retry to absorb transient `exit 141` (SIGPIPE) from `ut install`.
+ run: ut install --from pnpm || (sleep 5 && ut install --from pnpm) || (sleep 10 && ut install --from pnpm)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release.yml at line 75, The workflow step currently calls
the single-attempt command "ut install --from pnpm"; make it retry-safe to match
other workflows by replacing that invocation with the retry wrapper used
elsewhere (e.g., "ut retry install --from pnpm" or the project’s standard retry
helper), so transient failures are retried automatically; update the step that
runs "ut install --from pnpm" to use the retry variant.
Summary
pnpmwithutooacross docs, top-level scripts, and CI workflows so the repo guidance matches the package manager the project actually uses.packageManagerinpackage.jsontoutoo@1.0.28; switchscripts/{publish,version,utils}.jsto invokeutoo(and align their comments)..github/workflows/release.ymland.github/workflows/e2e-test.yml, swappnpm/action-setupforutooland/setup-utooand callut/utoo(mirroring the pattern already used byci.yml).pnpm-lock.yaml,pnpm-workspace.yaml) and the CLI argument value inut install --from pnpm— those reference real artifacts on disk and a flag value, not tool invocations.CHANGELOG.mdentries, source code that detects pnpmnode_moduleslayouts (packages/core/src/loader/*), and theplugin-pnpm*test fixtures.Test plan
nextfor typecheck, build, lint, format check, and tests.release.yml(workflow_dispatch dry-run) completes through install + build usingut install --from pnpmandut run build.e2e-test.ymlsucceeds end-to-end; in particular confirmPUBLINT_PACK: utoois accepted bypublint— if not, revert that env var tonpmand keep the rest.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Chores
utcommands instead ofpnpm.Documentation