@next/swc-wasm-web 16.0.2-canary.5 → 16.0.2-canary.6

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-canary.5",
4
+ "version": "16.0.2-canary.6",
5
5
  "files": [
6
6
  "wasm_bg.wasm",
7
7
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function parseSync(s: string, opts: any): any;
4
3
  export function minify(s: string, opts: any): Promise<any>;
5
4
  export function transformSync(s: any, opts: any): any;
6
- export function parse(s: string, opts: any): Promise<any>;
7
- export function minifySync(s: string, opts: any): any;
8
5
  export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
9
6
  export function transform(s: any, opts: any): Promise<any>;
10
- export function mdxCompileSync(value: string, opts: any): any;
7
+ export function parseSync(s: string, opts: any): any;
8
+ export function minifySync(s: string, opts: any): any;
9
+ export function parse(s: string, opts: any): Promise<any>;
11
10
  export function mdxCompile(value: string, opts: any): Promise<any>;
11
+ export function mdxCompileSync(value: string, opts: any): any;
12
12
 
13
13
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
14
14
 
@@ -31,7 +31,7 @@ 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 closure1168_externref_shim: (a: number, b: number, c: any) => void;
34
+ readonly closure1162_externref_shim: (a: number, b: number, c: any) => void;
35
35
  readonly closure124_externref_shim: (a: number, b: number, c: any, d: any) => void;
36
36
  readonly __wbindgen_start: () => void;
37
37
  }
package/wasm.js CHANGED
@@ -212,25 +212,6 @@ function debugString(val) {
212
212
  // TODO we could test for more things here, like `Set`s and `Map`s.
213
213
  return className;
214
214
  }
215
-
216
- function takeFromExternrefTable0(idx) {
217
- const value = wasm.__wbindgen_export_4.get(idx);
218
- wasm.__externref_table_dealloc(idx);
219
- return value;
220
- }
221
- /**
222
- * @param {string} s
223
- * @param {any} opts
224
- * @returns {any}
225
- */
226
- export function parseSync(s, opts) {
227
- const ret = wasm.parseSync(s, opts);
228
- if (ret[2]) {
229
- throw takeFromExternrefTable0(ret[1]);
230
- }
231
- return takeFromExternrefTable0(ret[0]);
232
- }
233
-
234
215
  /**
235
216
  * @param {string} s
236
217
  * @param {any} opts
@@ -241,6 +222,11 @@ export function minify(s, opts) {
241
222
  return ret;
242
223
  }
243
224
 
225
+ function takeFromExternrefTable0(idx) {
226
+ const value = wasm.__wbindgen_export_4.get(idx);
227
+ wasm.__externref_table_dealloc(idx);
228
+ return value;
229
+ }
244
230
  /**
245
231
  * @param {any} s
246
232
  * @param {any} opts
@@ -254,29 +240,6 @@ export function transformSync(s, opts) {
254
240
  return takeFromExternrefTable0(ret[0]);
255
241
  }
256
242
 
257
- /**
258
- * @param {string} s
259
- * @param {any} opts
260
- * @returns {Promise<any>}
261
- */
262
- export function parse(s, opts) {
263
- const ret = wasm.parse(s, opts);
264
- return ret;
265
- }
266
-
267
- /**
268
- * @param {string} s
269
- * @param {any} opts
270
- * @returns {any}
271
- */
272
- export function minifySync(s, opts) {
273
- const ret = wasm.minifySync(s, opts);
274
- if (ret[2]) {
275
- throw takeFromExternrefTable0(ret[1]);
276
- }
277
- return takeFromExternrefTable0(ret[0]);
278
- }
279
-
280
243
  function passArray8ToWasm0(arg, malloc) {
281
244
  const ptr = malloc(arg.length * 1, 1) >>> 0;
282
245
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -319,18 +282,41 @@ export function transform(s, opts) {
319
282
  }
320
283
 
321
284
  /**
322
- * @param {string} value
285
+ * @param {string} s
323
286
  * @param {any} opts
324
287
  * @returns {any}
325
288
  */
326
- export function mdxCompileSync(value, opts) {
327
- const ret = wasm.mdxCompileSync(value, opts);
289
+ export function parseSync(s, opts) {
290
+ const ret = wasm.parseSync(s, opts);
291
+ if (ret[2]) {
292
+ throw takeFromExternrefTable0(ret[1]);
293
+ }
294
+ return takeFromExternrefTable0(ret[0]);
295
+ }
296
+
297
+ /**
298
+ * @param {string} s
299
+ * @param {any} opts
300
+ * @returns {any}
301
+ */
302
+ export function minifySync(s, opts) {
303
+ const ret = wasm.minifySync(s, opts);
328
304
  if (ret[2]) {
329
305
  throw takeFromExternrefTable0(ret[1]);
330
306
  }
331
307
  return takeFromExternrefTable0(ret[0]);
332
308
  }
333
309
 
310
+ /**
311
+ * @param {string} s
312
+ * @param {any} opts
313
+ * @returns {Promise<any>}
314
+ */
315
+ export function parse(s, opts) {
316
+ const ret = wasm.parse(s, opts);
317
+ return ret;
318
+ }
319
+
334
320
  /**
335
321
  * @param {string} value
336
322
  * @param {any} opts
@@ -341,8 +327,21 @@ export function mdxCompile(value, opts) {
341
327
  return ret;
342
328
  }
343
329
 
330
+ /**
331
+ * @param {string} value
332
+ * @param {any} opts
333
+ * @returns {any}
334
+ */
335
+ export function mdxCompileSync(value, opts) {
336
+ const ret = wasm.mdxCompileSync(value, opts);
337
+ if (ret[2]) {
338
+ throw takeFromExternrefTable0(ret[1]);
339
+ }
340
+ return takeFromExternrefTable0(ret[0]);
341
+ }
342
+
344
343
  function __wbg_adapter_50(arg0, arg1, arg2) {
345
- wasm.closure1168_externref_shim(arg0, arg1, arg2);
344
+ wasm.closure1162_externref_shim(arg0, arg1, arg2);
346
345
  }
347
346
 
348
347
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
@@ -612,8 +611,8 @@ function __wbg_get_imports() {
612
611
  const ret = false;
613
612
  return ret;
614
613
  };
615
- imports.wbg.__wbindgen_closure_wrapper23912 = function(arg0, arg1, arg2) {
616
- const ret = makeMutClosure(arg0, arg1, 1169, __wbg_adapter_50);
614
+ imports.wbg.__wbindgen_closure_wrapper23874 = function(arg0, arg1, arg2) {
615
+ const ret = makeMutClosure(arg0, arg1, 1163, __wbg_adapter_50);
617
616
  return ret;
618
617
  };
619
618
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/wasm_bg.wasm CHANGED
Binary file