Migrate to Vite #314#315
Open
SharonStrats wants to merge 1 commit into
Open
Conversation
Open
fa301e2 to
da8e62c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the solid-logic build and test tooling from Webpack/Babel/Jest to Vite/Vitest, updating packaging metadata and refactoring tests to run under Vitest with a new fetch-mocking approach.
Changes:
- Replace Webpack/Babel/Jest configuration with a Vite + Vitest setup (
vite.config.mts) and update TypeScript resolution for bundlers. - Update
package.jsonscripts/entrypoints/exports to align with the new build output model. - Refactor test suite from Jest APIs to Vitest APIs, introducing a custom fetch-mock implementation and updated test setup.
Reviewed changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.mjs | Removed Webpack build configuration as part of the migration to Vite. |
| vite.config.mts | Added Vite build config and Vitest configuration (jsdom + setup + coverage). |
| tsconfig.json | Switched to moduleResolution: bundler to better match bundler behavior. |
| test/utils.test.ts | Migrated test runner imports to Vitest. |
| test/utilityLogic.test.ts | Migrated to Vitest and updated fetch mocking/typing within tests. |
| test/unit/setup.ts | Added shared mock-web and request-capture helper used by test setup. |
| test/typeIndexLogic.test.ts | Migrated Jest environment directives to Vitest imports. |
| test/testBundles/test-umd.html | Removed legacy UMD bundle browser test file. |
| test/solidAuthLogic.test.ts | Replaced Jest module mocking with an inline stub + Vitest imports. |
| test/profileLogic.test.ts | Migrated Jest environment directives to Vitest imports. |
| test/mocks/solid-oidc-client-browser.ts | Removed Jest-specific module mock implementation. |
| test/logic.test.ts | Migrated to Vitest and updated fetch mocking usage. |
| test/inboxLogic.test.ts | Migrated to Vitest; updated fetch mock matchers and typings. |
| test/helpers/setup.ts | Updated global test setup for Vitest, including fetch/TextEncoder/TextDecoder setup. |
| test/helpers/fetch-mock.ts | Added a custom fetch-mock implementation to replace jest-fetch-mock. |
| test/helpers/debugger.ts | Migrated debug silencing from Jest spies to Vitest spies. |
| test/container.test.ts | Migrated to Vitest and updated typings/mocking patterns. |
| test/chatLogic.test.ts | Migrated to Vitest and updated time mocking and typings. |
| test/authUtil.test.ts | Migrated to Vitest imports. |
| test/aclLogic.test.ts | Migrated to Vitest imports and improved typing. |
| README.md | Updated documentation to reflect Vite/Vitest usage and updated dependency guidance. |
| package.json | Updated scripts, entrypoints/exports, and dependencies for Vite/Vitest-based workflow. |
| jest.config.mjs | Removed Jest configuration as part of the migration. |
| babel.config.mjs | Removed Babel configuration as part of the migration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
65
to
70
| "dependencies": { | ||
| "@uvdsl/solid-oidc-client-browser": "^0.2.3", | ||
| "solid-namespace": "^0.5.4" | ||
| "solid-namespace": "^0.5.4", | ||
| "vite": "^8.0.16", | ||
| "vitest": "^4.1.9" | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
this is how it was in the package i copied it from. @NoelDeMartin should i change this
Prompt: help me change the fetch mock and tests from Jest to Vite Co-authored-by: GPT-5.4 Mini <gpt-5.4-mini@openai.com>
0c556f6 to
698e89e
Compare
Contributor
Author
|
Merge this after SolidOS/mashlib#448 to make sure that solidos works locally and possibly when deploying. |
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.
Migrate from Webpack/babel/jest to Vite
I have tested this in my local solidos setup with most branches pointing at the staging branch (only a couple pane repos were not, but they were created off of the staging branch).
When i ran this for the first time I had trouble with overrides again in solid-panes and actually this time in profile-pane this time as well. I had to remove the override for pane-registry and solid-logic in solid-panes and solid-logic in profile-pane.