@oxc-parser/binding-wasm32-wasi 0.66.0 → 0.67.0

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.
@@ -12671,9 +12671,7 @@ function wrap(result) {
12671
12671
  let program, module, comments, errors;
12672
12672
  return {
12673
12673
  get program() {
12674
- if (!program) {
12675
- program = jsonParseAst(result.program);
12676
- }
12674
+ if (!program) program = jsonParseAst(result.program);
12677
12675
  return program;
12678
12676
  },
12679
12677
  get module() {
@@ -12690,22 +12688,23 @@ function wrap(result) {
12690
12688
  }
12691
12689
  };
12692
12690
  }
12693
- function jsonParseAst(ast) {
12694
- return JSON.parse(ast, function(key, value) {
12695
- if (value === null && key === "value" && Object.hasOwn(this, "type") && this.type === "Literal") {
12696
- if (Object.hasOwn(this, "bigint")) {
12697
- return BigInt(this.bigint);
12698
- }
12699
- if (Object.hasOwn(this, "regex")) {
12700
- const { regex } = this;
12701
- try {
12702
- return RegExp(regex.pattern, regex.flags);
12703
- } catch (_err) {
12704
- }
12691
+ function jsonParseAst(program) {
12692
+ return JSON.parse(program, transform);
12693
+ }
12694
+ function transform(key, value) {
12695
+ if (value === null && key === "value" && Object.hasOwn(this, "type") && this.type === "Literal") {
12696
+ if (Object.hasOwn(this, "bigint")) {
12697
+ return BigInt(this.bigint);
12698
+ }
12699
+ if (Object.hasOwn(this, "regex")) {
12700
+ const { regex } = this;
12701
+ try {
12702
+ return RegExp(regex.pattern, regex.flags);
12703
+ } catch (_err) {
12705
12704
  }
12706
12705
  }
12707
- return value;
12708
- });
12706
+ }
12707
+ return value;
12709
12708
  }
12710
12709
 
12711
12710
  // wasm.mjs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-parser/binding-wasm32-wasi",
3
- "version": "0.66.0",
3
+ "version": "0.67.0",
4
4
  "cpu": [
5
5
  "wasm32"
6
6
  ],
Binary file