@wasm-fmt/gofmt 0.1.1 → 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.
Files changed (2) hide show
  1. package/lib.js +1 -1
  2. package/package.json +2 -1
package/lib.js CHANGED
@@ -18,7 +18,7 @@ export async function format(input, wasm_url) {
18
18
  const bytes = fs.readFileSync(wasm_url);
19
19
  mod = new WebAssembly.Module(bytes);
20
20
  } else if ("instantiateStreaming" in WebAssembly) {
21
- mod = await WebAssembly.compileStreaming(fetch(wasm_url), go.importObject);
21
+ mod = await WebAssembly.compileStreaming(fetch(wasm_url));
22
22
  } else {
23
23
  const response = await fetch(wasm_url);
24
24
  const bytes = await response.arrayBuffer();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wasm-fmt/gofmt",
3
3
  "author": "magic-akari <akari.ccino@gamil.com>",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "description": "wasm based gofmt",
6
6
  "main": "lib.js",
7
7
  "types": "lib.d.ts",
@@ -10,6 +10,7 @@
10
10
  "go_wasm": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./go_wasm.js",
11
11
  "patch": "git apply ./go_wasm.patch",
12
12
  "build": "tinygo build -o=lib.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go",
13
+ "postbuild": "npm run go_wasm && npm run patch",
13
14
  "test": "node --test"
14
15
  },
15
16
  "engines": {