From ed9b798f5151c8ef6c8f0b6a251cfdfd29de227c Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Thu, 10 Sep 2026 01:30:42 -0700 Subject: [PATCH] fix: allow @testing-library/jest-dom v7 on the next line Ports #287 from main. The Solid 2.0 templates pin jest-dom ^7.0.0 and npm enforces peer ranges, so a clean npm install of a freshly created project failed with ERESOLVE against the ^6.* range (solidjs/solid#3341). v7 keeps the @testing-library/jest-dom/vitest subpath the plugin auto-injects, so only the peer range changes. Co-authored-by: Claude via Cursor Co-authored-by: Cursor --- .changeset/jest-dom-v7-next.md | 5 +++++ package.json | 2 +- pnpm-lock.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/jest-dom-v7-next.md diff --git a/.changeset/jest-dom-v7-next.md b/.changeset/jest-dom-v7-next.md new file mode 100644 index 0000000..320ddd1 --- /dev/null +++ b/.changeset/jest-dom-v7-next.md @@ -0,0 +1,5 @@ +--- +'@solidjs/vite-plugin': patch +--- + +Allow `@testing-library/jest-dom` v7 in the optional peer dependency range (ports #287 from `main`). The Solid 2.0 templates pin `@testing-library/jest-dom@^7.0.0`, and npm 7+ enforces peer ranges, so a clean `npm install` of a freshly created project failed with `ERESOLVE` against the `^6.*` range (solidjs/solid#3341). v7 keeps the `@testing-library/jest-dom/vitest` subpath the plugin auto-injects into `test.setupFiles`, so only the range changes. diff --git a/package.json b/package.json index 0d1099f..1cf0200 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "peerDependencies": { "@solidjs/start-devtools": "^1.0.0-next.2", "@solidjs/web": "^2.0.0-rc.7", - "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", + "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.0.0 || ^7.0.0", "solid-js": "^2.0.0-rc.7", "vite": "^8.0.0 || ^9.0.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cee57be..8b0c144 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,7 +33,7 @@ importers: specifier: ^2.0.0-rc.7 version: 2.0.0-rc.7(solid-js@2.0.0-rc.7) '@testing-library/jest-dom': - specifier: ^5.16.6 || ^5.17.0 || ^6.* + specifier: ^5.16.6 || ^5.17.0 || ^6.0.0 || ^7.0.0 version: 6.10.0(@testing-library/dom@10.4.1) '@types/babel__core': specifier: ^7.20.4