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
{{ message }}
Repository navigation
Commit 8525d2e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(init): register e2e mcp with the project's package manager (e2e-inc#2372)
* fix(init): register e2e mcp with the project's package manager
npx exits with EBADDEVENGINES before the MCP handshake when the project's devEngines pins another manager, and finds no binary under Yarn Plug'n'Play. init now writes pnpm exec e2e mcp for pnpm and yarn run --silent e2e mcp for Yarn; npm keeps npx and Bun keeps bunx.
* fix(init): run the binary under Yarn, cover the pnpm pin
yarn run resolves a package.json script named e2e before the binary, so Yarn projects register yarn exec forms instead. The init integration test now starts the server a pnpm project with a devEngines pin registers.
* fix(init): read the Yarn flavor from the lockfile, share the exec argv
execArgv in package-manager.ts is the one argv form, mcpLaunch adds e2e mcp.
detectWorkspacePackageManager returns yarnBerry with the manager and root.
Yarn 2+ is also read from yarn.lock, and from a two-digit major.
execCommand prints yarn exec -- so a script named e2e does not run first.
* fix(init): read Yarn's version from the Yarn that started init
A project with no lockfile yet got the Yarn 1 command under Yarn 4. Also read a devEngines pin as the project's manager, and keep the arguments an entry passes after mcp on a re-run.
* fix(init): keep a devEngines pin from naming an install root
A workspace member that repeats the pin installed in its own folder. Also keep the arguments after a versioned e2e package, read an empty yarn.lock as undecided, read the Yarn major of a devEngines pin, and read the pin in detectPackageManager too.
* fix(init): leave a two-major Yarn pin to the invoking Yarn
Also read a member's devEngines pin when its workspace root names no manager.
`e2e init` now registers the MCP server with the project's own package manager: `pnpm exec e2e mcp` in a pnpm project and `yarn exec e2e mcp` in a Yarn one (`yarn --silent exec -- e2e mcp` on Yarn 1), where it wrote `npx e2e mcp` before. `npx` exits with `EBADDEVENGINES` before the MCP handshake when the project's `devEngines` pins another manager, and the client showed only `Connection closed`. Run `e2e init` again to update an existing entry; it keeps the entry's other settings and, for an entry started as `<launcher> e2e mcp ...`, the arguments after `mcp`. A project that names its manager only in `devEngines`, with no `packageManager` field and no lockfile, is read as that manager's.
6
+
7
+
The commands e2e prints for a Yarn project now read `yarn exec -- e2e ...`: `yarn e2e` runs a package.json script named `e2e` before the binary. `e2e init` also tells Yarn 2 or later from Yarn 1 by the lockfile when the project has no `.yarnrc.yml` and no `packageManager` field, and by the Yarn that started it when the project has no lockfile yet.
Copy file name to clipboardExpand all lines: docs/reference/cli.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ installed. pnpm gets `--no-frozen-lockfile`, and Yarn
194
194
|`.gitignore`| Appends `node_modules/`, `.e2e/results/`, `.e2e/cache/`, `.e2e/sessions/`, `.e2e/report.json`, `.e2e/ai-trace.json`, `.e2e/timings.json`, `.e2e/junit.xml`, `.e2e/summary.md`, `.e2e/ctrf.json`, `.e2e/logs/`, and `.e2e/videos/`. Committing the cache is opt-in; see [commit the replay cache](/cache#commit-the-replay-cache)|
195
195
|`.agents/skills/e2e/`, `.claude/skills/e2e/`|`SKILL.md` and one `references/<topic>.md` per `e2e guide` topic. With both chosen, the Claude Code directory is a relative symlink (`../../.agents/skills/e2e`) to the copy, the layout `npx skills add` produces |
196
196
|`AGENTS.md`, `CLAUDE.md`| Appends `End-to-end tests use e2e; read .agents/skills/e2e/SKILL.md before writing or running one.` to `AGENTS.md` when the skill is in `.agents/skills/`, and the same line with `.claude/skills/e2e/SKILL.md` to `CLAUDE.md` when it is in `.claude/skills/`. Created when missing; the rest of an existing file is unchanged. Neither with `--skills none`|
197
-
|`.mcp.json`, `.cursor/mcp.json`, `.codex/config.toml`| Registers `e2e mcp` without changing other servers |
197
+
|`.mcp.json`, `.cursor/mcp.json`, `.codex/config.toml`| Registers `e2e mcp`with the project's package manager (`npx e2e mcp`, `pnpm exec e2e mcp`, `yarn exec e2e mcp`, `bunx e2e mcp`) without changing other servers |
198
198
|`.github/workflows/e2e.yml`, `.gitlab-ci.yml`| With `--ci`: a job for each platform the targets run on. At the repository root, also for a project in a subfolder. See [CI pipeline](#ci-pipeline)|
if(manager!==workspace.manager)clack.log.warn(`This workspace uses ${workspace.manager}, which was not found on this machine; continuing with ${manager}`);
0 commit comments