@wasm-fmt/gofmt 0.3.1 → 0.3.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 +46 -36
package/lib.js CHANGED
@@ -13,7 +13,7 @@ export default async function init(wasm_url) {
13
13
  }
14
14
 
15
15
  if (typeof wasm_url === "string") {
16
- wasm_url = new URL(wasm_url);
16
+ wasm_url = new URL(wasm_url, import.meta.url);
17
17
  }
18
18
 
19
19
  if (
package/package.json CHANGED
@@ -1,40 +1,50 @@
1
1
  {
2
- "name": "@wasm-fmt/gofmt",
3
- "author": "magic-akari <akari.ccino@gamil.com>",
4
- "version": "0.3.1",
5
- "description": "wasm based gofmt",
6
- "main": "lib.js",
7
- "types": "lib.d.ts",
8
- "type": "module",
9
- "exports": {
10
- ".": {
11
- "types": "./lib.d.ts",
12
- "default": "./lib.js"
2
+ "name": "@wasm-fmt/gofmt",
3
+ "description": "A wasm based golang formatter",
4
+ "author": "magic-akari <akari.ccino@gamil.com>",
5
+ "version": "0.3.3",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "wasm",
9
+ "golang",
10
+ "formatter"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/wasm-fmt/gofmt"
13
15
  },
14
- "./vite": {
15
- "types": "./lib.d.ts",
16
- "default": "./vite.js"
16
+ "homepage": "https://github.com/wasm-fmt/gofmt",
17
+ "bugs": {
18
+ "url": "https://github.com/wasm-fmt/gofmt/issues"
17
19
  },
18
- "./package.json": "./package.json",
19
- "./*": "./*"
20
- },
21
- "scripts": {
22
- "go_wasm": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./go_wasm.js",
23
- "patch": "git apply ./go_wasm.patch",
24
- "build": "tinygo build -o=lib.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go",
25
- "postbuild": "npm run go_wasm && npm run patch",
26
- "test": "node --test"
27
- },
28
- "engines": {
29
- "node": ">=16.17.0"
30
- },
31
- "keywords": [
32
- "wasm",
33
- "golang",
34
- "formatter"
35
- ],
36
- "license": "MIT",
37
- "publishConfig": {
38
- "access": "public"
39
- }
20
+ "type": "module",
21
+ "main": "lib.js",
22
+ "module": "lib.js",
23
+ "types": "lib.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./lib.d.ts",
27
+ "default": "./lib.js"
28
+ },
29
+ "./vite": {
30
+ "types": "./lib.d.ts",
31
+ "default": "./vite.js"
32
+ },
33
+ "./package.json": "./package.json",
34
+ "./*": "./*"
35
+ },
36
+ "scripts": {
37
+ "go_wasm": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./go_wasm.js",
38
+ "patch": "git apply ./go_wasm.patch",
39
+ "build": "tinygo build -o=lib.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go",
40
+ "postbuild": "npm run go_wasm && npm run patch",
41
+ "test": "node --test"
42
+ },
43
+ "engines": {
44
+ "node": ">=16.17.0"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public",
48
+ "provenance": true
49
+ }
40
50
  }