fast-mesh-wasm 0.0.0 → 0.2.0

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/README.md CHANGED
@@ -35,11 +35,12 @@ const indices = new Uint32Array([0, 1, 2, 0, 2, 3]);
35
35
  const normals = computeVertexNormals(positions, indices);
36
36
  // Float32Array [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1]
37
37
 
38
- using bounds = computeBounds(positions); // freed automatically at the end of the block
39
- bounds.min; // Float32Array [0, 0, 0]
40
- bounds.max; // Float32Array [1, 1, 0]
38
+ const bounds = computeBounds(positions);
39
+ // { min: [0, 0, 0], max: [1, 1, 0], center: [0.5, 0.5, 0], size: [1, 1, 0] }
41
40
  ```
42
41
 
42
+ Inputs can be typed arrays or plain arrays: `Float32Array` positions and `Uint32Array` indices are used without copying, while `Uint16Array`, `Float64Array` and `number[]` are converted once.
43
+
43
44
  ### With three.js
44
45
 
45
46
  ```ts
@@ -47,10 +48,7 @@ const geometry = new THREE.BufferGeometry();
47
48
  geometry.setAttribute("position", new THREE.BufferAttribute(positions, 3));
48
49
  geometry.setIndex(new THREE.BufferAttribute(indices, 1));
49
50
 
50
- const normals = computeVertexNormals(
51
- geometry.attributes.position.array as Float32Array,
52
- geometry.index!.array as Uint32Array,
53
- );
51
+ const normals = computeVertexNormals(geometry.attributes.position.array, geometry.index!.array);
54
52
  geometry.setAttribute("normal", new THREE.BufferAttribute(normals, 3));
