@swc/wasm 1.3.90 → 1.3.92

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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "강동윤 <kdy1997.dev@gmail.com>"
5
5
  ],
6
6
  "description": "wasm module for swc",
7
- "version": "1.3.90",
7
+ "version": "1.3.92",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",
package/wasm.d.ts CHANGED
@@ -7,42 +7,6 @@
7
7
  */
8
8
  export function browserslist(query: string, opts: any): any;
9
9
 
10
- export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
11
- export function minifySync(code: string, opts?: JsMinifyOptions): Output;
12
-
13
- export function parse(src: string, options: ParseOptions & {
14
- isModule: false;
15
- }): Promise<Script>;
16
- export function parse(src: string, options?: ParseOptions): Promise<Module>;
17
- export function parseSync(src: string, options: ParseOptions & {
18
- isModule: false;
19
- }): Script;
20
- export function parseSync(src: string, options?: ParseOptions): Module;
21
-
22
- export function print(m: Program, options?: Options): Promise<Output>;
23
- export function printSync(m: Program, options?: Options): Output
24
-
25
- /**
26
- * Note: this interface currently does not do _actual_ async work, only provides
27
- * a corresponding async interfaces to the `@swc/core`'s interface.
28
- */
29
- export function transform(
30
- code: string | Program,
31
- options?: Options,
32
- experimental_plugin_bytes_resolver?: any
33
- ): Promise<Output>;
34
- /**
35
- * @param {string} code
36
- * @param {Options} opts
37
- * @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
38
- * specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
39
- * interface, likely will change.
40
- * @returns {Output}
41
- */
42
- export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
43
-
44
-
45
-
46
10
  export interface Plugin {
47
11
  (module: Program): Program;
48
12
  }
@@ -2845,3 +2809,39 @@ export interface Invalid extends Node, HasSpan {
2845
2809
  }
2846
2810
 
2847
2811
 
2812
+
2813
+ export function minify(src: string, opts?: JsMinifyOptions): Promise<Output>;
2814
+ export function minifySync(code: string, opts?: JsMinifyOptions): Output;
2815
+
2816
+ export function parse(src: string, options: ParseOptions & {
2817
+ isModule: false;
2818
+ }): Promise<Script>;
2819
+ export function parse(src: string, options?: ParseOptions): Promise<Module>;
2820
+ export function parseSync(src: string, options: ParseOptions & {
2821
+ isModule: false;
2822
+ }): Script;
2823
+ export function parseSync(src: string, options?: ParseOptions): Module;
2824
+
2825
+ export function print(m: Program, options?: Options): Promise<Output>;
2826
+ export function printSync(m: Program, options?: Options): Output
2827
+
2828
+ /**
2829
+ * Note: this interface currently does not do _actual_ async work, only provides
2830
+ * a corresponding async interfaces to the `@swc/core`'s interface.
2831
+ */
2832
+ export function transform(
2833
+ code: string | Program,
2834
+ options?: Options,
2835
+ experimental_plugin_bytes_resolver?: any
2836
+ ): Promise<Output>;
2837
+ /**
2838
+ * @param {string} code
2839
+ * @param {Options} opts
2840
+ * @param {Record<string, ArrayBuffer>} experimental_plugin_bytes_resolver An object contains bytes array for the plugin
2841
+ * specified in config. Key of record represents the name of the plugin specified in config. Note this is an experimental
2842
+ * interface, likely will change.
2843
+ * @returns {Output}
2844
+ */
2845
+ export function transformSync(code: string | Program, opts?: Options, experimental_plugin_bytes_resolver?: any): Output;
2846
+
2847
+
package/wasm.js CHANGED
@@ -448,6 +448,36 @@ module.exports.__wbg_new_f841cc6f2098f4b5 = function() {
448
448
  return addHeapObject(ret);
449
449
  };
450
450
 
451
+ module.exports.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
452
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
453
+ return addHeapObject(ret);
454
+ };
455
+
456
+ module.exports.__wbindgen_is_string = function(arg0) {
457
+ const ret = typeof(getObject(arg0)) === 'string';
458
+ return ret;
459
+ };
460
+
461
+ module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
462
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
463
+ return addHeapObject(ret);
464
+ }, arguments) };
465
+
466
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
467
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
468
+ return addHeapObject(ret);
469
+ };
470
+
471
+ module.exports.__wbindgen_is_null = function(arg0) {
472
+ const ret = getObject(arg0) === null;
473
+ return ret;
474
+ };
475
+
476
+ module.exports.__wbindgen_is_undefined = function(arg0) {
477
+ const ret = getObject(arg0) === undefined;
478
+ return ret;
479
+ };
480
+
451
481
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
452
482
  const obj = getObject(arg1);
453
483
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -457,13 +487,28 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
457
487
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
458
488
  };
459
489
 
