@next/swc-wasm-nodejs 13.4.10-canary.0 → 13.4.10-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 +134 -134
  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.10-canary.0",
3
+ "version": "13.4.10-canary.1",
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,26 +23,21 @@ function takeObject(idx) {
23
23
  return ret;
24
24
  }
25
25
 
26
- function isLikeNone(x) {
27
- return x === undefined || x === null;
28
- }
26
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
29
27
 
30
- let cachedBigInt64Memory0 = null;
28
+ cachedTextDecoder.decode();
31
29
 
32
- function getBigInt64Memory0() {
33
- if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
34
- cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
30
+ let cachedUint8Memory0 = null;
31
+
32
+ function getUint8Memory0() {
33
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
34
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
35
35
  }
36
- return cachedBigInt64Memory0;
36
+ return cachedUint8Memory0;
37
37
  }
38
38
 
39
- let cachedInt32Memory0 = null;
40
-
41
- function getInt32Memory0() {
42
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
43
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
44
- }
45
- return cachedInt32Memory0;
39
+ function getStringFromWasm0(ptr, len) {
40
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
46
41
  }
47
42
 
48
43
  function addHeapObject(obj) {
@@ -54,26 +49,8 @@ function addHeapObject(obj) {
54
49
  return idx;
55
50
  }
56
51
 
57
- let cachedFloat64Memory0 = null;
58
-
59
- function getFloat64Memory0() {
60
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
61
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
62
- }
63
- return cachedFloat64Memory0;
64
- }
65
-
66
52
  let WASM_VECTOR_LEN = 0;
67
53
 
68
- let cachedUint8Memory0 = null;
69
-
70
- function getUint8Memory0() {
71
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
72
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
73
- }
74
- return cachedUint8Memory0;
75
- }
76
-
77
54
  let cachedTextEncoder = new TextEncoder('utf-8');
78
55
 
79
56
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -127,12 +104,17 @@ function passStringToWasm0(arg, malloc, realloc) {
127
104
  return ptr;
128
105
  }
129
106
 
130
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
107
+ function isLikeNone(x) {
108
+ return x === undefined || x === null;
109
+ }
131
110
 
132
- cachedTextDecoder.decode();
111
+ let cachedInt32Memory0 = null;
133
112
 
134
- function getStringFromWasm0(ptr, len) {
135
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
113
+ function getInt32Memory0() {
114
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
115
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
116
+ }
117
+ return cachedInt32Memory0;
136
118
  }
137
119
 
