@oxc-parser/binding-wasm32-wasi 0.111.0 → 0.114.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.
package/browser-bundle.js CHANGED
@@ -765,7 +765,7 @@ function __extends(d, b) {
765
765
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
766
766
  }
767
767
 
768
- // ../../node_modules/.pnpm/@emnapi+core@1.7.1/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.js
768
+ // ../../node_modules/.pnpm/@emnapi+core@1.8.1/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.js
769
769
  var _WebAssembly2 = typeof WebAssembly !== "undefined" ? WebAssembly : typeof WXWebAssembly !== "undefined" ? WXWebAssembly : void 0;
770
770
  function validateImports(imports) {
771
771
  if (imports && typeof imports !== "object") {
@@ -3283,6 +3283,53 @@ function createNapiModule(options) {
3283
3283
  }
3284
3284
  return envObject.clearLastError();
3285
3285
  }
3286
+ function node_api_set_prototype(env, object, value) {
3287
+ if (!env)
3288
+ return 1;
3289
+ var envObject = emnapiCtx.envStore.get(env);
3290
+ envObject.checkGCAccess();
3291
+ if (!envObject.tryCatch.isEmpty())
3292
+ return envObject.setLastError(
3293
+ 10
3294
+ /* napi_status.napi_pending_exception */
3295
+ );
3296
+ if (!envObject.canCallIntoJs())
3297
+ return envObject.setLastError(
3298
+ envObject.moduleApiVersion >= 10 ? 23 : 10
3299
+ /* napi_status.napi_pending_exception */
3300
+ );
3301
+ envObject.clearLastError();
3302
+ try {
3303
+ if (!value)
3304
+ return envObject.setLastError(
3305
+ 1
3306
+ /* napi_status.napi_invalid_arg */
3307
+ );
3308
+ var obj = emnapiCtx.handleStore.get(object).value;
3309
+ if (obj == null) {
3310
+ throw new TypeError("Cannot convert undefined or null to object");
3311
+ }
3312
+ var type = typeof obj;
3313
+ var v = void 0;
3314
+ try {
3315
+ v = type === "object" && obj !== null || type === "function" ? obj : Object(obj);
3316
+ } catch (_) {
3317
+ return envObject.setLastError(
3318
+ 2
3319
+ /* napi_status.napi_object_expected */
3320
+ );
3321
+ }
3322
+ var val = emnapiCtx.handleStore.get(value).value;
3323
+ Object.setPrototypeOf(v, val);
3324
+ return envObject.getReturnStatus();
3325
+ } catch (err2) {
3326
+ envObject.tryCatch.setError(err2);
3327
+ return envObject.setLastError(
3328
+ 10
3329
+ /* napi_status.napi_pending_exception */
3330
+ );
3331
+ }
3332
+ }
3286
3333
  function napi_get_prototype(env, value, result) {
3287
3334
  if (!env)
3288
3335
  return 1;
@@ -3370,6 +3417,8 @@ function createNapiModule(options) {
3370
3417
  t = 5;
3371
3418
  } else if (v instanceof Uint32Array) {
3372
3419
  t = 6;
3420
+ } else if (typeof Float16Array === "function" && v instanceof Float16Array) {
3421
+ t = 11;
3373
3422
  } else if (v instanceof Float32Array) {
3374
3423
  t = 7;
3375
3424
  } else if (v instanceof Float64Array) {
@@ -3991,7 +4040,8 @@ function createNapiModule(options) {
3991
4040
  napi_get_value_string_latin1,
3992
4041
  napi_get_value_string_utf16,
3993
4042
  napi_get_value_string_utf8,
3994
- napi_get_value_uint32
4043
+ napi_get_value_uint32,
4044
+ node_api_set_prototype
3995
4045
  });
3996
4046
  function napi_create_int32(env, value, result) {
3997
4047
  if (!env)
@@ -4825,6 +4875,15 @@ function createNapiModule(options) {
4825
4875
  case -1:
4826
4876
  viewDescriptor = { Ctor: DataView, address: external_data, length: byte_length, ownership: 1, runtimeAllocated: 0 };
4827
4877
  break;
4878
+ case 11:
4879
+ if (typeof Float16Array !== "function") {
4880
+ return envObject.setLastError(
4881
+ 1
4882
+ /* napi_status.napi_invalid_arg */
4883
+ );
4884
+ }
4885
+ viewDescriptor = { Ctor: Float16Array, address: external_data, length: byte_length >> 1, ownership: 1, runtimeAllocated: 0 };
4886
+ break;
4828
4887
  case -2: {
4829
4888
  if (!emnapiCtx.feature.Buffer) {
4830
4889
  throw emnapiCtx.createNotSupportBufferError("emnapi_create_memory_view", "");
@@ -5552,6 +5611,14 @@ function createNapiModule(options) {
5552
5611
  return createTypedArray(envObject, BigInt64Array, 8, buffer, byte_offset, length);
5553
5612
  case 10:
5554
5613
  return createTypedArray(envObject, BigUint64Array, 8, buffer, byte_offset, length);
5614
+ case 11:
5615
+ if (typeof Float16Array !== "function") {
5616
+ return envObject.setLastError(
5617
+ 1
5618
+ /* napi_status.napi_invalid_arg */
5619
+ );
5620
+ }
5621
+ return createTypedArray(envObject, Float16Array, 2, buffer, byte_offset, length);
5555
5622
  default:
5556
5623
  return envObject.setLastError(
5557
5624
  1
@@ -8920,7 +8987,7 @@ function instantiateNapiModuleSync(wasmInput, options) {
8920
8987
  return loadNapiModuleImpl(loadSyncCallback, void 0, wasmInput, options);
8921
8988
  }
8922
8989
 
8923
- // ../../node_modules/.pnpm/@emnapi+runtime@1.7.1/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js
8990
+ // ../../node_modules/.pnpm/@emnapi+runtime@1.8.1/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js
8924
8991
  var externalValue = /* @__PURE__ */ new WeakMap();
8925
8992
  function isExternal(object) {
8926
8993
  return externalValue.has(object);
@@ -9065,7 +9132,7 @@ var _Buffer = typeof Buffer === "function" ? Buffer : /* @__PURE__ */ (function(
9065
9132
  }
9066
9133
  return void 0;
9067
9134
  })();
9068
- var version = "1.7.1";
9135
+ var version = "1.8.1";
9069
9136
  var NODE_API_SUPPORTED_VERSION_MAX = 10;
9070
9137
  var NAPI_VERSION_EXPERIMENTAL = 2147483647;
9071
9138
  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.111.0",
3
+ "version": "0.114.0",
4
4
  "cpu": [
5
5
  "wasm32"
6
6
  ],
Binary file