@next/swc-wasm-web 16.0.2 → 16.1.0-canary.0

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-web",
3
3
  "type": "module",
4
- "version": "16.0.2",
4
+ "version": "16.1.0-canary.0",
5
5
  "files": [
6
6
  "wasm_bg.wasm",
7
7
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
4
- export function minifySync(s: string, opts: any): any;
4
+ export function transform(s: any, opts: any): Promise<any>;
5
+ export function transformSync(s: any, opts: any): any;
5
6
  export function parseSync(s: string, opts: any): any;
6
7
  export function minify(s: string, opts: any): Promise<any>;
7
- export function transform(s: any, opts: any): Promise<any>;
8
+ export function minifySync(s: string, opts: any): any;
8
9
  export function parse(s: string, opts: any): Promise<any>;
9
- export function transformSync(s: any, opts: any): any;
10
10
  export function mdxCompileSync(value: string, opts: any): any;
11
11
  export function mdxCompile(value: string, opts: any): Promise<any>;
12
12
 
@@ -15,14 +15,14 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
15
15
  export interface InitOutput {
16
16
  readonly memory: WebAssembly.Memory;
17
17
  readonly expandNextJsTemplate: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: any, i: any) => [number, number, number, number];
18
+ readonly mdxCompile: (a: any, b: any) => any;
19
+ readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
18
20
  readonly minify: (a: any, b: any) => any;
19
21
  readonly minifySync: (a: any, b: any) => [number, number, number];
20
22
  readonly parse: (a: any, b: any) => any;
21
23
  readonly parseSync: (a: any, b: any) => [number, number, number];
22
24
  readonly transform: (a: any, b: any) => any;
23
25
  readonly transformSync: (a: any, b: any) => [number, number, number];
24
- readonly mdxCompile: (a: any, b: any) => any;
25
- readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
26
26
  readonly __wbindgen_malloc: (a: number, b: number) => number;
27
27
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
28
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -31,8 +31,8 @@ export interface InitOutput {
31
31
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
32
32
  readonly __wbindgen_export_6: WebAssembly.Table;
33
33
  readonly __externref_table_dealloc: (a: number) => void;
34
- readonly closure1166_externref_shim: (a: number, b: number, c: any) => void;
35
- readonly closure124_externref_shim: (a: number, b: number, c: any, d: any) => void;
34
+ readonly closure1165_externref_shim: (a: number, b: number, c: any) => void;
35
+ readonly closure126_externref_shim: (a: number, b: number, c: any, d: any) => void;
36
36
  readonly __wbindgen_start: () => void;
37
37
  }
38
38
 
package/wasm.js CHANGED
@@ -251,12 +251,22 @@ export function expandNextJsTemplate(content, template_path, next_package_dir_pa
251
251
  }
252
252
 
253
253
  /**
254
- * @param {string} s
254
+ * @param {any} s
255
+ * @param {any} opts
256
+ * @returns {Promise<any>}
257
+ */
258
+ export function transform(s, opts) {
259
+ const ret = wasm.transform(s, opts);
260
+ return ret;
261
+ }
262
+
263
+ /**
264
+ * @param {any} s
255
265
  * @param {any} opts
256
266
  * @returns {any}
257
267
  */
258
- export function minifySync(s, opts) {
259
- const ret = wasm.minifySync(s, opts);
268
+ export function transformSync(s, opts) {
269
+ const ret = wasm.transformSync(s, opts);
260
270
  if (ret[2]) {
261
271
  throw takeFromExternrefTable0(ret[1]);
262
272
  }
@@ -287,13 +297,16 @@ export function minify(s, opts) {
287
297
  }
288
298
 
289
299
  /**
290
- * @param {any} s
300
+ * @param {string} s
291
301
  * @param {any} opts
292
- * @returns {Promise<any>}
302
+ * @returns {any}
293
303
  */
294
- export function transform(s, opts) {
295
- const ret = wasm.transform(s, opts);
296
- return ret;
304
+ export function minifySync(s, opts) {
305
+ const ret = wasm.minifySync(s, opts);
306
+ if (ret[2]) {
307
+ throw takeFromExternrefTable0(ret[1]);
308
+ }
309
+ return takeFromExternrefTable0(ret[0]);
297
310
  }
298
311
 
299
312
  /**
@@ -306,19 +319,6 @@ export function parse(s, opts) {
306
319
  return ret;
307
320
  }
308
321
 
309
- /**
310
- * @param {any} s
311
- * @param {any} opts
312
- * @returns {any}
313
- */
314
- export function transformSync(s, opts) {
315
- const ret = wasm.transformSync(s, opts);
316
- if (ret[2]) {
317
- throw takeFromExternrefTable0(ret[1]);
318
- }
319
- return takeFromExternrefTable0(ret[0]);
320
- }
321
-
322
322
  /**
323
323
  * @param {string} value
324
324
  * @param {any} opts
@@ -343,11 +343,11 @@ export function mdxCompile(value, opts) {
343
343
  }
344
344
 
345
345
  function __wbg_adapter_50(arg0, arg1, arg2) {
346
- wasm.closure1166_externref_shim(arg0, arg1, arg2);
346
+ wasm.closure1165_externref_shim(arg0, arg1, arg2);
347
347
  }
348
348
 
349
349
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
350
- wasm.closure124_externref_shim(arg0, arg1, arg2, arg3);
350
+ wasm.closure126_externref_shim(arg0, arg1, arg2, arg3);
351
351
  }
352
352
 
353
353
  async function __wbg_load(module, imports) {
@@ -534,13 +534,13 @@ function __wbg_get_imports() {
534
534
  const ret = arg0.next();
535
535
  return ret;
536
536
  }, arguments) };
537
- imports.wbg.__wbg_queueMicrotask_6c22d88054515cb4 = function(arg0) {
537
+ imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
538
+ queueMicrotask(arg0);
539
+ };
540
+ imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
538
541
  const ret = arg0.queueMicrotask;
539
542
  return ret;
540
543
  };
541
- imports.wbg.__wbg_queueMicrotask_b81e3a75ab81ca62 = function(arg0) {
542
- queueMicrotask(arg0);
543
- };
544
544
  imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
545
545
  const ret = Promise.resolve(arg0);
546
546
  return ret;
@@ -613,8 +613,8 @@ function __wbg_get_imports() {
613
613
  const ret = false;
614
614
  return ret;
615
615
  };
616
- imports.wbg.__wbindgen_closure_wrapper23882 = function(arg0, arg1, arg2) {
617
- const ret = makeMutClosure(arg0, arg1, 1167, __wbg_adapter_50);
616
+ imports.wbg.__wbindgen_closure_wrapper23640 = function(arg0, arg1, arg2) {
617
+ const ret = makeMutClosure(arg0, arg1, 1166, __wbg_adapter_50);
618
618
  return ret;
619
619
  };
620
620
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/wasm_bg.wasm CHANGED
Binary file