@swc/wasm-web 1.3.89 → 1.3.91

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.89",
7
+ "version": "1.3.91",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",
package/wasm-web.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
  }
@@ -2846,6 +2810,42 @@ export interface Invalid extends Node, HasSpan {
2846
2810
 
2847
2811
 
2848
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
+
2848
+
2849
2849
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
2850
2850
 
2851
2851
  export interface InitOutput {
package/wasm-web.js CHANGED
@@ -468,6 +468,30 @@ function getImports() {
468
468
  const ret = new Map();
469
469
  return addHeapObject(ret);
470
470
  };
471
+ imports.wbg.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
472
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
473
+ return addHeapObject(ret);
474
+ };
475
+ imports.wbg.__wbindgen_is_string = function(arg0) {
476
+ const ret = typeof(getObject(arg0)) === 'string';
477
+ return ret;
478
+ };
479
+ imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
480
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
481
+ return addHeapObject(ret);
482
+ }, arguments) };
483
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
484
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
485
+ return addHeapObject(ret);
486
+ };
487
+ imports.wbg.__wbindgen_is_null = function(arg0) {
488
+ const ret = getObject(arg0) === null;
489
+ return ret;
490
+ };
491
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
492
+ const ret = getObject(arg0) === undefined;
493
+ return ret;
494
+ };
471
495
  imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
472
496
  const obj = getObject(arg1);
473
497
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -476,12 +500,27 @@ function getImports() {
476
500
  getInt32Memory0()[arg0 / 4 + 1] = len0;
477
501
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
478
502
  };
479
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
480
- const ret = getObject(arg0) == getObject(arg1);
481
- return ret;
503
+ imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
504
+ try {
505
+ var state0 = {a: arg0, b: arg1};
506
+ var cb0 = (arg0, arg1) => {
507
+ const a = state0.a;
508
+ state0.a = 0;
509
+ try {
510
+ return __wbg_adapter_126(a, state0.b, arg0, arg1);
511
+ } finally {
512
+ state0.a = a;
513
+ }
514
+ };
515
+ const ret = new Promise(cb0);
516
+ return addHeapObject(ret);
517
+ } finally {
518
+ state0.a = state0.b = 0;
519
+ }
482
520
  };
483
- imports.wbg.__wbindgen_is_string = function(arg0) {
484
- const ret = typeof(getObject(arg0)) === 'string';
521
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
522
+ const v = getObject(arg0);
523
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
485
524
  return ret;
486
525
  };
487
526
  imports.wbg.__wbindgen_is_object = function(arg0) {
@@ -497,23 +536,18 @@ function getImports() {
497
536
  const ret = getObject(arg0).length;
498
537
  return ret;
499
538
  };
539
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
540
+ const ret = getObject(arg0) == getObject(arg1);
541
+ return ret;
542
+ };
500
543
  imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
501
544
  const ret = getObject(arg0)[getObject(arg1)];
502
545
  return addHeapObject(ret);
503
546
  };
504
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
505
- const ret = getObject(arg0) === undefined;
506
- return ret;
507
- };
508
547
  imports.wbg.__wbindgen_in = function(arg0, arg1) {
509
548
  const ret = getObject(arg0) in getObject(arg1);
510
549
  return ret;
511
550
  };
512
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
513
- const v = getObject(arg0);
514
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
515
- return ret;
516
- };
517
551
  imports.wbg.__wbindgen_is_bigint = function(arg0) {
518
552
  const ret = typeof(getObject(arg0)) === 'bigint';
519
553
  return ret;
@@ -554,56 +588,22 @@ function getImports() {
554
588
  const ret = Symbol.iterator;
555
589
  return addHeapObject(ret);
556
590
  };
557
- imports.wbg.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
558
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
559
- return addHeapObject(ret);
560
- };
561
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
562
- const ret = new Error(getStringFromWasm0(arg0, arg1));
563
- return addHeapObject(ret);
564
- };
565
- imports.wbg.__wbindgen_is_null = function(arg0) {
566
- const ret = getObject(arg0) === null;
567
- return ret;
568
- };
569
- imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
570
- try {
571
- var state0 = {a: arg0, b: arg1};
572
- var cb0 = (arg0, arg1) => {
573
- const a = state0.a;
574
- state0.a = 0;
575
- try {
576
- return __wbg_adapter_126(a, state0.b, arg0, arg1);
577
- } finally {
578
- state0.a = a;
579
- }
580
- };
581
- const ret = new Promise(cb0);
582
- return addHeapObject(ret);
583
- } finally {
584
- state0.a = state0.b = 0;
585
- }
586
- };
587
591
  imports.wbg.__wbindgen_number_new = function(arg0) {
588
592
  const ret = arg0;
589
593
  return addHeapObject(ret);
590
594
  };
591
- imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
592
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
593
- return addHeapObject(ret);
594
- }, arguments) };
595
595
  imports.wbg.__wbg_new0_25059e40b1c02766 = function() {
596
596
  const ret = new Date();
597
597
  return addHeapObject(ret);
598
598
  };
599
- imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
600
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
601
- return addHeapObject(ret);
602
- }, arguments) };
603
599
  imports.wbg.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
604
600
  const ret = getObject(arg0).getTimezoneOffset();
605
601
  return ret;
606
602
  };
603
+ imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
604
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
605
+ return addHeapObject(ret);
606
+ }, arguments) };
607
607
  imports.wbg.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
608
608
  const ret = getObject(arg0).getTime();
609
609
  return ret;
@@ -776,8 +776,8 @@ imports.wbg.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
776
776
  const ret = getObject(arg0).then(getObject(arg1));
777
777
  return addHeapObject(ret);
778
778
  };
779
- imports.wbg.__wbindgen_closure_wrapper15520 = function(arg0, arg1, arg2) {
780
- const ret = makeMutClosure(arg0, arg1, 225, __wbg_adapter_50);
779
+ imports.wbg.__wbindgen_closure_wrapper15576 = function(arg0, arg1, arg2) {
780
+ const ret = makeMutClosure(arg0, arg1, 222, __wbg_adapter_50);
781
781
  return addHeapObject(ret);
782
782
  };
783
783
 
package/wasm-web_bg.wasm CHANGED
Binary file