@next/swc-wasm-nodejs 13.4.20-canary.4 → 13.4.20-canary.41

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 +78 -68
  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": "13.4.20-canary.4",
3
+ "version": "13.4.20-canary.41",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  let imports = {};
2
2
  imports['__wbindgen_placeholder__'] = module.exports;
3
3
  let wasm;
4
- const { TextEncoder, TextDecoder } = require(`util`);
4
+ const { TextDecoder, TextEncoder } = require(`util`);
5
5
 
6
6
  const heap = new Array(128).fill(undefined);
7
7
 
@@ -23,7 +23,9 @@ function takeObject(idx) {
23
23
  return ret;
24
24
  }
25
25
 
26
- let WASM_VECTOR_LEN = 0;
26
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
27
+
28
+ cachedTextDecoder.decode();
27
29
 
28
30
  let cachedUint8Memory0 = null;
29
31
 
@@ -34,6 +36,21 @@ function getUint8Memory0() {
34
36
  return cachedUint8Memory0;
35
37
  }
36
38
 
39
+ function getStringFromWasm0(ptr, len) {
40
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
41
+ }
42
+
43
+ function addHeapObject(obj) {
44
+ if (heap_next === heap.length) heap.push(heap.length + 1);
45
+ const idx = heap_next;
46
+ heap_next = heap[idx];
47
+
48
+ heap[idx] = obj;
49
+ return idx;
50
+ }
51
+
52
+ let WASM_VECTOR_LEN = 0;
53
+
37
54
  let cachedTextEncoder = new TextEncoder('utf-8');
38
55
 
39
56
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -100,23 +117,6 @@ function getInt32Memory0() {
100
117
  return cachedInt32Memory0;
101
118
  }
102
119
 
