deepwoken 0.2.9 → 0.2.91

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.
Files changed (2) hide show
  1. package/index.ts +3 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -9,8 +9,9 @@ const wasm = await import('./pkg/deepwoken.js');
9
9
 
10
10
  if (typeof process !== 'undefined' && process.versions?.node) {
11
11
  const { readFile } = await import('node:fs/promises');
12
- const { fileURLToPath } = await import('node:url');
13
- const wasmPath = fileURLToPath(new URL('./pkg/deepwoken_bg.wasm', import.meta.url));
12
+ const { createRequire } = await import('node:module');
13
+ const require = createRequire(import.meta.url);
14
+ const wasmPath = require.resolve('deepwoken/pkg/deepwoken_bg.wasm');
14
15
  await wasm.default(await readFile(wasmPath));
15
16
  } else {
16
17
  await wasm.default();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepwoken",
3
- "version": "0.2.9",
3
+ "version": "0.2.91",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",