@grame/faustwasm 0.16.3 → 0.16.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grame/faustwasm",
3
- "version": "0.16.3",
3
+ "version": "0.16.5",
4
4
  "description": "WebAssembly version of Faust Compiler",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/esm/index.d.ts",
@@ -47,13 +47,16 @@
47
47
  "@webaudiomodules/api": "^2.0.0-alpha.6",
48
48
  "@webaudiomodules/sdk-parammgr": "^0.0.13",
49
49
  "dts-bundle-generator": "^9.5.1",
50
- "esbuild": "^0.27.0",
50
+ "esbuild": "^0.28.1",
51
51
  "eslint": "^9.39.1",
52
52
  "prettier": "^3.6.2",
53
53
  "typescript": "^5.4.5",
54
- "typescript-eslint": "^8.46.3"
54
+ "typescript-eslint": "8.46.3"
55
55
  },
56
56
  "dependencies": {
57
57
  "@types/emscripten": "^1.39.10"
58
+ },
59
+ "allowScripts": {
60
+ "esbuild@0.28.1": true
58
61
  }
59
62
  }
@@ -14,7 +14,8 @@ const instantiateFaustModuleFromFile = async (
14
14
  let FaustModule: FaustModuleFactory;
15
15
  let dataBinary: ArrayBuffer;
16
16
  let wasmBinary: ArrayBuffer;
17
- const jsCodeHead = /var (.+) = \(/;
17
+ // Match both `var FaustModule = (` (older emcc) and `var FaustModule=(` (emcc 5.x)
18
+ const jsCodeHead = /var (\w+)\s*=\s*\(/;
18
19
  if (typeof window === 'object') {
19
20
  let jsCode = await (await fetch(jsFile)).text();
20
21
  jsCode = `${jsCode}
@@ -12,7 +12,7 @@ var instantiateFaustModuleFromFile = async (jsFile, dataFile = jsFile.replace(/c
12
12
  let FaustModule;
13
13
  let dataBinary;
14
14
  let wasmBinary;
15
- const jsCodeHead = /var (.+) = \(/;
15
+ const jsCodeHead = /var (\w+)\s*=\s*\(/;
16
16
  if (typeof window === "object") {
17
17
  let jsCode = await (await fetch(jsFile)).text();
18
18
  jsCode = `${jsCode}