@oxc-parser/binding-wasm32-wasi 0.78.0 → 0.79.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.
@@ -5,7 +5,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
5
5
  throw Error('Dynamic require of "' + x + '" is not supported');
6
6
  });
7
7
 
8
- // ../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.0.0/node_modules/@napi-rs/wasm-runtime/dist/runtime.js
8
+ // ../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.0.1/node_modules/@napi-rs/wasm-runtime/dist/runtime.js
9
9
  var _WebAssembly$2 = typeof WebAssembly !== "undefined" ? WebAssembly : typeof WXWebAssembly !== "undefined" ? WXWebAssembly : void 0;
10
10
  var ENVIRONMENT_IS_NODE = false;
11
11
  function getPostMessage(options) {
@@ -207,12 +207,16 @@ var ThreadManager = /* @__PURE__ */ function() {
207
207
  if (worker.__emnapi_tid !== void 0) {
208
208
  message = "worker (tid = " + worker.__emnapi_tid + ") sent an error!";
209
209
  }
210
- err(message + " " + e.message);
211
- if (e.message.indexOf("RuntimeError") !== -1 || e.message.indexOf("unreachable") !== -1) {
212
- try {
213
- _this.terminateAllThreads();
214
- } catch (_) {
210
+ if ("message" in e) {
211
+ err(message + " " + e.message);
212
+ if (e.message.indexOf("RuntimeError") !== -1 || e.message.indexOf("unreachable") !== -1) {
213
+ try {
214
+ _this.terminateAllThreads();
215
+ } catch (_) {
216
+ }
215
217
  }
218
+ } else {
219
+ err(message);
216
220
  }
217
221
  reject(e);
218
222
  throw e;
@@ -485,7 +489,7 @@ var WASIThreads = /* @__PURE__ */ function() {
485
489
  Atomics.notify(struct_1, 1);
486
490
  return 1;
487
491
  } else {
488
- return -6;
492
+ return -EAGAIN;
489
493
  }
490
494
  }
491
495
  if (!isNewABI) {
@@ -569,7 +573,7 @@ var WASIThreads = /* @__PURE__ */ function() {
569
573
  return 1;
570
574
  }
571
575
  free(errorOrTid);
572
- return -6;
576
+ return -EAGAIN;
573
577
  }
574
578
  Atomics.store(struct, 0, 0);
575
579
  Atomics.store(struct, 1, tid);
@@ -669,18 +673,20 @@ function patchWasiInstance(wasiThreads, wasi) {
669
673
  return proc_exit_1.call(this, code);
670
674
  };
671
675
  }
672
- var start = wasi.start;
673
- if (typeof start === "function") {
674
- wasi.start = function(instance) {
675
- try {
676
- return start.call(this, instance);
677
- } catch (err) {
678
- if (isTrapError(err)) {
679
- _this.terminateAllThreads();
676
+ if (!_this.childThread) {
677
+ var start_1 = wasi.start;
678
+ if (typeof start_1 === "function") {
679
+ wasi.start = function(instance) {
680
+ try {
681
+ return start_1.call(this, instance);
682
+ } catch (err) {
683
+ if (isTrapError(err)) {
684
+ _this.terminateAllThreads();
685
+ }
686
+ throw err;
680
687
  }
681
- throw err;
682
- }
683
- };
688
+ };
689
+ }
684
690
  }
685
691
  patched.add(wasi);
686
692
  }
@@ -8849,7 +8855,7 @@ var _Buffer = typeof Buffer === "function" ? Buffer : /* @__PURE__ */ function()
8849
8855
  }
8850
8856
  return void 0;
8851
8857
  }();
8852
- var version = "1.4.3";
8858
+ var version = "1.4.5";
8853
8859
  var NODE_API_SUPPORTED_VERSION_MAX = 10;
8854
8860
  var NAPI_VERSION_EXPERIMENTAL = 2147483647;
8855
8861
  var NODE_API_DEFAULT_MODULE_API_VERSION = 8;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-parser/binding-wasm32-wasi",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "cpu": [
5
5
  "wasm32"
6
6
  ],
Binary file