Skip to content

Install with pnpm and refuse other package managers - #196

Merged
BunsDev merged 11 commits into
mainfrom
pnpm-enforce
Oct 14, 2026
Merged

BunsDev merged 11 commits into
mainfrom
pnpm-enforce

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The workspace now installs with pnpm 10.34.5 (pinned by packageManager), and other package managers are refused.

Installer What happens
npm ≥ 10.9 install, ci, run and npx fail at once with EBADDEVENGINES (devEngines.packageManager)
Yarn via Corepack Refused by the packageManager field
Bun, npm < 10.9, anything else The root preinstall guard (scripts/require-pnpm.mjs) exits 1 and names the installer

Lockfile and layout

  • pnpm import converted package-lock.json into pnpm-lock.yaml. Both lockfiles hold the same 417 package@version pairs, so no versions moved. package-lock.json is deleted.
  • pnpm-workspace.yaml replaces workspaces. nodeLinker: hoisted keeps the flat node_modules that electron-builder packages and that asarUnpack expects for node-pty.
  • pnpm 10 blocks dependency install scripts. Only node-pty and electron-winstaller are allowed, which are the two that ran under npm. Electron 44 has no install script; it downloads on first run.
  • @modex/core becomes workspace:*, because pnpm 10 doesn't link a workspace package from a plain version.
  • The desktop predev hook is folded into dev, because pnpm doesn't run pre/post hooks for scripts.

CI, release and deploy

  • ci.yml, platform-cli.yml and release.yml add pnpm/action-setup@v4 (version read from packageManager) before setup-node with cache: pnpm, then run pnpm install --frozen-lockfile. The native-build path filter now watches pnpm-lock.yaml and pnpm-workspace.yaml.
  • dist:windows and dist:linux run the core and desktop builds themselves, so package-native.mjs no longer calls back into the package manager through npm_execpath.
  • prepare-native-clis.mjs still installs codex and claude with the npm bundled with Node. That's how users install those CLIs, and the launch tests cover npm's shims.
  • vercel.json runs the pinned pnpm through Corepack and installs the whole workspace. Vercel's function build for api/release.js runs a second, full install, which on main installed 395 packages under npm too. On top of a filtered install that second install fails with ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY, which the first two preview deploys hit and I reproduced locally.
  • devEngines and engines.pnpm use ^10.34.0. Vercel reads devEngines to pick its pnpm, and an open >= range gave it pnpm 12.

Scripts and docs

release-mac.sh, release-mas.mjs, worktree.sh new (via worktree-maintenance.mjs), Start_Modex_Demo.bat, the iPhone e2e script, the site's Playwright server and the guidance docs (README, AGENTS, CONTRIBUTING, app READMEs, docs/*) now use pnpm. Two kinds of mention stay as they were:

  • Dated records in docs/reviews/, docs/superpowers/plans/ and docs/specs/.
  • Product examples such as approval rules for npm test.

Verification (local, macOS arm64, Node 24.18.1)

  • pnpm install --frozen-lockfile: clean, no blocked build scripts.
  • pnpm build and pnpm typecheck: pass in all four workspaces.
  • pnpm test: 1,407 passed, 0 failed, 16 platform skips. That covers 107 repo-script tests (3 of them new guard tests), core 15, desktop 1,238 + 21, site 10 and Store desktop 16.
  • pnpm --filter @modex/site test:e2e: 7 passed with the new preview-server command.
  • pnpm --filter @modex/desktop dist (ad-hoc): electron-builder detected pnpm from packageManager. Compared with main's npm lockfile, the asar ships the same 129 production packages, with node-pty unpacked and @modex/core included. One difference: react is no longer copied in. npm counted it only as a peer of @create-markdown/react, and both are used solely in the Vite-bundled renderer; no main or shared file loads them.
  • The packaged app's offline demo (--demo --screenshot) ran a full scripted thread with approval and Review diff, and exited 0.
  • In this repo, npm run, npm ci, npx and yarn are refused. pnpm runs.

Not verified locally:

  • The Electron e2e suite. It runs here as the required unit + e2e (macOS) check.
  • Windows and Linux packaging. platform-cli.yml runs on this PR.
  • The signed release path in release.yml, which runs only on a tag.
  • Vercel's hosted build. The preview deployment for this PR exercises it.

The workspace now installs with pnpm 10.34.5, pinned by packageManager.
pnpm import converted package-lock.json into pnpm-lock.yaml with the same
417 resolved packages, then package-lock.json was removed.

