Skip to content

fix: allow @testing-library/jest-dom v7 on the next line - #358

Merged
ryansolid merged 1 commit into
nextfrom
fix/jest-dom-v7-next
Sep 10, 2026
Merged

fix: allow @testing-library/jest-dom v7 on the next line#358
ryansolid merged 1 commit into
nextfrom
fix/jest-dom-v7-next

Conversation

@ryansolid

Copy link
Copy Markdown
Member

Ports #287 (merged to main as 2.11.14) to the next line.

Problem

@solidjs/vite-plugin@3.0.0-next.41 declares peerOptional @testing-library/jest-dom: "^5.16.6 || ^5.17.0 || ^6.*". The Solid 2.0 templates moved to @testing-library/jest-dom@^7.0.0 (solidjs/templates#302), and npm 7+ hard-fails on peer conflicts, so a clean npm install of a project freshly created by npm init solid@latest errors with ERESOLVE. pnpm only warns, which is why the templates repo itself installs fine.

Fixes solidjs/solid#3341.

Fix

Widen the optional peer range to ^5.16.6 || ^5.17.0 || ^6.0.0 || ^7.0.0, same as #287. No code change: v7 keeps the @testing-library/jest-dom/vitest subpath that getJestDomExport auto-injects into test.setupFiles. The lockfile diff is the one-line specifier update.

Verification

Reproduced the ERESOLVE with the published next.41 on a fresh with-tailwindcss copy under npm 11, then swapped in a tarball built from this branch: npm install succeeds (jest-dom 7.0.1 resolved) and the template's vitest run passes with the plugin-injected jest-dom setup.


Authored by Claude via Cursor.

Made with Cursor

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 <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ed9b798

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/vite-plugin@358

commit: ed9b798

@ryansolid
ryansolid merged commit bba1d28 into next Sep 10, 2026
6 checks passed
@ryansolid
ryansolid deleted the fix/jest-dom-v7-next branch September 10, 2026 08:34
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