@wasm-fmt/gofmt 0.7.1 → 0.7.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.
package/README.md CHANGED
@@ -32,12 +32,6 @@ const formatted = format(source);
32
32
  console.log(formatted);
33
33
  ```
34
34
 
35
- ## Node.js < 22.19
36
-
37
- ```JavaScript
38
- import { format } from "@wasm-fmt/gofmt/node";
39
- ```
40
-
41
35
  ## Web
42
36
 
43
37
  For web environments, you need to initialize WASM module manually:
@@ -67,6 +61,12 @@ await init();
67
61
  // ...
68
62
  ```
69
63
 
64
+ Or use the `./bundler` entry with [vite-plugin-wasm](https://www.npmjs.com/package/vite-plugin-wasm)
65
+
66
+ ```javascript
67
+ import { format } from "@wasm-fmt/gofmt/bundler";
68
+ ```
69
+
70
70
  ## Entry Points
71
71
 
72
72
  - `.` - Auto-detects environment (Node.js uses node, Webpack uses bundler, default is ESM)
package/gofmt_vite.js CHANGED
@@ -1,6 +1,5 @@
1
1
  /* @ts-self-types="./gofmt_web.d.ts" */
2
2
  import init from "./gofmt.wasm?init";
3
- import initAsync from "./gofmt_web.js";
4
3
  import { format as _format } from "./gofmt_binding.js";
5
4
 
6
5
  let wasm, wasmModule;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wasm-fmt/gofmt",
3
3
  "description": "A wasm based golang formatter",
4
4
  "author": "magic-akari <akari.ccino@gamil.com>",
5
- "version": "0.7.1",
5
+ "version": "0.7.3",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "wasm",
@@ -23,7 +23,9 @@
23
23
  "types": "./gofmt.d.ts",
24
24
  "webpack": "./gofmt.js",
25
25
  "deno": "./gofmt.js",
26
+ "bun": "./gofmt_node.js",
26
27
  "module-sync": "./gofmt_node.js",
28
+ "node": "./gofmt_node.js",
27
29
  "default": "./gofmt_esm.js"
28
30
  },
29
31
  "./esm": {