@next/swc-wasm-nodejs 14.1.1 → 14.1.2-canary.1

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 (3) hide show
  1. package/package.json +1 -1
  2. package/wasm.js +87 -70
  3. package/wasm_bg.wasm +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-nodejs",
3
- "version": "14.1.1",
3
+ "version": "14.1.2-canary.1",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.js CHANGED
@@ -53,14 +53,14 @@ function passStringToWasm0(arg, malloc, realloc) {
53
53
 
54
54
  if (realloc === undefined) {
55
55
  const buf = cachedTextEncoder.encode(arg);
56
- const ptr = malloc(buf.length);
56
+ const ptr = malloc(buf.length, 1) >>> 0;
57
57
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
58
58
  WASM_VECTOR_LEN = buf.length;
59
59
  return ptr;
60
60
  }
61
61
 
62
62
  let len = arg.length;
63
- let ptr = malloc(len);
63
+ let ptr = malloc(len, 1) >>> 0;
64
64
 
65
65
  const mem = getUint8Memory0();
66
66
 
@@ -76,11 +76,12 @@ function passStringToWasm0(arg, malloc, realloc) {
76
76
  if (offset !== 0) {
77
77
  arg = arg.slice(offset);
78
78
  }
79
- ptr = realloc(ptr, len, len = offset + arg.length * 3);
79
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
80
80
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
81
81
  const ret = encodeString(arg, view);
82
82
 
83
83
  offset += ret.written;
84
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
84
85
  }
85
86
 
86
87
  WASM_VECTOR_LEN = offset;
@@ -123,6 +124,7 @@ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true
123
124
  cachedTextDecoder.decode();
124
125
 
125
126
  function getStringFromWasm0(ptr, len) {
127
+ ptr = ptr >>> 0;
126
128
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
127
129
  }
128
130
 
@@ -200,6 +202,12 @@ function debugString(val) {
200
202
  return className;
201
203
  }
202
204
 
205
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
206
+ ? { register: () => {}, unregister: () => {} }
207
+ : new FinalizationRegistry(state => {
208
+ wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
209
+ });
210
+
203
211
  function makeMutClosure(arg0, arg1, dtor, f) {
204
212
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
205
213
  const real = (...args) => {
@@ -214,18 +222,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
214
222
  } finally {
215
223
  if (--state.cnt === 0) {
216
224
  wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
217
-
225
+ CLOSURE_DTORS.unregister(state);
218
226
  } else {
219
227
  state.a = a;
220
228
  }
221
229
  }
222
230
  };
223
231
  real.original = state;
224
-
232
+ CLOSURE_DTORS.register(real, state, state);
225
233
  return real;
226
234
  }
227
235
  function __wbg_adapter_48(arg0, arg1, arg2) {
228
- wasm.wasm_bindgen_3fb300003f18f35c___convert__closures__invoke1_mut___wasm_bindgen_3fb300003f18f35c___JsValue_____(arg0, arg1, addHeapObject(arg2));
236
+ wasm._dyn_core_80dd73c7ef3d55e5___ops__function__FnMut_______Output______as_wasm_bindgen_19194eebc680be5___closure__WasmClosure___describe__invoke___wasm_bindgen_19194eebc680be5___JsValue_____(arg0, arg1, addHeapObject(arg2));
229
237
  }
230
238
 