138
120
  function debugString(val) {
@@ -200,6 +182,24 @@ function debugString(val) {
200
182
  return className;
201
183
  }
202
184
 
185
+ let cachedFloat64Memory0 = null;
186
+
187
+ function getFloat64Memory0() {
188
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
189
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
190
+ }
191
+ return cachedFloat64Memory0;
192
+ }
193
+
194
+ let cachedBigInt64Memory0 = null;
195
+
196
+ function getBigInt64Memory0() {
197
+ if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
198
+ cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
199
+ }
200
+ return cachedBigInt64Memory0;
201
+ }
202
+
203
203
  function makeMutClosure(arg0, arg1, dtor, f) {
204
204
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
205
205
  const real = (...args) => {
@@ -225,7 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
225
225
  return real;
226
226
  }
227
227
  function __wbg_adapter_46(arg0, arg1, arg2) {
228
- wasm._dyn_core_e7bf91d7bc92fdf___ops__function__FnMut_______Output______as_wasm_bindgen_8dfa11a8271a0346___closure__WasmClosure___describe__invoke___wasm_bindgen_8dfa11a8271a0346___JsValue_____(arg0, arg1, addHeapObject(arg2));
228
+ wasm.wasm_bindgen_14bb29ee12179752___convert__closures__invoke1_mut___wasm_bindgen_14bb29ee12179752___JsValue_____(arg0, arg1, addHeapObject(arg2));
229
229
  }
230
230
 
231
231
  /**
@@ -267,7 +267,7 @@ function handleError(f, args) {
267
267
  }
268
268
  }
269
269
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
270
- wasm.wasm_bindgen_8dfa11a8271a0346___convert__closures__invoke2_mut___wasm_bindgen_8dfa11a8271a0346___JsValue__wasm_bindgen_8dfa11a8271a0346___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
270
+ wasm.wasm_bindgen_14bb29ee12179752___convert__closures__invoke2_mut___wasm_bindgen_14bb29ee12179752___JsValue__wasm_bindgen_14bb29ee12179752___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
271
271
  }
272
272
 
273
273
  /**
@@ -423,84 +423,30 @@ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
423
423
  return ret;
424
424
  };
425
425
 
426
- module.exports.__wbindgen_boolean_get = function(arg0) {
427
- const v = getObject(arg0);
428
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
429
- return ret;
430
- };
431
-
432
- module.exports.__wbindgen_is_bigint = function(arg0) {
433
- const ret = typeof(getObject(arg0)) === 'bigint';
434
- return ret;
435
- };
436
-
437
- module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
438
- const v = getObject(arg1);
439
- const ret = typeof(v) === 'bigint' ? v : undefined;
440
- getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
441
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
442
- };
443
-
444
- module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
445
- const ret = arg0;
446
- return addHeapObject(ret);
447
- };
448
-
449
- module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
450
- const ret = getObject(arg0) === getObject(arg1);
451
- return ret;
452
- };
453
-
454
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
455
- const obj = getObject(arg1);
456
- const ret = typeof(obj) === 'number' ? obj : undefined;
457
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
458
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
459
- };
460
-
461
- module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
462
- const ret = Number.isSafeInteger(getObject(arg0));
463
- return ret;
464
- };
465
-
466
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
467
- const obj = getObject(arg1);
468
- const ret = typeof(obj) === 'string' ? obj : undefined;
469
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
470
- var len0 = WASM_VECTOR_LEN;
471
- getInt32Memory0()[arg0 / 4 + 1] = len0;
472
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
473
- };
474
-
475
- module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
476
- const ret = Array.isArray(getObject(arg0));
477
- return ret;
478
- };
479
-
480
426
  module.exports.__wbindgen_is_object = function(arg0) {
481
427
  const val = getObject(arg0);
482
428
  const ret = typeof(val) === 'object' && val !== null;
483
429
  return ret;
484
430
  };
485
431
 
486
- module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
487
- const ret = getObject(arg0).length;
432
+ module.exports.__wbindgen_boolean_get = function(arg0) {
433
+ const v = getObject(arg0);
434
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
488
435
  return ret;
489
436
  };
490
437
 
491
- module.exports.__wbg_iterator_55f114446221aa5a = function() {
492
- const ret = Symbol.iterator;
438
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
439
+ const ret = getStringFromWasm0(arg0, arg1);
493
440
  return addHeapObject(ret);
494
441
  };
495
442
 
496
- module.exports.__wbindgen_in = function(arg0, arg1) {
497
- const ret = getObject(arg0) in getObject(arg1);
498
- return ret;
443
+ module.exports.__wbg_new_b525de17f44a8943 = function() {
444
+ const ret = new Array();
445
+ return addHeapObject(ret);
499
446
  };
500
447
 
501
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
502
- const ret = BigInt.asUintN(64, arg0);
503
- return addHeapObject(ret);
448
+ module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
449
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
504
450
  };
505
451
 
506
452
  module.exports.__wbg_new0_25059e40b1c02766 = function() {
@@ -513,16 +459,20 @@ module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
513
459
  return ret;
514
460
  };
515
461
 
516
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
517
- const ret = getStringFromWasm0(arg0, arg1);
518
- return addHeapObject(ret);
519
- };
520
-
521
462
  module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
522
463
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
523
464
  return addHeapObject(ret);
524
465
  }, arguments) };
525
466
 
467
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
468
+ const obj = getObject(arg1);
469
+ const ret = typeof(obj) === 'string' ? obj : undefined;
470
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
471
+ var len0 = WASM_VECTOR_LEN;
472
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
473
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
474
+ };
475
+
526
476
  module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
527
477
  const ret = getObject(arg0)[getObject(arg1)];
528
478
  return addHeapObject(ret);
@@ -533,13 +483,9 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
533
483
  return ret;
534
484
  };
535
485
 
536
- module.exports.__wbg_new_b525de17f44a8943 = function() {
537
- const ret = new Array();
538
- return addHeapObject(ret);
539
- };
540
-
541
- module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
542
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
486
+ module.exports.__wbindgen_in = function(arg0, arg1) {
487
+ const ret = getObject(arg0) in getObject(arg1);
488
+ return ret;
543
489
  };
544
490
 
545
491
  module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
@@ -585,15 +531,6 @@ module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
585
531
  return addHeapObject(ret);
586
532
  };
587
533
 
588
- module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
589
- const ret = new Uint8Array(getObject(arg0));
590
- return addHeapObject(ret);
591
- };
592
-
593
- module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
594
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
595
- };
596
-
597
534
  module.exports.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function(arg0, arg1, arg2) {
598
535
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
599
536
  return addHeapObject(ret);
@@ -603,6 +540,15 @@ module.exports.__wbg_randomFillSync_e950366c42764a07 = function() { return handl
603
540
  getObject(arg0).randomFillSync(takeObject(arg1));
604
541
  }, arguments) };
605
542
 
543
+ module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
544
+ const ret = new Uint8Array(getObject(arg0));
545
+ return addHeapObject(ret);
546
+ };
547
+
548
+ module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
549
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
550
+ };
551
+
606
552
  module.exports.__wbg_crypto_70a96de3b6b73dac = function(arg0) {
607
553
  const ret = getObject(arg0).crypto;
608
554
  return addHeapObject(ret);
@@ -653,6 +599,11 @@ module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(fun
653
599
  return addHeapObject(ret);
654
600
  }, arguments) };
655
601
 
602
+ module.exports.__wbg_iterator_55f114446221aa5a = function() {
603
+ const ret = Symbol.iterator;
604
+ return addHeapObject(ret);
605
+ };
606
+
656
607
  module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
657
608
  const ret = getObject(arg0).call(getObject(arg1));
658
609
  return addHeapObject(ret);
@@ -707,11 +658,23 @@ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
707
658
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
708
659
  };
709
660
 
661
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
662
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
663
+ return addHeapObject(ret);
664
+ };
665
+
710
666
  module.exports.__wbg_entries_4e1315b774245952 = function(arg0) {
711
667
  const ret = Object.entries(getObject(arg0));
712
668
  return addHeapObject(ret);
713
669
  };
714
670
 
671
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
672
+ const obj = getObject(arg1);
673
+ const ret = typeof(obj) === 'number' ? obj : undefined;
674
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
675
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
676
+ };
677
+
715
678
  module.exports.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
716
679
  let result;
717
680
  try {
@@ -734,11 +697,48 @@ module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
734
697
  return ret;
735
698
  };
736
699
 
737
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
738
- const ret = new Error(getStringFromWasm0(arg0, arg1));
700
+ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
701
+ const ret = getObject(arg0).length;
702
+ return ret;
703
+ };
704
+
705
+ module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
706
+ const ret = Array.isArray(getObject(arg0));
707
+ return ret;
708
+ };
709
+
710
+ module.exports.__wbindgen_is_bigint = function(arg0) {
711
+ const ret = typeof(getObject(arg0)) === 'bigint';
712
+ return ret;
713
+ };
714
+
715
+ module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
716
+ const v = getObject(arg1);
717
+ const ret = typeof(v) === 'bigint' ? v : undefined;
718
+ getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
719
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
720
+ };
721
+
722
+ module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
723
+ const ret = arg0;
724
+ return addHeapObject(ret);
725
+ };
726
+
727
+ module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
728
+ const ret = getObject(arg0) === getObject(arg1);
729
+ return ret;
730
+ };
731
+
732
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
733
+ const ret = BigInt.asUintN(64, arg0);
739
734
  return addHeapObject(ret);
740
735
  };
741
736
 
737
+ module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
738
+ const ret = Number.isSafeInteger(getObject(arg0));
739
+ return ret;
740
+ };
741
+
742
742
  module.exports.__wbg_new_f9876326328f45ed = function() {
743
743
  const ret = new Object();
744
744
  return addHeapObject(ret);
@@ -771,11 +771,6 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
771
771
  throw new Error(getStringFromWasm0(arg0, arg1));
772
772
  };
773
773
 
774
- module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
775
- const ret = getObject(arg0).then(getObject(arg1));
776
- return addHeapObject(ret);
777
- };
778
-
779
774
  module.exports.__wbg_resolve_fd40f858d9db1a04 = function(arg0) {
780
775
  const ret = Promise.resolve(getObject(arg0));
781
776
  return addHeapObject(ret);
@@ -791,8 +786,13 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
791
786
  return ret;
792
787
  };
793
788
 
794
- module.exports.__wbindgen_closure_wrapper18201 = function(arg0, arg1, arg2) {
795
- const ret = makeMutClosure(arg0, arg1, 275, __wbg_adapter_46);
789
+ module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
790
+ const ret = getObject(arg0).then(getObject(arg1));
791
+ return addHeapObject(ret);
792
+ };
793
+
794
+ module.exports.__wbindgen_closure_wrapper18415 = function(arg0, arg1, arg2) {
795
+ const ret = makeMutClosure(arg0, arg1, 253, __wbg_adapter_46);
796
796
  return addHeapObject(ret);
797
797
  };
798
798
 
package/wasm_bg.wasm CHANGED
Binary file