vitest-environment-webgl-node 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,7 +1,5 @@
1
- ## [vitest-environment-webgl-node-v0.1.2](https://github.com/bhouston/vitest-gpu/compare/vitest-environment-webgl-node-v0.1.1...vitest-environment-webgl-node-v0.1.2) (2026-09-18)
1
+ ## [vitest-environment-webgl-node-v0.1.3](https://github.com/bhouston/vitest-gpu/compare/vitest-environment-webgl-node-v0.1.2...vitest-environment-webgl-node-v0.1.3) (2026-09-21)
2
2
 
3
3
  ### Bug Fixes
4
4
 
5
- * restore globals after GPU environment teardown ([4232c31](https://github.com/bhouston/vitest-gpu/commit/4232c31e0fa056ee91acd9f270cb0fbed8ca3c04)), closes [#17](https://github.com/bhouston/vitest-gpu/issues/17)
6
- * ship sources referenced by package maps ([8db482e](https://github.com/bhouston/vitest-gpu/commit/8db482ed56714f375b53d9a30df3f080a86fb81d)), closes [#23](https://github.com/bhouston/vitest-gpu/issues/23)
7
- * support Vitest 3 environment transforms ([446f7f9](https://github.com/bhouston/vitest-gpu/commit/446f7f9041d61c3e5e66a111575f167389c0919c)), closes [#16](https://github.com/bhouston/vitest-gpu/issues/16)
5
+ * support public types across TypeScript versions ([0f3df06](https://github.com/bhouston/vitest-gpu/commit/0f3df067f28308e0154045304ecbcaf2ba840fcc)), closes [#24](https://github.com/bhouston/vitest-gpu/issues/24)
package/README.md CHANGED
@@ -8,6 +8,10 @@ the `WebGL*` classes and a file-reading `fetch()` before each test file, and rem
8
8
  `document.createElement('canvas').getContext('webgl2')` returns a GPU-backed context, so three.js,
9
9
  regl, pixi and plain WebGL code run unchanged.
10
10
 
11
+ Using Jest instead? See the equivalent
12
+ [`jest-environment-webgl-node`](https://github.com/bhouston/jest-gpu/tree/main/packages/jest-environment-webgl-node)
13
+ in [jest-gpu](https://github.com/bhouston/jest-gpu).
14
+
11
15
  ## Install
12
16
 
13
17
  ```sh
@@ -43,7 +47,19 @@ Options are those of node-webgl's `init()` (`backend`, `api`) and `installDOM()`
43
47
  (`baseDir`, `fetch`, `devicePixelRatio`, `innerWidth`, `innerHeight`, `frameInterval`).
44
48
  Pair with [`vitest-screenshot`](../vitest-screenshot) for pixel-diff assertions.
45
49
 
46
- Types for the installed globals: add `import 'vitest-environment-webgl-node/globals';` to a `.d.ts` file your tsconfig includes.
50
+ For a Node-only TypeScript project, opt into types for the installed globals by adding
51
+ `import 'vitest-environment-webgl-node/globals';` to a `.d.ts` file your tsconfig includes. Do not include
52
+ this entry in projects that load TypeScript's DOM library: the real browser globals and node-webgl's shims
53
+ intentionally have different types. DOM projects can use their standard global declarations and cast a
54
+ node-webgl canvas at the library boundary when necessary.
47
55
 
48
56
  On Linux CI install Mesa (`apt-get install libegl1 libgles2 libgl1-mesa-dri`) and set
49
57
  `LIBGL_ALWAYS_SOFTWARE=1`. macOS and Windows use prebuilt binaries.
58
+
59
+ ## Author
60
+
61
+ Created by [Ben Houston](https://ben3d.ca) and sponsored by [Land of Assets](https://landofassets.com).
62
+
63
+ ## License
64
+
65
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest-environment-webgl-node",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Vitest environment that provides real headless WebGL 1/2 (ANGLE via @onirenaud/node-webgl) in Node",
5
5
  "keywords": [
6
6
  "headless",