Conversation
#166 add scripts and fix dev webpack
Adds __mocks__/solid-logic.js with Proxy-based auto-mock and maps solid-logic via moduleNameMapper to avoid 'Automatic publicPath' webpack bundle error. Also expands transformIgnorePatterns for ESM packages (uuid, @noble, lit) from solid-ui dependency chain.
fix: mock solid-logic to resolve webpack bundle errors in Jest tests
…istry@3.1.2-0 solid-ui@3.1.3-5) (latest: rdflib@2.3.9)
Solidos dependencies
#192 Vite Migration
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s build/dev/test tooling from Webpack + Jest to Vite + Vitest, updates package publishing metadata to ship dist/ outputs, and expands CI to run on a new staging branch while introducing a reusable dependency-update workflow step.
Changes:
- Replaced Webpack/Babel/Jest configuration with Vite (
vite.config.mts), Vitest-based tests, and a newtsconfig.json. - Updated package publishing entry points and build scripts to produce/ship
dist/artifacts. - Updated CI workflow to run on
main+stagingand added anupdate-depsreusable workflow dependency.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.module.rules.mjs | Removed Webpack loader rules as part of the Vite migration. |
| webpack.dev.config.mjs | Removed Webpack dev-server config (replaced by vite). |
| webpack.config.mjs | Removed Webpack production build config (replaced by Vite build). |
| vite.config.mts | Added Vite + Vitest configuration (build/test/coverage + sandbox defaults). |
| tsconfig.json | Added TypeScript config for tooling/build integration. |
| test/sourcePane.test.js | Migrated tests from Jest/CommonJS patterns to Vitest/ESM and updated DOM helpers. |
| test/helpers/setup.js | Replaced Jest-based setup with Vitest mocks and a custom fetch/webOperation mock. |
| test/helpers/jest.setup.js | Removed Jest-specific global setup. |
| test/mocks/styleMock.js | Removed Jest style mock (no longer needed with Jest removed). |
| src/index.ts | Added an index entry file exporting the pane default export. |
| README.md | Documented Vite-based dev/test/build workflows for contributors. |
| package.json | Switched scripts/entry points to Vite + dist/, updated dependency layout and exports. |
| jest.config.mjs | Removed Jest configuration. |
| dev/index.js | Removed Webpack-based dev sandbox entry. |
| dev/index.html | Removed Webpack dev HTML template. |
| dev/dev-global.css | Removed dev-only global CSS previously used by the Webpack sandbox. |
| dev/context.js | Removed Webpack dev context helper. |
| babel.config.mjs | Removed Babel config no longer used with Vite tooling. |
| .gitignore | Updated ignored build output from lib/ to dist/. |
| .github/workflows/ci.yml | Added staging branch CI and introduced an update-deps reusable workflow dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+17
| function getByTitle (root, title) { | ||
| return root.querySelector(`[title="${title}"]`) | ||
| } |
Comment on lines
+9
to
+12
| } | ||
| }), | ||
| build: buildConfig({ entry: 'src/sourcePane.js' }), | ||
| test: { |
Comment on lines
+5
to
+11
| "main": "dist/index.cjs.js", | ||
| "exports": { | ||
| ".": { | ||
| "import": "./dist/index.esm.js", | ||
| "require": "./dist/index.cjs.js" | ||
| } | ||
| }, |
Comment on lines
+65
to
+69
| "dependencies": { | ||
| "vite": "^8.0.16", | ||
| "vitest": "^4.0.18", | ||
| "vitest-axe": "^0.1.0" | ||
| }, |
Comment on lines
54
to
+64
| "devDependencies": { | ||
| "@babel/eslint-parser": "^7.28.6", | ||
| "@babel/preset-env": "^7.28.6", | ||
| "@testing-library/dom": "^10.4.1", | ||
| "babel-loader": "^10.0.0", | ||
| "babel-plugin-inline-import": "^3.0.0", | ||
| "copy-webpack-plugin": "^14.0.0", | ||
| "css-loader": "^7.1.2", | ||
| "@types/node": "^22.20.0", | ||
| "@vitest/coverage-v8": "^4.0.18", | ||
| "eslint": "^9.39.2", | ||
| "html-webpack-plugin": "^5.6.6", | ||
| "jest": "^30.2.0", | ||
| "jest-environment-jsdom": "^30.2.0", | ||
| "jest-fetch-mock": "^3.0.3", | ||
| "node-polyfill-webpack-plugin": "^4.1.0", | ||
| "rdflib": "^2.3.6", | ||
| "solid-logic": "^4.0.6", | ||
| "solid-ui": "^3.1.0", | ||
| "style-loader": "^4.0.0", | ||
| "terser-webpack-plugin": "^5.4.0", | ||
| "webpack": "^5.97.1", | ||
| "webpack-cli": "^7.0.2", | ||
| "webpack-dev-server": "^5.2.3" | ||
| } | ||
| "jsdom": "^28.1.0", | ||
| "pane-registry": "3.1.2-1", | ||
| "rdflib": "2.4.0", | ||
| "solid-logic": "4.0.8-1", | ||
| "solid-ui": "3.1.3-9", | ||
| "solidos-toolkit": "dev" | ||
| }, |
Comment on lines
+21
to
+24
| - JavaScript | ||
| - Vite | ||
| - Eslint | ||
| - SolidOS |
Comment on lines
+18
to
24
| update-deps: | ||
| uses: SolidOS/solidos/.github/workflows/update-solidos-deps.yml@main | ||
| secrets: inherit | ||
|
|
||
| build: | ||
| needs: update-deps | ||
| runs-on: ubuntu-latest |
…istry@3.1.2-2 solid-ui@3.1.3-9) (latest: rdflib@2.4.0)
missing mime-types to build mashlib
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.
No description provided.