Enforcement has three layers. devEngines.packageManager makes npm refuse
install, ci, run and npx. packageManager makes Corepack's Yarn refuse.
A root preinstall guard (scripts/require-pnpm.mjs) stops installers that
ignore both fields, such as Bun and npm before 10.9.

pnpm-workspace.yaml replaces the workspaces field. nodeLinker: hoisted
keeps the flat node_modules that electron-builder packages and that
asarUnpack expects for node-pty. Only node-pty and electron-winstaller
may run install scripts; npm ran the same two.

@modex/core is now a workspace:* dependency, because pnpm 10 does not
link workspace packages from a plain version. The desktop predev hook is
folded into dev, since pnpm does not run pre/post hooks for scripts.

CI, release and native-platform workflows use pnpm/action-setup with the
pnpm store cache. Workspace builds for native installers moved into the
dist:windows and dist:linux scripts. The native CLI probe still installs
codex and claude with the npm bundled with Node, because that is how
users install them. Vercel runs the pinned pnpm through Corepack with an
isolated, filtered install of 27 packages for the site.

Release, worktree and demo scripts, the iPhone e2e script and the
guidance docs now use pnpm. Dated reviews and plans are left as recorded.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 14, 2026 8:35pm UTC

Request Review

Coven-Harness: Claude Code / claude-opus-5-5
Vercel's function build reads devEngines.packageManager to choose its pnpm.
The open range >=10.34.0 gave it pnpm 12, which reported this lockfile as
broken (missing snapshot for @create-markdown/[email protected]) after the site
had already built. Both devEngines and engines.pnpm now use ^10.34.0, and
the guard test fails if either range leaves the major in packageManager.

Coven-Harness: Claude Code / claude-opus-5-5
After the site build, Vercel's function build for api/release.js runs its
own full pnpm install. On top of the filtered, isolated install it found
only the site's partial node_modules/.pnpm/lock.yaml and failed with
ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY for @create-markdown/[email protected].
The same sequence reproduces locally; a full install first makes the
second install a no-op. Under npm the second install already installed
every workspace, so the filtered first install never saved anything.

Coven-Harness: Claude Code / claude-opus-5-5
Keeps both new docs/status.md entries: held-model effort (#193) and pnpm only.

Coven-Harness: Claude Code / claude-opus-5-5
Keeps the fast-mode entry (#195) and moves the pnpm entry to the end of
"On main, unreleased", away from where new entries are inserted.

Coven-Harness: Claude Code / claude-opus-5-5
Takes the v0.0.12 preparation (#194) and keeps package-lock.json deleted;
its version bump for @modex/desktop needs no pnpm-lock.yaml change
(frozen install passes).

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 14, 2026
"an occupied port on a new interface does not move or disconnect the
existing interface" binds a blocker to the companion's port on the
Mac's LAN address. On a hosted runner (PR #196, run 38404430584) another
socket already held that address and port, so the blocker's own listen
failed with EADDRINUSE and the test failed before exercising anything.

The port is occupied either way, which is the condition under test, so
EADDRINUSE from the blocker now counts as the occupied state. With a
second listener simulating the hosted collision, the old code fails
with the same EADDRINUSE and the new code passes. The other assertions
are unchanged.

Coven-Harness: Claude Code / claude-opus-5-5
Merging main put the note inside the shipped v0.0.12 section, because
its neighbours moved there. The change is unreleased.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev merged commit 95b29ac into main Oct 14, 2026
7 checks passed
@BunsDev
BunsDev deleted the pnpm-enforce branch October 14, 2026 21:24
BunsDev added a commit that referenced this pull request Oct 15, 2026
setup-node@v5 reads packageManager and caches that package manager by default. Since #196
that is pnpm, which the attach job never installs, so v0.1.0's Release run 38803510045
failed at setup after every signing and acceptance job had passed. The job only runs node
scripts and gh, so it turns the cache off.

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 16, 2026
…255)

setup-node@v5 reads packageManager (pnpm since #196) and caches that package manager
by default, so a job that never installs pnpm fails at setup. The v0.1.0 attach job
did, after every signing and acceptance job had passed (#251).

scripts/test/workflow-setup-node.test.mjs reads every workflow and fails when a job
runs actions/setup-node without an earlier pnpm/action-setup step in the same job or
package-manager-cache: false on that step. It runs in pnpm test, so the required
unit + e2e (macOS) check enforces it. It refuses to pass if it finds no setup-node
steps at all, and a second test covers the accepted and refused shapes.

Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

1 active deployment
Preview — 08ce11a8 Deployed Oct 14, 2026 by vercel[bot]
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.

1 participant