Repository navigation
Conversation
DOM tests kept solid-js external, so packages without a `solid` export condition (such as @solidjs/testing-library) were imported natively and their own imports were resolved by the host runtime. Node gets the `browser` condition from vitest's worker --conditions, but Deno does not apply it in worker threads and resolves `deno`/`node`, so @solidjs/testing-library loaded the server build of solid-js/web and `render` threw "Client-only API called on the server side". - Inline solid-js and the runtime consumers found by the vitefu crawl through test.server.deps.inline when the `ssr` option is off. - Merge with a user inline list; skip for `inline: true` or a user external entry for solid-js. `ssr: true` keeps solid-js external. - Add a jsdom suite to examples/vite-6 (`pnpm test:jsdom`) that emulates Deno's resolution with a Node resolve hook, and run it in CI. Refs #369 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Vitest 5 defaults test.sharedViteServer to true. Inline projects then reuse the root Vite server and take their test options from the raw root block captured before any config hook runs, so the jsdom default, the jest-dom setup file and server.deps never reach them. Set the option to false when the root declares test.projects and leaves it unset, as @solidjs/vite-plugin does since #370. Refs #369 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 5d6846c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #369 on
main(1.x). The fix fornextis in a separate PR.In jsdom tests, packages that import
solid-js/web, such as@solidjs/testing-library, now get the browser build under Deno. Before,renderthrewClient-only API called on the server side.Cause
solid-jsexternal, along with the packages that use it.browsercondition to worker threads (pool: 'threads'). Those threads resolvedsolid-js/webto the server build.Changes
ssroff, test mode now inlinessolid-jsand every package that lists it as a dependency or peer. They resolve through Vite'sbrowsercondition.solid-jsand the packages that use it are inlined together, so they share one copy ofsolid-js.server.deps.inlinelist is merged with the plugin's.inline: trueand a userexternalentry forsolid-jsare left alone.ssr: true,solid-jsstays external as before.test.sharedViteServer = falsewhentest.projectsis set and the option is unset. This ports fix(vitest): resolve each inline project's own config under Vitest 5 #370 fromnext.Known limit
solid-jsonly if it depends on it directly. A package that reachessolid-jsonly through another such package is not inlined, and would still load its own copy.Testing
examples/vite-6/tests/jsdom/testing-library.test.tsx, with its ownvitest.jsdom.config.tsand atest:jsdomscript. It runs with a resolve hook that removesbrowserand addsdeno, the same as Deno.pnpm run test:jsdomstep to the Vitest workflow.tsc --noEmitpasses.tests/jsdom/**.🤖 Generated with Claude Code