460
- module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
461
- const ret = getObject(arg0) == getObject(arg1);
462
- return ret;
490
+ module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
491
+ try {
492
+ var state0 = {a: arg0, b: arg1};
493
+ var cb0 = (arg0, arg1) => {
494
+ const a = state0.a;
495
+ state0.a = 0;
496
+ try {
497
+ return __wbg_adapter_126(a, state0.b, arg0, arg1);
498
+ } finally {
499
+ state0.a = a;
500
+ }
501
+ };
502
+ const ret = new Promise(cb0);
503
+ return addHeapObject(ret);
504
+ } finally {
505
+ state0.a = state0.b = 0;
506
+ }
463
507
  };
464
508
 
465
- module.exports.__wbindgen_is_string = function(arg0) {
466
- const ret = typeof(getObject(arg0)) === 'string';
509
+ module.exports.__wbindgen_boolean_get = function(arg0) {
510
+ const v = getObject(arg0);
511
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
467
512
  return ret;
468
513
  };
469
514
 
@@ -483,27 +528,21 @@ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
483
528
  return ret;
484
529
  };
485
530
 
531
+ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
532
+ const ret = getObject(arg0) == getObject(arg1);
533
+ return ret;
534
+ };
535
+
486
536
  module.exports.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
487
537
  const ret = getObject(arg0)[getObject(arg1)];
488
538
  return addHeapObject(ret);
489
539
  };
490
540
 
491
- module.exports.__wbindgen_is_undefined = function(arg0) {
492
- const ret = getObject(arg0) === undefined;
493
- return ret;
494
- };
495
-
496
541
  module.exports.__wbindgen_in = function(arg0, arg1) {
497
542
  const ret = getObject(arg0) in getObject(arg1);
498
543
  return ret;
499
544
  };
500
545
 
501
- module.exports.__wbindgen_boolean_get = function(arg0) {
502
- const v = getObject(arg0);
503
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
504
- return ret;
505
- };
506
-
507
546
  module.exports.__wbindgen_is_bigint = function(arg0) {
508
547
  const ret = typeof(getObject(arg0)) === 'bigint';
509
548
  return ret;
@@ -553,65 +592,26 @@ module.exports.__wbg_iterator_55f114446221aa5a = function() {
553
592
  return addHeapObject(ret);
554
593
  };
555
594
 
556
- module.exports.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
557
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
558
- return addHeapObject(ret);
559
- };
560
-
561
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
562
- const ret = new Error(getStringFromWasm0(arg0, arg1));
563
- return addHeapObject(ret);
564
- };
565
-
566
- module.exports.__wbindgen_is_null = function(arg0) {
567
- const ret = getObject(arg0) === null;
568
- return ret;
569
- };
570
-
571
- module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
572
- try {
573
- var state0 = {a: arg0, b: arg1};
574
- var cb0 = (arg0, arg1) => {
575
- const a = state0.a;
576
- state0.a = 0;
577
- try {
578
- return __wbg_adapter_126(a, state0.b, arg0, arg1);
579
- } finally {
580
- state0.a = a;
581
- }
582
- };
583
- const ret = new Promise(cb0);
584
- return addHeapObject(ret);
585
- } finally {
586
- state0.a = state0.b = 0;
587
- }
588
- };
589
-
590
595
  module.exports.__wbindgen_number_new = function(arg0) {
591
596
  const ret = arg0;
592
597
  return addHeapObject(ret);
593
598
  };
594
599
 
595
- module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
596
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
597
- return addHeapObject(ret);
598
- }, arguments) };
599
-
600
600
  module.exports.__wbg_new0_25059e40b1c02766 = function() {
601
601
  const ret = new Date();
602
602
  return addHeapObject(ret);
603
603
  };
604
604
 
605
- module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
606
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
607
- return addHeapObject(ret);
608
- }, arguments) };
609
-
610
605
  module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
611
606
  const ret = getObject(arg0).getTimezoneOffset();
612
607
  return ret;
613
608
  };
614
609
 
610
+ module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
611
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
612
+ return addHeapObject(ret);
613
+ }, arguments) };
614
+
615
615
  module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
616
616
  const ret = getObject(arg0).getTime();
617
617
  return ret;
@@ -821,8 +821,8 @@ module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
821
821
  return addHeapObject(ret);
822
822
  };
823
823
 
824
- module.exports.__wbindgen_closure_wrapper15512 = function(arg0, arg1, arg2) {
825
- const ret = makeMutClosure(arg0, arg1, 226, __wbg_adapter_50);
824
+ module.exports.__wbindgen_closure_wrapper15573 = function(arg0, arg1, arg2) {
825
+ const ret = makeMutClosure(arg0, arg1, 222, __wbg_adapter_50);
826
826
  return addHeapObject(ret);
827
827
  };
828
828
 
package/wasm_bg.wasm CHANGED
Binary file