55
53
  ```
56
54
 
@@ -58,33 +56,18 @@ geometry.setAttribute("normal", new THREE.BufferAttribute(normals, 3));
58
56
 
59
57
  | Function | Returns | Description |
60
58
  | --- | --- | --- |
61
- | `init(input?)` | `Promise<void>` | Loads the WebAssembly module. Call once before anything else. Safe to call repeatedly. |
59
+ | `init(input?)` | `Promise<void>` | Loads the WebAssembly module. Required once in browsers; resolves immediately in Node.js and Bun. Safe to call repeatedly. `input` optionally overrides where the `.wasm` file comes from (`InitInput`). |
62
60
  | `computeVertexNormals(positions, indices)` | `Float32Array` | Smooth, area-weighted per-vertex normals. Same length as `positions`. |
63
- | `computeBounds(positions)` | `Bounds` | Axis-aligned bounding box with `min`, `max`, `center` and `size`. |
64
-
65
- All functions throw an `Error` with a readable message when a buffer length is not a multiple of 3 or an index is out of range.
66
-
67
- ### Memory
68
-
69
- Objects returned as classes (such as `Bounds`) live in WebAssembly memory, which the JavaScript garbage collector does not reclaim right away. Release them with `using` (TypeScript 5.2+, modern runtimes) or by calling `.free()`:
70
-
71
- ```ts
72
- const bounds = computeBounds(positions);
73
- try {
74
- console.log(bounds.size);
75
- } finally {
76
- bounds.free();
77
- }
78
- ```
61
+ | `computeBounds(positions)` | `Bounds` | Plain object `{ min, max, center, size }`, each a `[x, y, z]` array. |
79
62
 
80
- Typed arrays such as the result of `computeVertexNormals` are ordinary JavaScript copies and need no cleanup.
63
+ All functions throw an `Error` with a readable message when a buffer length is not a multiple of 3 or an index is out of range, and when called before `init()` has finished in the browser.
81
64
 
82
65
  ## Supported environments
83
66
 
84
67
  | Environment | Entry | Notes |
85
68
  | --- | --- | --- |
86
69
  | Browsers via a bundler | `dist/web.js` | Vite, webpack 5, Next.js and others copy the `.wasm` asset automatically |
87
- | Node.js 22+ | `dist/node.js` | The module is ready on import |
70
+ | Node.js 22+ | `dist/node.js` | The module is ready on import, also inside webpack server bundles (e.g. Next.js) |
88
71
  | Bun | `dist/node.js` | Same as Node.js |
89
72
 
90
73
  The right entry is picked automatically through the `exports` field of `package.json`. The package is ESM only.
@@ -0,0 +1,64 @@
1
+ import * as wasm from "./wasm/fast_mesh_wasm.js";
2
+ //#region src/api.ts
3
+ let initialized = false;
4
+ /** Called by the entry point once the WebAssembly module is instantiated. */
5
+ function markInitialized() {
6
+ initialized = true;
7
+ }
8
+ function ensureInitialized(fn) {
9
+ if (!initialized) throw new Error(`fast-mesh-wasm is not initialized: call \`await init()\` before ${fn}().`);
10
+ }
11
+ function toFloat32(values) {
12
+ return values instanceof Float32Array ? values : Float32Array.from(values);
13
+ }
14
+ function toUint32(values) {
15
+ return values instanceof Uint32Array ? values : Uint32Array.from(values);
16
+ }
17
+ /**
18
+ * Computes smooth, area-weighted per-vertex normals.
19
+ *
20
+ * @param positions - Vertex positions. Length must be a multiple of 3.
21
+ * @param indices - Triangle indices. Length must be a multiple of 3.
22
+ * @returns Normals with the same length as `positions`. Vertices not used by any triangle get `[0, 0, 0]`.
23
+ * @throws If a length is not a multiple of 3 or an index is out of range.
24
+ */
25
+ function computeVertexNormals(positions, indices) {
26
+ ensureInitialized("computeVertexNormals");
27
+ return wasm.computeVertexNormals(toFloat32(positions), toUint32(indices));
28
+ }
29
+ /**
30
+ * Computes the axis-aligned bounding box of a mesh.
31
+ *
32
+ * @param positions - Vertex positions. Length must be a non-zero multiple of 3.
33
+ * @throws If `positions` is empty or its length is not a multiple of 3.
34
+ */
35
+ function computeBounds(positions) {
36
+ ensureInitialized("computeBounds");
37
+ const b = wasm.computeBounds(toFloat32(positions));
38
+ const min = [
39
+ b[0],
40
+ b[1],
41
+ b[2]
42
+ ];
43
+ const max = [
44
+ b[3],
45
+ b[4],
46
+ b[5]
47
+ ];
48
+ return {
49
+ min,
50
+ max,
51
+ center: [
52
+ (min[0] + max[0]) / 2,
53
+ (min[1] + max[1]) / 2,
54
+ (min[2] + max[2]) / 2
55
+ ],
56
+ size: [
57
+ max[0] - min[0],
58
+ max[1] - min[1],
59
+ max[2] - min[2]
60
+ ]
61
+ };
62
+ }
63
+ //#endregion
64
+ export { computeVertexNormals as n, markInitialized as r, computeBounds as t };
@@ -0,0 +1,43 @@
1
+ import { InitInput } from "./wasm/fast_mesh_wasm.js";
2
+ //#region src/api.d.ts
3
+ /** A 3D vector `[x, y, z]`. */
4
+ type Vec3 = [x: number, y: number, z: number];
5
+ /**
6
+ * Flat vertex positions `[x0, y0, z0, x1, y1, z1, ...]`.
7
+ * A `Float32Array` is used as is; any other array is converted once.
8
+ */
9
+ type Positions = Float32Array | ArrayLike<number>;
10
+ /**
11
+ * Flat triangle indices `[a0, b0, c0, a1, ...]`.
12
+ * A `Uint32Array` is used as is; `Uint16Array` (common in three.js) and plain arrays are converted once.
13
+ */
14
+ type Indices = Uint32Array | Uint16Array | ArrayLike<number>;
15
+ /** Axis-aligned bounding box. */
16
+ interface Bounds {
17
+ /** Smallest coordinate on each axis. */
18
+ min: Vec3;
19
+ /** Largest coordinate on each axis. */
20
+ max: Vec3;
21
+ /** Box center. */
22
+ center: Vec3;
23
+ /** Box extent: `[width, height, depth]`. */
24
+ size: Vec3;
25
+ }
26
+ /**
27
+ * Computes smooth, area-weighted per-vertex normals.
28
+ *
29
+ * @param positions - Vertex positions. Length must be a multiple of 3.
30
+ * @param indices - Triangle indices. Length must be a multiple of 3.
31
+ * @returns Normals with the same length as `positions`. Vertices not used by any triangle get `[0, 0, 0]`.
32
+ * @throws If a length is not a multiple of 3 or an index is out of range.
33
+ */
34
+ declare function computeVertexNormals(positions: Positions, indices: Indices): Float32Array;
35
+ /**
36
+ * Computes the axis-aligned bounding box of a mesh.
37
+ *
38
+ * @param positions - Vertex positions. Length must be a non-zero multiple of 3.
39
+ * @throws If `positions` is empty or its length is not a multiple of 3.
40
+ */
41
+ declare function computeBounds(positions: Positions): Bounds;
42
+ //#endregion
43
+ export { Vec3 as a, Positions as i, Indices as n, computeBounds as o, InitInput as r, computeVertexNormals as s, Bounds as t };
package/dist/node.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { Bounds, computeBounds, computeVertexNormals } from "./wasm/fast_mesh_wasm.js";
1
+ import { a as Vec3, i as Positions, n as Indices, o as computeBounds, r as InitInput, s as computeVertexNormals, t as Bounds } from "./api-HcskOwd7.js";
2
2
  //#region src/node.d.ts
