@oxc-parser/binding-wasm32-wasi 0.69.0 → 0.71.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@0.2.9/node_modules/@napi-rs/wasm-runtime/dist/runtime.js
8
+ // ../../node_modules/.pnpm/@napi-rs+wasm-runtime@0.2.10/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) {
@@ -39,7 +39,7 @@ function deserizeErrorFromBuffer(sab) {
39
39
  return error;
40
40
  }
41
41
  function isSharedArrayBuffer(value) {
42
- return typeof SharedArrayBuffer === "function" && value instanceof SharedArrayBuffer || Object.prototype.toString.call(value.constructor) === "[object SharedArrayBuffer]";
42
+ return typeof SharedArrayBuffer === "function" && value instanceof SharedArrayBuffer || Object.prototype.toString.call(value) === "[object SharedArrayBuffer]";
43
43
  }
44
44
  function isTrapError(e) {
45
45
  try {
@@ -2971,7 +2971,7 @@ function createNapiModule(options) {
2971
2971
  }
2972
2972
  return str;
2973
2973
  }
2974
- return emnapiString.utf8Decoder.decode(typeof SharedArrayBuffer === "function" && HEAPU8.buffer instanceof SharedArrayBuffer || Object.prototype.toString.call(HEAPU8.buffer.constructor) === "[object SharedArrayBuffer]" ? HEAPU8.slice(ptr, end) : HEAPU8.subarray(ptr, end));
2974
+ return emnapiString.utf8Decoder.decode(typeof SharedArrayBuffer === "function" && HEAPU8.buffer instanceof SharedArrayBuffer || Object.prototype.toString.call(HEAPU8.buffer) === "[object SharedArrayBuffer]" ? HEAPU8.slice(ptr, end) : HEAPU8.subarray(ptr, end));
2975
2975
  },
2976
2976
  stringToUTF8: function(str, outPtr, maxBytesToWrite) {
2977
2977
  var HEAPU8 = new Uint8Array(wasmMemory.buffer);
@@ -3034,7 +3034,7 @@ function createNapiModule(options) {
3034
3034
  return String.fromCharCode.apply(null, new Uint16Array(wasmMemory.buffer, ptr, length / 2));
3035
3035
  }
3036
3036
  var HEAPU8 = new Uint8Array(wasmMemory.buffer);
3037
- return emnapiString.utf16Decoder.decode(typeof SharedArrayBuffer === "function" && HEAPU8.buffer instanceof SharedArrayBuffer || Object.prototype.toString.call(HEAPU8.buffer.constructor) === "[object SharedArrayBuffer]" ? HEAPU8.slice(ptr, end) : HEAPU8.subarray(ptr, end));
3037
+ return emnapiString.utf16Decoder.decode(typeof SharedArrayBuffer === "function" && HEAPU8.buffer instanceof SharedArrayBuffer || Object.prototype.toString.call(HEAPU8.buffer) === "[object SharedArrayBuffer]" ? HEAPU8.slice(ptr, end) : HEAPU8.subarray(ptr, end));
3038
3038
  },
3039
3039
  stringToUTF16: function(str, outPtr, maxBytesToWrite) {
3040
3040
  if (maxBytesToWrite === void 0) {
@@ -8849,7 +8849,7 @@ var _Buffer = typeof Buffer === "function" ? Buffer : /* @__PURE__ */ function()
8849
8849
  }
8850
8850
  return void 0;
8851
8851
  }();
8852
- var version = "1.4.0";
8852
+ var version = "1.4.3";
8853
8853
  var NODE_API_SUPPORTED_VERSION_MAX = 10;
8854
8854
  var NAPI_VERSION_EXPERIMENTAL = 2147483647;
8855
8855
  var NODE_API_DEFAULT_MODULE_API_VERSION = 8;
@@ -12507,7 +12507,7 @@ function requireFsProxy() {
12507
12507
  const decodeValue = (memfs, payload, type) => {
12508
12508
  if (type === 0) return void 0;
12509
12509
  if (type === 1) return null;
12510
- if (type === 2) return Boolean(payload[0]);
12510
+ if (type === 2) return Boolean(new Int32Array(payload.buffer, payload.byteOffset, 1)[0]);
12511
12511
  if (type === 3) return new Float64Array(payload.buffer, payload.byteOffset, 1)[0];
12512
12512
  if (type === 4) return new TextDecoder().decode(payload.slice());
12513
12513
  if (type === 6) {
@@ -12654,6 +12654,7 @@ var {
12654
12654
  }
12655
12655
  }
12656
12656
  });
12657
+ var parser_wasi_browser_default = __napiModule.exports;
12657
12658
  var ParseResult = __napiModule.exports.ParseResult;
12658
12659
  var ExportExportNameKind = __napiModule.exports.ExportExportNameKind;
12659
12660
  var ExportImportNameKind = __napiModule.exports.ExportImportNameKind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxc-parser/binding-wasm32-wasi",
3
- "version": "0.69.0",
3
+ "version": "0.71.0",
4
4
  "cpu": [
5
5
  "wasm32"
6
6
  ],
@@ -36,6 +36,6 @@
36
36
  "bugs": "https://github.com/oxc-project/oxc/issues",
37
37
  "browser": "parser.wasi-browser.js",
38
38
  "dependencies": {
39
- "@napi-rs/wasm-runtime": "^0.2.9"
39
+ "@napi-rs/wasm-runtime": "^0.2.10"
40
40
  }
41
41
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
- instantiateNapiModuleSync as __emnapiInstantiateNapiModuleSync,
2
+ createOnMessage as __wasmCreateOnMessageForFsProxy,
3
3
  getDefaultContext as __emnapiGetDefaultContext,
4
+ instantiateNapiModuleSync as __emnapiInstantiateNapiModuleSync,
4
5
  WASI as __WASI,
5
- createOnMessage as __wasmCreateOnMessageForFsProxy,
6
6
  } from '@napi-rs/wasm-runtime'
7
7
 
8
8
  import __wasmUrl from './parser.wasm32-wasi.wasm?url'
@@ -53,6 +53,7 @@ const {
53
53
  }
54
54
  },
55
55
  })
56
+ export default __napiModule.exports
56
57
  export const ParseResult = __napiModule.exports.ParseResult
57
58
  export const ExportExportNameKind = __napiModule.exports.ExportExportNameKind
58
59
  export const ExportImportNameKind = __napiModule.exports.ExportImportNameKind
package/parser.wasi.cjs CHANGED
@@ -9,9 +9,9 @@ const { WASI: __nodeWASI } = require('node:wasi')
9
9
  const { Worker } = require('node:worker_threads')
10
10
 
11
11
  const {
12
- instantiateNapiModuleSync: __emnapiInstantiateNapiModuleSync,
13
- getDefaultContext: __emnapiGetDefaultContext,
14
12
  createOnMessage: __wasmCreateOnMessageForFsProxy,
13
+ getDefaultContext: __emnapiGetDefaultContext,
14
+ instantiateNapiModuleSync: __emnapiInstantiateNapiModuleSync,
15
15
  } = require('@napi-rs/wasm-runtime')
16
16
 
17
17
  const __rootDir = __nodePath.parse(process.cwd()).root
@@ -84,7 +84,7 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
84
84
  }
85
85
  },
86
86
  })
87
-
87
+ module.exports = __napiModule.exports
88
88
  module.exports.ParseResult = __napiModule.exports.ParseResult
89
89
  module.exports.ExportExportNameKind = __napiModule.exports.ExportExportNameKind
90
90
  module.exports.ExportImportNameKind = __napiModule.exports.ExportImportNameKind
Binary file