231
239
  /**
@@ -367,8 +375,8 @@ function handleError(f, args) {
367
375
  wasm.__wbindgen_exn_store(addHeapObject(e));
368
376
  }
369
377
  }
370
- function __wbg_adapter_121(arg0, arg1, arg2, arg3) {
371
- wasm.wasm_bindgen_3fb300003f18f35c___convert__closures__invoke2_mut___wasm_bindgen_3fb300003f18f35c___JsValue__wasm_bindgen_3fb300003f18f35c___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
378
+ function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
379
+ wasm.wasm_bindgen_19194eebc680be5___convert__closures__invoke2_mut___wasm_bindgen_19194eebc680be5___JsValue__wasm_bindgen_19194eebc680be5___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
372
380
  }
373
381
 
374
382
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
@@ -378,10 +386,10 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
378
386
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
379
387
  const obj = getObject(arg1);
380
388
  const ret = typeof(obj) === 'string' ? obj : undefined;
381
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
382
- var len0 = WASM_VECTOR_LEN;
383
- getInt32Memory0()[arg0 / 4 + 1] = len0;
384
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
389
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
390
+ var len1 = WASM_VECTOR_LEN;
391
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
392
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
385
393
  };
386
394
 
387
395
  module.exports.__wbindgen_boolean_get = function(arg0) {
@@ -438,13 +446,13 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
438
446
  return ret;
439
447
  };
440
448
 
441
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
442
- const ret = getStringFromWasm0(arg0, arg1);
449
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
450
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
443
451
  return addHeapObject(ret);
444
452
  };
445
453
 
446
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
447
- const ret = new Error(getStringFromWasm0(arg0, arg1));
454
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
455
+ const ret = getStringFromWasm0(arg0, arg1);
448
456
  return addHeapObject(ret);
449
457
  };
450
458
 
@@ -455,18 +463,28 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
455
463
 
456
464
  module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
457
465
  const ret = getObject(arg1).stack;
458
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
459
- const len0 = WASM_VECTOR_LEN;
460
- getInt32Memory0()[arg0 / 4 + 1] = len0;
461
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
466
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
467
+ const len1 = WASM_VECTOR_LEN;
468
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
469
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
462
470
  };
463
471
 
464
472
  module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
465
473
  var v0 = getCachedStringFromWasm0(arg0, arg1);
466
- if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1); }
474
+ if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); }
467
475
  console.error(v0);
468
476
  };
469
477
 
478
+ module.exports.__wbg_queueMicrotask_f82fc5d1e8f816ae = function(arg0) {
479
+ const ret = getObject(arg0).queueMicrotask;
480
+ return addHeapObject(ret);
481
+ };
482
+
483
+ module.exports.__wbindgen_is_function = function(arg0) {
484
+ const ret = typeof(getObject(arg0)) === 'function';
485
+ return ret;
486
+ };
487
+
470
488
  module.exports.__wbindgen_cb_drop = function(arg0) {
471
489
  const obj = takeObject(arg0).original;
472
490
  if (obj.cnt-- == 1) {
@@ -477,6 +495,10 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
477
495
  return ret;
478
496
  };
479
497
 
498
+ module.exports.__wbg_queueMicrotask_f61ee94ee663068b = function(arg0) {
499
+ queueMicrotask(getObject(arg0));
500
+ };
501
+
480
502
  module.exports.__wbindgen_object_clone_ref = function(arg0) {
481
503
  const ret = getObject(arg0);
482
504
  return addHeapObject(ret);
@@ -539,146 +561,141 @@ module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return hand
539
561
  getObject(arg0).getRandomValues(getObject(arg1));
540
562
  }, arguments) };
541
563
 
542
- module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
564
+ module.exports.__wbg_get_0ee8ea3c7c984c45 = function(arg0, arg1) {
543
565
  const ret = getObject(arg0)[arg1 >>> 0];
544
566
  return addHeapObject(ret);
545
567
  };
546
568
 
547
- module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
569
+ module.exports.__wbg_length_161c0d89c6535c1d = function(arg0) {
548
570
  const ret = getObject(arg0).length;
549
571
  return ret;
550
572
  };
551
573
 
552
- module.exports.__wbindgen_is_function = function(arg0) {
553
- const ret = typeof(getObject(arg0)) === 'function';
554
- return ret;
555
- };
556
-
557
- module.exports.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
574
+ module.exports.__wbg_newnoargs_cfecb3965268594c = function(arg0, arg1) {
558
575
  var v0 = getCachedStringFromWasm0(arg0, arg1);
559
576
  const ret = new Function(v0);
560
577
  return addHeapObject(ret);
561
578
  };
562
579
 
563
- module.exports.__wbg_next_b7d530c04fd8b217 = function(arg0) {
580
+ module.exports.__wbg_next_586204376d2ed373 = function(arg0) {
564
581
  const ret = getObject(arg0).next;
565
582
  return addHeapObject(ret);
566
583
  };
567
584
 
568
- module.exports.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
585
+ module.exports.__wbg_next_b2d3366343a208b3 = function() { return handleError(function (arg0) {
569
586
  const ret = getObject(arg0).next();
570
587
  return addHeapObject(ret);
571
588
  }, arguments) };
572
589
 
573
- module.exports.__wbg_done_1ebec03bbd919843 = function(arg0) {
590
+ module.exports.__wbg_done_90b14d6f6eacc42f = function(arg0) {
574
591
  const ret = getObject(arg0).done;
575
592
  return ret;
576
593
  };
577
594
 
578
- module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
595
+ module.exports.__wbg_value_3158be908c80a75e = function(arg0) {
579
596
  const ret = getObject(arg0).value;
580
597
  return addHeapObject(ret);
581
598
  };
582
599
 
583
- module.exports.__wbg_iterator_55f114446221aa5a = function() {
600
+ module.exports.__wbg_iterator_40027cdd598da26b = function() {
584
601
  const ret = Symbol.iterator;
585
602
  return addHeapObject(ret);
586
603
  };
587
604
 
588
- module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
605
+ module.exports.__wbg_get_3fddfed2c83f434c = function() { return handleError(function (arg0, arg1) {
589
606
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
590
607
  return addHeapObject(ret);
591
608
  }, arguments) };
592
609
 
593
- module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
610
+ module.exports.__wbg_call_3f093dd26d5569f8 = function() { return handleError(function (arg0, arg1) {
594
611
  const ret = getObject(arg0).call(getObject(arg1));
595
612
  return addHeapObject(ret);
596
613
  }, arguments) };
597
614
 
598
- module.exports.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
615
+ module.exports.__wbg_self_05040bd9523805b9 = function() { return handleError(function () {
599
616
  const ret = self.self;
600
617
  return addHeapObject(ret);
601
618
  }, arguments) };
602
619
 
603
- module.exports.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () {
620
+ module.exports.__wbg_window_adc720039f2cb14f = function() { return handleError(function () {
604
621
  const ret = window.window;
605
622
  return addHeapObject(ret);
606
623
  }, arguments) };
607
624
 
608
- module.exports.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () {
625
+ module.exports.__wbg_globalThis_622105db80c1457d = function() { return handleError(function () {
609
626
  const ret = globalThis.globalThis;
610
627
  return addHeapObject(ret);
611
628
  }, arguments) };
612
629
 
613
- module.exports.__wbg_global_c85a9259e621f3db = function() { return handleError(function () {
630
+ module.exports.__wbg_global_f56b013ed9bcf359 = function() { return handleError(function () {
614
631
  const ret = global.global;
615
632
  return addHeapObject(ret);
616
633
  }, arguments) };
617
634
 
618
- module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
635
+ module.exports.__wbg_isArray_e783c41d0dd19b44 = function(arg0) {
619
636
  const ret = Array.isArray(getObject(arg0));
620
637
  return ret;
621
638
  };
622
639
 
623
- module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
640
+ module.exports.__wbg_instanceof_ArrayBuffer_9221fa854ffb71b5 = function(arg0) {
624
641
  let result;
625
642
  try {
626
643
  result = getObject(arg0) instanceof ArrayBuffer;
627
- } catch {
644
+ } catch (_) {
628
645
  result = false;
629
646
  }
630
647
  const ret = result;
631
648
  return ret;
632
649
  };
633
650
 
634
- module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
651
+ module.exports.__wbg_call_67f2111acd2dfdb6 = function() { return handleError(function (arg0, arg1, arg2) {
635
652
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
636
653
  return addHeapObject(ret);
637
654
  }, arguments) };
638
655
 
639
- module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
656
+ module.exports.__wbg_isSafeInteger_a23a66ee7c41b273 = function(arg0) {
640
657
  const ret = Number.isSafeInteger(getObject(arg0));
641
658
  return ret;
642
659
  };
643
660
 
644
- module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
661
+ module.exports.__wbg_getTime_0e03c3f524be31ef = function(arg0) {
645
662
  const ret = getObject(arg0).getTime();
646
663
  return ret;
647
664
  };
648
665
 
649
- module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
666
+ module.exports.__wbg_getTimezoneOffset_840b552f34917133 = function(arg0) {
650
667
  const ret = getObject(arg0).getTimezoneOffset();
651
668
  return ret;
652
669
  };
653
670
 
654
- module.exports.__wbg_new_f127e324c1313064 = function(arg0) {
671
+ module.exports.__wbg_new_a9d80688888b4894 = function(arg0) {
655
672
  const ret = new Date(getObject(arg0));
656
673
  return addHeapObject(ret);
657
674
  };
658
675
 
659
- module.exports.__wbg_new0_25059e40b1c02766 = function() {
676
+ module.exports.__wbg_new0_7a6141101f2206da = function() {
660
677
  const ret = new Date();
661
678
  return addHeapObject(ret);
662
679
  };
663
680
 
664
- module.exports.__wbg_entries_4e1315b774245952 = function(arg0) {
681
+ module.exports.__wbg_entries_488960b196cfb6a5 = function(arg0) {
665
682
  const ret = Object.entries(getObject(arg0));
666
683
  return addHeapObject(ret);
667
684
  };
668
685
 
669
- module.exports.__wbg_new_f9876326328f45ed = function() {
686
+ module.exports.__wbg_new_632630b5cec17f21 = function() {
670
687
  const ret = new Object();
671
688
  return addHeapObject(ret);
672
689
  };
673
690
 
674
- module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
691
+ module.exports.__wbg_new_70828a4353259d4b = function(arg0, arg1) {
675
692
  try {
676
693
  var state0 = {a: arg0, b: arg1};
677
694
  var cb0 = (arg0, arg1) => {
678
695
  const a = state0.a;
679
696
  state0.a = 0;
680
697
  try {
681
- return __wbg_adapter_121(a, state0.b, arg0, arg1);
698
+ return __wbg_adapter_125(a, state0.b, arg0, arg1);
682
699
  } finally {
683
700
  state0.a = a;
684
701
  }
@@ -690,57 +707,57 @@ module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
690
707
  }
691
708
  };
692
709
 
693
- module.exports.__wbg_resolve_fd40f858d9db1a04 = function(arg0) {
710
+ module.exports.__wbg_resolve_5da6faf2c96fd1d5 = function(arg0) {
694
711
  const ret = Promise.resolve(getObject(arg0));
695
712
  return addHeapObject(ret);
696
713
  };
697
714
 
698
- module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
715
+ module.exports.__wbg_then_f9e58f5a50f43eae = function(arg0, arg1) {
699
716
  const ret = getObject(arg0).then(getObject(arg1));
700
717
  return addHeapObject(ret);
701
718
  };
702
719
 
703
- module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
720
+ module.exports.__wbg_buffer_b914fb8b50ebbc3e = function(arg0) {
704
721
  const ret = getObject(arg0).buffer;
705
722
  return addHeapObject(ret);
706
723
  };
707
724
 
708
- module.exports.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function(arg0, arg1, arg2) {
725
+ module.exports.__wbg_newwithbyteoffsetandlength_0de9ee56e9f6ee6e = function(arg0, arg1, arg2) {
709
726
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
710
727
  return addHeapObject(ret);
711
728
  };
712
729
 
713
- module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
730
+ module.exports.__wbg_new_b1f2d6842d615181 = function(arg0) {
714
731
  const ret = new Uint8Array(getObject(arg0));
715
732
  return addHeapObject(ret);
716
733
  };
717
734
 
718
- module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
735
+ module.exports.__wbg_set_7d988c98e6ced92d = function(arg0, arg1, arg2) {
719
736
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
720
737
  };
721
738
 
722
- module.exports.__wbg_length_27a2afe8ab42b09f = function(arg0) {
739
+ module.exports.__wbg_length_21c4b0ae73cba59d = function(arg0) {
723
740
  const ret = getObject(arg0).length;
724
741
  return ret;
725
742
  };
726
743
 
727
- module.exports.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
744
+ module.exports.__wbg_instanceof_Uint8Array_c299a4ee232e76ba = function(arg0) {
728
745
  let result;
729
746
  try {
730
747
  result = getObject(arg0) instanceof Uint8Array;
731
- } catch {
748
+ } catch (_) {
732
749
  result = false;
733
750
  }
734
751
  const ret = result;
735
752
  return ret;
736
753
  };
737
754
 
738
- module.exports.__wbg_newwithlength_b56c882b57805732 = function(arg0) {
755
+ module.exports.__wbg_newwithlength_0d03cef43b68a530 = function(arg0) {
739
756
  const ret = new Uint8Array(arg0 >>> 0);
740
757
  return addHeapObject(ret);
741
758
  };
742
759
 
743
- module.exports.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
760
+ module.exports.__wbg_subarray_adc418253d76e2f1 = function(arg0, arg1, arg2) {
744
761
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
745
762
  return addHeapObject(ret);
746
763
  };
@@ -754,10 +771,10 @@ module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
754
771
 
755
772
  module.exports.__wbindgen_debug_string = function(arg0, arg1) {
756
773
  const ret = debugString(getObject(arg1));
757
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
758
- const len0 = WASM_VECTOR_LEN;
759
- getInt32Memory0()[arg0 / 4 + 1] = len0;
760
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
774
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
775
+ const len1 = WASM_VECTOR_LEN;
776
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
777
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
761
778
  };
762
779
 
763
780
  module.exports.__wbindgen_throw = function(arg0, arg1) {
@@ -769,8 +786,8 @@ module.exports.__wbindgen_memory = function() {
769
786
  return addHeapObject(ret);
770
787
  };
771
788
 
772
- module.exports.__wbindgen_closure_wrapper14454 = function(arg0, arg1, arg2) {
773
- const ret = makeMutClosure(arg0, arg1, 3210, __wbg_adapter_48);
789
+ module.exports.__wbindgen_closure_wrapper15367 = function(arg0, arg1, arg2) {
790
+ const ret = makeMutClosure(arg0, arg1, 3593, __wbg_adapter_48);
774
791
  return addHeapObject(ret);
775
792
  };
776
793
 
package/wasm_bg.wasm CHANGED
Binary file