@danielsimonjr/mathts-wasm 0.1.3 → 0.1.5

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.
@@ -1,4 +1,4 @@
1
1
  {
2
- "mathts-debug.wasm": "sha384-DWpIT/Aj2P6lTUCvEX4wZi/wIBBILesWJ2DnuRw6fp0PMj6b8aOwNkLHtL657y4z",
3
- "mathts.wasm": "sha384-q/fiU1qnpj7vLiYnprGBDdO7on0S/Gnd5Pyql20PZxGfl9Jx0jdWPUGQe0FM91wo"
2
+ "mathts-debug.wasm": "sha384-KzTdnFUpxcpQaICrJd8xXGk8VHawWc3THNRWyYr+eYddzuJR3aFVIil1m3/Gsxka",
3
+ "mathts.wasm": "sha384-5Riad6qN9+B0bHxTlj6fvOwiOYBDx8byKGX6Ojv7RAyrLl6RkKq6CPlpX+oY4QCE"
4
4
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@danielsimonjr/mathts-wasm",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "MathTS WebAssembly module - high-performance numerical computing",
5
5
  "type": "module",
6
- "main": "build/release.js",
7
- "types": "build/release.d.ts",
6
+ "main": "build/mathts.js",
7
+ "types": "build/mathts.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "import": "./build/release.js",
11
- "types": "./build/release.d.ts"
10
+ "import": "./build/mathts.js",
11
+ "types": "./build/mathts.d.ts"
12
12
  },
13
13
  "./wasm": {
14
14
  "import": "./build/mathts.wasm"
@@ -24,11 +24,15 @@
24
24
  "scripts": {
25
25
  "asbuild:debug": "asc src/index.ts --target debug",
26
26
  "asbuild:release": "asc src/index.ts --target release",
27
- "asbuild": "npm run asbuild:debug && npm run asbuild:release",
27
+ "asbuild": "npm run asbuild:debug && npm run asbuild:release && npm run gen:manifest",
28
+ "gen:manifest": "node scripts/gen-wasm-manifest.mjs",
28
29
  "build:bindings": "tsc -p tsconfig.bindings.json",
29
30
  "build": "npm run asbuild && npm run build:bindings",
30
31
  "clean": "rm -rf build/",
31
- "test": "node tests/run.js && node tests/svd.test.mjs && node tests/special-numtheory.test.mjs && node tests/polynomial.test.mjs && node tests/signal.test.mjs && node tests/linalg.test.mjs && node tests/curvefit.test.mjs && node tests/optimization.test.mjs && node tests/approx.test.mjs && node tests/tensor.test.mjs",
32
+ "test": "node tests/run.js && node tests/svd.test.mjs && node tests/special-numtheory.test.mjs && node tests/polynomial.test.mjs && node tests/signal.test.mjs && node tests/linalg.test.mjs && node tests/curvefit.test.mjs && node tests/optimization.test.mjs && node tests/approx.test.mjs && node tests/tensor.test.mjs && npm run test:diff",
33
+ "test:diff": "node tests/diff-special.test.mjs && node tests/diff-decomposition.test.mjs",
34
+ "coverage:matrix": "python -X utf8 tests/audit/coverage_matrix.py",
35
+ "golden:gen": "python -X utf8 tests/golden/generate_goldens.py",
32
36
  "benchmark": "node --experimental-wasm-simd benchmarks/run.js"
33
37
  },
34
38
  "devDependencies": {
@@ -46,7 +46,7 @@ async function loadManifest(wasmPath: string): Promise<WasmManifest | null> {
46
46
  try {
47
47
  if (isNode) {
48
48
  const fs = await import('fs');
49
- const text = fs.readFileSync(manifestPath, 'utf8');
49
+ const text = await fs.promises.readFile(manifestPath, 'utf8');
50
50
  return JSON.parse(text) as WasmManifest;
51
51
  } else {
52
52
  const res = await fetch(manifestPath);
@@ -182,7 +182,7 @@ export async function loadWasm(source: string | BufferSource): Promise<MathTSWas
182
182
  const fs = await import('fs');
183
183
  const path = await import('path');
184
184
  const resolved = path.resolve(source);
185
- const buffer = fs.readFileSync(resolved);
185
+ const buffer = await fs.promises.readFile(resolved);
186
186
  await verifyWasm(buffer, resolved);
187
187
  wasmModule = await WebAssembly.compile(buffer);
188
188
  }