Conversation
Jarbuckle
added this pull request to stack #306
September 9, 2026 19:27
2 of 8 tasks
lanesawyer
reviewed
Sep 10, 2026
lanesawyer
left a comment
Collaborator
There was a problem hiding this comment.
One simplification and a question
|
|
||
| export default defineConfig({ | ||
| test: { | ||
| setupFiles: [fileURLToPath(new URL('./vitest.setup.ts', import.meta.url))], |
Collaborator
There was a problem hiding this comment.
Can this not be just the string?
Docs suggest it'll resolve just fine: https://vitest.dev/guide/learn/setup-teardown.html#setup-files
Suggested change
| setupFiles: [fileURLToPath(new URL('./vitest.setup.ts', import.meta.url))], | |
| setupFiles: ['./vitest.setup.ts'] |
| * Vitest global setup. Polyfills typed-array constructors and WebGPU globals that webgpu-utils | ||
| * references at module-init time but Node hasn't exposed by default yet. | ||
| * | ||
| * `Float16Array` is stage-4 ES but in Node 22.x requires the `--js-float16array` flag. We map it |
Collaborator
There was a problem hiding this comment.
What about Node 24? Or 26 (which becomes LTS in a few weeks)? Not sure if we can simplify or remove pieces if the newer versions have better support?
Contributor
Author
There was a problem hiding this comment.
Ahhh, very good callout! It does look like it was released as stable in Node 24, so parts of this may be unnecessary -- sweet!
This branch has not been deployed
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.
chore(vis-core): Adding WebGPU Vitest configuration
What
Adds a Vitest setup file defining the WebGPU runtime globals (GPUBufferUsage, GPUShaderStage, GPUTextureUsage, GPUColorWrite) and Float16Array, none of which Node provides. The existing filter query path already dereferences GPUBufferUsage, and the WebGPU rendering modules landing in follow-up PRs depend on all of them.
Base of the new WebGPU Rendering System stack; memory, resources, renderer, and the demo page follow.
PR Checklist
main?