@wasm-fmt/clang-format 0.0.1 → 0.0.2

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/clang-format.js +3 -5
  2. package/package.json +3 -2
package/clang-format.js CHANGED
@@ -19,19 +19,17 @@ export default async function init(wasm_url) {
19
19
  typeof process.versions.node == "string";
20
20
 
21
21
  var _require = typeof require !== "undefined" ? require : undefined;
22
- var __dirname = typeof __dirname !== "undefined" ? __dirname : undefined;
22
+ var _dirname = typeof __dirname !== "undefined" ? __dirname : undefined;
23
23
 
24
24
  if (ENVIRONMENT_IS_NODE) {
25
25
  _require ||= await import("module").then((m) =>
26
26
  m.createRequire(import.meta.url)
27
27
  );
28
28
 
29
- __dirname ||= await import("url").then((m) =>
30
- m.fileURLToPath(new URL(".", import.meta.url))
31
- );
29
+ _dirname ||= new URL(".", import.meta["url"]).pathname;
32
30
  }
33
31
 
34
- load(Module, _require, __dirname);
32
+ load(Module, _require, _dirname);
35
33
 
36
34
  return result;
37
35
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wasm-fmt/clang-format",
3
3
  "author": "magic-akari <akari.ccino@gamil.com>",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "description": "A wasm based clang-format",
6
6
  "main": "clang-format.js",
7
7
  "types": "clang-format.d.ts",
@@ -32,7 +32,8 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "publishConfig": {
35
- "access": "public"
35
+ "access": "public",
36
+ "provenance": true
36
37
  },
37
38
  "bugs": {
38
39
  "url": "https://github.com/wasm-fmt/clang-format/issues"