3
3
  /**
4
4
  * Resolves immediately: in Node.js and Bun the module is ready as soon as it is imported.
5
- * Exists so the same code runs in the browser, where `await init()` is required.
5
+ * Accepts the same argument as the browser `init()` so the same code runs everywhere;
6
+ * the argument is ignored.
6
7
  */
7
- export declare function init(): Promise<void>;
8
+ export declare function init(_input?: InitInput | Promise<InitInput>): Promise<void>;
8
9
  //#endregion
9
- export { Bounds, computeBounds, computeVertexNormals };
10
+ export { type Bounds, type Indices, type InitInput, type Positions, type Vec3, computeBounds, computeVertexNormals };
package/dist/node.js CHANGED
@@ -1,13 +1,16 @@
1
- import { Bounds, computeBounds, computeVertexNormals, initSync } from "./wasm/fast_mesh_wasm.js";
1
+ import { n as computeVertexNormals, r as markInitialized, t as computeBounds } from "./api-D0o2HjaU.js";
2
+ import { initSync } from "./wasm/fast_mesh_wasm.js";
2
3
  import { readFileSync } from "node:fs";
3
4
  //#region src/node.ts
4
5
  initSync({ module: readFileSync(new URL("./wasm/fast_mesh_wasm_bg.wasm", import.meta.url)) });
6
+ markInitialized();
5
7
  /**
6
8
  * Resolves immediately: in Node.js and Bun the module is ready as soon as it is imported.
7
- * Exists so the same code runs in the browser, where `await init()` is required.
9
+ * Accepts the same argument as the browser `init()` so the same code runs everywhere;
10
+ * the argument is ignored.
8
11
  */