103
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
104
-
105
- cachedTextDecoder.decode();
106
-
107
- function getStringFromWasm0(ptr, len) {
108
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
109
- }
110
-
111
- function addHeapObject(obj) {
112
- if (heap_next === heap.length) heap.push(heap.length + 1);
113
- const idx = heap_next;
114
- heap_next = heap[idx];
115
-
116
- heap[idx] = obj;
117
- return idx;
118
- }
119
-
120
120
  function debugString(val) {
121
121
  // primitive types
122
122
  const type = typeof val;
@@ -224,8 +224,8 @@ function makeMutClosure(arg0, arg1, dtor, f) {
224
224
 
225
225
  return real;
226
226
  }
227
- function __wbg_adapter_46(arg0, arg1, arg2) {
228
- wasm.wasm_bindgen_406eacf6a554cda5___convert__closures__invoke1_mut___wasm_bindgen_406eacf6a554cda5___JsValue_____(arg0, arg1, addHeapObject(arg2));
227
+ function __wbg_adapter_48(arg0, arg1, arg2) {
228
+ wasm.wasm_bindgen_73cd18f45dc52fc7___convert__closures__invoke1_mut___wasm_bindgen_73cd18f45dc52fc7___JsValue_____(arg0, arg1, addHeapObject(arg2));
229
229
  }
230
230
 
231
231
  /**
@@ -266,8 +266,8 @@ function handleError(f, args) {
266
266
  wasm.__wbindgen_exn_store(addHeapObject(e));
267
267
  }
268
268
  }
269
- function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
270
- wasm.wasm_bindgen_406eacf6a554cda5___convert__closures__invoke2_mut___wasm_bindgen_406eacf6a554cda5___JsValue__wasm_bindgen_406eacf6a554cda5___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
269
+ function __wbg_adapter_114(arg0, arg1, arg2, arg3) {
270
+ wasm.wasm_bindgen_73cd18f45dc52fc7___convert__closures__invoke2_mut___wasm_bindgen_73cd18f45dc52fc7___JsValue__wasm_bindgen_73cd18f45dc52fc7___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
271
271
  }
272
272
 
273
273
  /**
@@ -418,25 +418,20 @@ module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
418
418
  return addHeapObject(ret);
419
419
  };
420
420
 
421
- module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
422
- const ret = getObject(arg0)[getObject(arg1)];
421
+ module.exports.__wbg_new0_25059e40b1c02766 = function() {
422
+ const ret = new Date();
423
423
  return addHeapObject(ret);
424
424
  };
425
425
 
426
- module.exports.__wbindgen_is_undefined = function(arg0) {
427
- const ret = getObject(arg0) === undefined;
428
- return ret;
429
- };
430
-
431
- module.exports.__wbindgen_in = function(arg0, arg1) {
432
- const ret = getObject(arg0) in getObject(arg1);
433
- return ret;
426
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
427
+ const ret = getStringFromWasm0(arg0, arg1);
428
+ return addHeapObject(ret);
434
429
  };
435
430
 
436
- module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
437
- const ret = getObject(arg0) == getObject(arg1);
438
- return ret;
439
- };
431
+ module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
432
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
433
+ return addHeapObject(ret);
434
+ }, arguments) };
440
435
 
441
436
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
442
437
  const obj = getObject(arg1);
@@ -447,8 +442,13 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
447
442
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
448
443
  };
449
444
 
450
- module.exports.__wbg_new0_25059e40b1c02766 = function() {
451
- const ret = new Date();
445
+ module.exports.__wbindgen_number_new = function(arg0) {
446
+ const ret = arg0;
447
+ return addHeapObject(ret);
448
+ };
449
+
450
+ module.exports.__wbg_new_f127e324c1313064 = function(arg0) {
451
+ const ret = new Date(getObject(arg0));
452
452
  return addHeapObject(ret);
453
453
  };
454
454
 
@@ -457,16 +457,11 @@ module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
457
457
  return ret;
458
458
  };
459
459
 
460
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
461
- const ret = getStringFromWasm0(arg0, arg1);
462
- return addHeapObject(ret);
460
+ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
461
+ const ret = getObject(arg0) == getObject(arg1);
462
+ return ret;
463
463
  };
464
464
 
465
- module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
466
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
467
- return addHeapObject(ret);
468
- }, arguments) };
469
-
470
465
  module.exports.__wbindgen_is_object = function(arg0) {
471
466
  const val = getObject(arg0);
472
467
  const ret = typeof(val) === 'object' && val !== null;
@@ -488,6 +483,21 @@ module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
488
483
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
489
484
  };
490
485
 
486
+ module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
487
+ const ret = getObject(arg0)[getObject(arg1)];
488
+ return addHeapObject(ret);
489
+ };
490
+
491
+ module.exports.__wbindgen_is_undefined = function(arg0) {
492
+ const ret = getObject(arg0) === undefined;
493
+ return ret;
494
+ };
495
+
496
+ module.exports.__wbindgen_in = function(arg0, arg1) {
497
+ const ret = getObject(arg0) in getObject(arg1);
498
+ return ret;
499
+ };
500
+
491
501
  module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
492
502
  const ret = getObject(arg0).getTime();
493
503
  return ret;
@@ -527,7 +537,7 @@ module.exports.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function(arg0
527
537
  return addHeapObject(ret);
528
538
  };
529
539
 
530
- module.exports.__wbg_randomFillSync_e950366c42764a07 = function() { return handleError(function (arg0, arg1) {
540
+ module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
531
541
  getObject(arg0).randomFillSync(takeObject(arg1));
532
542
  }, arguments) };
533
543
 
@@ -536,7 +546,7 @@ module.exports.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
536
546
  return addHeapObject(ret);
537
547
  };
538
548
 
539
- module.exports.__wbg_getRandomValues_3774744e221a22ad = function() { return handleError(function (arg0, arg1) {
549
+ module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
540
550
  getObject(arg0).getRandomValues(getObject(arg1));
541
551
  }, arguments) };
542
552
 
@@ -549,22 +559,22 @@ module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
549
559
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
550
560
  };
551
561
 
552
- module.exports.__wbg_crypto_70a96de3b6b73dac = function(arg0) {
562
+ module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) {
553
563
  const ret = getObject(arg0).crypto;
554
564
  return addHeapObject(ret);
555
565
  };
556
566
 
557
- module.exports.__wbg_process_dd1577445152112e = function(arg0) {
567
+ module.exports.__wbg_process_298734cf255a885d = function(arg0) {
558
568
  const ret = getObject(arg0).process;
559
569
  return addHeapObject(ret);
560
570
  };
561
571
 
562
- module.exports.__wbg_versions_58036bec3add9e6f = function(arg0) {
572
+ module.exports.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
563
573
  const ret = getObject(arg0).versions;
564
574
  return addHeapObject(ret);
565
575
  };
566
576
 
567
- module.exports.__wbg_node_6a9d28205ed5b0d8 = function(arg0) {
577
+ module.exports.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
568
578
  const ret = getObject(arg0).node;
569
579
  return addHeapObject(ret);
570
580
  };
@@ -574,7 +584,7 @@ module.exports.__wbindgen_is_string = function(arg0) {
574
584
  return ret;
575
585
  };
576
586
 
577
- module.exports.__wbg_msCrypto_adbc770ec9eca9c7 = function(arg0) {
587
+ module.exports.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
578
588
  const ret = getObject(arg0).msCrypto;
579
589
  return addHeapObject(ret);
580
590
  };
@@ -584,7 +594,7 @@ module.exports.__wbg_newwithlength_b56c882b57805732 = function(arg0) {
584
594
  return addHeapObject(ret);
585
595
  };
586
596
 
587
- module.exports.__wbg_require_f05d779769764e82 = function() { return handleError(function () {
597
+ module.exports.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
588
598
  const ret = module.require;
589
599
  return addHeapObject(ret);
590
600
  }, arguments) };
@@ -697,6 +707,16 @@ module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
697
707
  return ret;
698
708
  };
699
709
 
710
+ module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
711
+ const ret = Array.isArray(getObject(arg0));
712
+ return ret;
713
+ };
714
+
715
+ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
716
+ const ret = getObject(arg0).length;
717
+ return ret;
718
+ };
719
+
700
720
  module.exports.__wbindgen_is_bigint = function(arg0) {
701
721
  const ret = typeof(getObject(arg0)) === 'bigint';
702
722
  return ret;
@@ -729,16 +749,6 @@ module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
729
749
  return ret;
730
750
  };
731
751
 
732
- module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
733
- const ret = Array.isArray(getObject(arg0));
734
- return ret;
735
- };
736
-
737
- module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
738
- const ret = getObject(arg0).length;
739
- return ret;
740
- };
741
-
742
752
  module.exports.__wbg_new_f9876326328f45ed = function() {
743
753
  const ret = new Object();
744
754
  return addHeapObject(ret);
@@ -755,7 +765,7 @@ module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
755
765
  const a = state0.a;
756
766
  state0.a = 0;
757
767
  try {
758
- return __wbg_adapter_110(a, state0.b, arg0, arg1);
768
+ return __wbg_adapter_114(a, state0.b, arg0, arg1);
759
769
  } finally {
760
770
  state0.a = a;
761
771
  }
@@ -791,8 +801,8 @@ module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
791
801
  return addHeapObject(ret);
792
802
  };
793
803
 
794
- module.exports.__wbindgen_closure_wrapper18032 = function(arg0, arg1, arg2) {
795
- const ret = makeMutClosure(arg0, arg1, 257, __wbg_adapter_46);
804
+ module.exports.__wbindgen_closure_wrapper22059 = function(arg0, arg1, arg2) {
805
+ const ret = makeMutClosure(arg0, arg1, 283, __wbg_adapter_48);
796
806
  return addHeapObject(ret);
797
807
  };
798
808
 
package/wasm_bg.wasm CHANGED
Binary file