9
- function init() {
12
+ function init(_input) {
10
13
  return Promise.resolve();
11
14
  }
12
15
  //#endregion
13
- export { Bounds, computeBounds, computeVertexNormals, init };
16
+ export { computeBounds, computeVertexNormals, init };
@@ -2,48 +2,14 @@
2
2
  /* eslint-disable */
3
3
 
4
4
  /**
5
- * Axis-aligned bounding box returned by {@link computeBounds}.
6
- */
7
- export class Bounds {
8
- private constructor();
9
- free(): void;
10
- [Symbol.dispose](): void;
11
- /**
12
- * Box center `[x, y, z]`.
13
- */
14
- readonly center: Float32Array;
15
- /**
16
- * Largest `[x, y, z]` over all vertices.
17
- */
18
- readonly max: Float32Array;
19
- /**
20
- * Smallest `[x, y, z]` over all vertices.
21
- */
22
- readonly min: Float32Array;
23
- /**
24
- * Box extent `[width, height, depth]`.
25
- */
26
- readonly size: Float32Array;
27
- }
28
-
29
- /**
30
- * Computes the axis-aligned bounding box of a mesh.
5
+ * Axis-aligned bounding box as six floats: `[minX, minY, minZ, maxX, maxY, maxZ]`.
31
6
  *
32
- * The returned object owns WebAssembly memory. Call `free()` when done,
33
- * or declare it with `using` so it is released automatically.
34
- *
35
- * @param positions - Vertex positions `[x0, y0, z0, x1, ...]`. Length must be a multiple of 3.
36
- * @throws If `positions` is empty or its length is not a multiple of 3.
7
+ * Returned as plain numbers so JavaScript never holds WebAssembly memory for it.
37
8
  */
38
- export function computeBounds(positions: Float32Array): Bounds;
9
+ export function computeBounds(positions: Float32Array): Float32Array;
39
10
 
40
11
  /**
41
- * Computes smooth, area-weighted per-vertex normals.
42
- *
43
- * @param positions - Vertex positions `[x0, y0, z0, x1, ...]`. Length must be a multiple of 3.
44
- * @param indices - Triangle indices `[a0, b0, c0, a1, ...]`. Length must be a multiple of 3.
45
- * @returns Normals with the same length as `positions`. Unused vertices get `[0, 0, 0]`.
46
- * @throws If a buffer length is not a multiple of 3 or an index is out of range.
12
+ * Smooth, area-weighted per-vertex normals; same length as `positions`.
47
13
  */
48
14
  export function computeVertexNormals(positions: Float32Array, indices: Uint32Array): Float32Array;
49
15
 
@@ -51,17 +17,12 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
51
17
 
52
18
  export interface InitOutput {
53
19
  readonly memory: WebAssembly.Memory;
54
- readonly __wbg_bounds_free: (a: number, b: number) => void;
55
- readonly bounds_center: (a: number) => [number, number];
56
- readonly bounds_max: (a: number) => [number, number];
57
- readonly bounds_min: (a: number) => [number, number];
58
- readonly bounds_size: (a: number) => [number, number];
59
- readonly computeBounds: (a: number, b: number) => [number, number, number];
20
+ readonly computeBounds: (a: number, b: number) => [number, number, number, number];
60
21
  readonly computeVertexNormals: (a: number, b: number, c: number, d: number) => [number, number, number, number];
61
22
  readonly __wbindgen_externrefs: WebAssembly.Table;
62
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
63
23
  readonly __wbindgen_malloc: (a: number, b: number) => number;
64
24
  readonly __externref_table_dealloc: (a: number) => void;
25
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
65
26
  readonly __wbindgen_start: () => void;
66
27
  }
67
28
 
@@ -1,96 +1,26 @@
1
1
  /* @ts-self-types="./fast_mesh_wasm.d.ts" */
2
2
 
3
3
  /**
4
- * Axis-aligned bounding box returned by {@link computeBounds}.
5
- */
6
- export class Bounds {
7
- static __wrap(ptr) {
8
- const obj = Object.create(Bounds.prototype);
9
- obj.__wbg_ptr = ptr;
10
- BoundsFinalization.register(obj, obj.__wbg_ptr, obj);
11
- return obj;
12
- }
13
- __destroy_into_raw() {
14
- const ptr = this.__wbg_ptr;
15
- this.__wbg_ptr = 0;
16
- BoundsFinalization.unregister(this);
17
- return ptr;
18
- }
19
- free() {
20
- const ptr = this.__destroy_into_raw();
21
- wasm.__wbg_bounds_free(ptr, 0);
22
- }
23
- /**
24
- * Box center `[x, y, z]`.
25
- * @returns {Float32Array}
26
- */
27
- get center() {
28
- const ret = wasm.bounds_center(this.__wbg_ptr);
29
- var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
30
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
31
- return v1;
32
- }
33
- /**
34
- * Largest `[x, y, z]` over all vertices.
35
- * @returns {Float32Array}
36
- */
37
- get max() {
38
- const ret = wasm.bounds_max(this.__wbg_ptr);
39
- var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
40
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
41
- return v1;
42
- }
43
- /**
44
- * Smallest `[x, y, z]` over all vertices.
45
- * @returns {Float32Array}
46
- */
47
- get min() {
48
- const ret = wasm.bounds_min(this.__wbg_ptr);
49
- var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
50
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
51
- return v1;
52
- }
53
- /**
54
- * Box extent `[width, height, depth]`.
55
- * @returns {Float32Array}
56
- */
57
- get size() {
58
- const ret = wasm.bounds_size(this.__wbg_ptr);
59
- var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
60
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
61
- return v1;
62
- }
63
- }
64
- if (Symbol.dispose) Bounds.prototype[Symbol.dispose] = Bounds.prototype.free;
65
-
66
- /**
67
- * Computes the axis-aligned bounding box of a mesh.
68
- *
69
- * The returned object owns WebAssembly memory. Call `free()` when done,
70
- * or declare it with `using` so it is released automatically.
4
+ * Axis-aligned bounding box as six floats: `[minX, minY, minZ, maxX, maxY, maxZ]`.
71
5
  *
72
- * @param positions - Vertex positions `[x0, y0, z0, x1, ...]`. Length must be a multiple of 3.
73
- * @throws If `positions` is empty or its length is not a multiple of 3.
6
+ * Returned as plain numbers so JavaScript never holds WebAssembly memory for it.
74
7
  * @param {Float32Array} positions
75
- * @returns {Bounds}
8
+ * @returns {Float32Array}
76
9
  */
77
10
  export function computeBounds(positions) {
78
11
  const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_malloc);
79
12
  const len0 = WASM_VECTOR_LEN;
80
13
  const ret = wasm.computeBounds(ptr0, len0);
81
- if (ret[2]) {
82
- throw takeFromExternrefTable0(ret[1]);
14
+ if (ret[3]) {
15
+ throw takeFromExternrefTable0(ret[2]);
83
16
  }
84
- return Bounds.__wrap(ret[0]);
17
+ var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
18
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
19
+ return v2;
85
20
  }
86
21
 
87
22
  /**
88
- * Computes smooth, area-weighted per-vertex normals.
89
- *
90
- * @param positions - Vertex positions `[x0, y0, z0, x1, ...]`. Length must be a multiple of 3.
91
- * @param indices - Triangle indices `[a0, b0, c0, a1, ...]`. Length must be a multiple of 3.
92
- * @returns Normals with the same length as `positions`. Unused vertices get `[0, 0, 0]`.
93
- * @throws If a buffer length is not a multiple of 3 or an index is out of range.
23
+ * Smooth, area-weighted per-vertex normals; same length as `positions`.
94
24
  * @param {Float32Array} positions
95
25
  * @param {Uint32Array} indices
96
26
  * @returns {Float32Array}
@@ -115,9 +45,6 @@ function __wbg_get_imports() {
115
45
  const ret = Error(getStringFromWasm0(arg0, arg1));
116
46
  return ret;
117
47
  },
118
- __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
119
- throw new Error(getStringFromWasm0(arg0, arg1));
120
- },
121
48
  __wbindgen_init_externref_table: function() {
122
49
  const table = wasm.__wbindgen_externrefs;
123
50
  const offset = table.grow(4);
@@ -134,10 +61,6 @@ function __wbg_get_imports() {
134
61
  };
135
62
  }
136
63
 
137
- const BoundsFinalization = (typeof FinalizationRegistry === 'undefined')
138
- ? { register: () => {}, unregister: () => {} }
139
- : new FinalizationRegistry(ptr => wasm.__wbg_bounds_free(ptr, 1));
140
-
141
64
  function getArrayF32FromWasm0(ptr, len) {
142
65
  ptr = ptr >>> 0;
143
66
  return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
Binary file
@@ -1,15 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_bounds_free: (a: number, b: number) => void;
5
- export const bounds_center: (a: number) => [number, number];
6
- export const bounds_max: (a: number) => [number, number];
7
- export const bounds_min: (a: number) => [number, number];
8
- export const bounds_size: (a: number) => [number, number];
9
- export const computeBounds: (a: number, b: number) => [number, number, number];
4
+ export const computeBounds: (a: number, b: number) => [number, number, number, number];
10
5
  export const computeVertexNormals: (a: number, b: number, c: number, d: number) => [number, number, number, number];
11
6
  export const __wbindgen_externrefs: WebAssembly.Table;
12
- export const __wbindgen_free: (a: number, b: number, c: number) => void;
13
7
  export const __wbindgen_malloc: (a: number, b: number) => number;
14
8
  export const __externref_table_dealloc: (a: number) => void;
9
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
15
10
  export const __wbindgen_start: () => void;
package/dist/web.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Bounds, InitInput, computeBounds, computeVertexNormals } from "./wasm/fast_mesh_wasm.js";
1
+ import { a as Vec3, i as Positions, n as Indices, o as computeBounds, r as InitInput, s as computeVertexNormals, t as Bounds } from "./api-HcskOwd7.js";
2
2
  //#region src/web.d.ts
3
3
  /**
4
4
  * Loads the WebAssembly module. Await this once before calling any other function.
@@ -9,4 +9,4 @@ import { Bounds, InitInput, computeBounds, computeVertexNormals } from "./wasm/f
9
9
  */
10
10
  export declare function init(input?: InitInput | Promise<InitInput>): Promise<void>;
11
11
  //#endregion
12
- export { Bounds, computeBounds, computeVertexNormals };
12
+ export { type Bounds, type Indices, type InitInput, type Positions, type Vec3, computeBounds, computeVertexNormals };
package/dist/web.js CHANGED
@@ -1,4 +1,5 @@
1
- import wasmInit, { Bounds, computeBounds, computeVertexNormals } from "./wasm/fast_mesh_wasm.js";
1
+ import { n as computeVertexNormals, r as markInitialized, t as computeBounds } from "./api-D0o2HjaU.js";
2
+ import wasmInit from "./wasm/fast_mesh_wasm.js";
2
3
  //#region src/web.ts
3
4
  let ready;
4
5
  /**
@@ -9,8 +10,8 @@ let ready;
9
10
  * Leave empty to load the file shipped with this package.
10
11
  */
11
12
  function init(input) {
12
- ready ??= wasmInit(input === void 0 ? void 0 : { module_or_path: input }).then(() => {});
13
+ ready ??= wasmInit(input === void 0 ? void 0 : { module_or_path: input }).then(markInitialized);
13
14
  return ready;
14
15
  }
15
16
  //#endregion
16
- export { Bounds, computeBounds, computeVertexNormals, init };
17
+ export { computeBounds, computeVertexNormals, init };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-mesh-wasm",
3
- "version": "0.0.0",
3
+ "version": "0.2.0",
4
4
  "description": "Fast triangle mesh utilities for JavaScript, written in Rust and compiled to WebAssembly",
5
5
  "keywords": [
6
6
  "mesh",
@@ -22,7 +22,9 @@
22
22
  "license": "MIT OR Apache-2.0",
23
23
  "author": "DongGeun Yoon",
24
24
  "type": "module",
25
- "sideEffects": false,
25
+ "sideEffects": [
26
+ "./dist/node.js"
27
+ ],
26
28
  "exports": {
27
29
  ".": {
28
30
  "node": {
@@ -43,11 +45,6 @@
43
45
  "engines": {
44
46
  "node": ">=22"
45
47
  },
46
- "scripts": {
47
- "build": "tsdown",
48
- "test": "vitest run",
49
- "check": "publint --strict && attw --pack . --profile esm-only"
50
- },
51
48
  "devDependencies": {
52
49
  "@arethetypeswrong/cli": "^0.18.5",
53
50
  "@types/node": "^24.19.2",
@@ -59,5 +56,10 @@
59
56
  "publishConfig": {
60
57
  "access": "public",
61
58
  "provenance": true
59
+ },
60
+ "scripts": {
61
+ "build": "tsdown",
62
+ "test": "vitest run",
63
+ "check": "publint --strict && attw --pack . --profile esm-only"
62
64
  }
63
- }
65
+ }