@next/swc-wasm-nodejs 16.1.0-canary.13 → 16.1.0-canary.14

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-nodejs",
3
- "version": "16.1.0-canary.13",
3
+ "version": "16.1.0-canary.14",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  /* eslint-disable */
3
3
  export function mdxCompile(value: string, opts: any): Promise<any>;
4
4
  export function mdxCompileSync(value: string, opts: any): any;
5
- export function minify(s: string, opts: any): Promise<any>;
6
5
  export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
7
- export function parseSync(s: string, opts: any): any;
8
- export function parse(s: string, opts: any): Promise<any>;
9
- export function transform(s: any, opts: any): Promise<any>;
10
6
  export function minifySync(s: string, opts: any): any;
11
7
  export function transformSync(s: any, opts: any): any;
8
+ export function transform(s: any, opts: any): Promise<any>;
9
+ export function parse(s: string, opts: any): Promise<any>;
10
+ export function parseSync(s: string, opts: any): any;
11
+ export function minify(s: string, opts: any): Promise<any>;
package/wasm.js CHANGED
@@ -244,16 +244,6 @@ module.exports.mdxCompileSync = function(value, opts) {
244
244
  return takeFromExternrefTable0(ret[0]);
245
245
  };
246
246
 
247
- /**
248
- * @param {string} s
249
- * @param {any} opts
250
- * @returns {Promise<any>}
251
- */
252
- module.exports.minify = function(s, opts) {
253
- const ret = wasm.minify(s, opts);
254
- return ret;
255
- };
256
-
257
247
  function passArray8ToWasm0(arg, malloc) {
258
248
  const ptr = malloc(arg.length * 1, 1) >>> 0;
259
249
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -290,8 +280,8 @@ module.exports.expandNextJsTemplate = function(content, template_path, next_pack
290
280
  * @param {any} opts
291
281
  * @returns {any}
292
282
  */
293
- module.exports.parseSync = function(s, opts) {
294
- const ret = wasm.parseSync(s, opts);
283
+ module.exports.minifySync = function(s, opts) {
284
+ const ret = wasm.minifySync(s, opts);
295
285
  if (ret[2]) {
296
286
  throw takeFromExternrefTable0(ret[1]);
297
287
  }
@@ -299,13 +289,16 @@ module.exports.parseSync = function(s, opts) {
299
289
  };
300
290
 
301
291
  /**
302
- * @param {string} s
292
+ * @param {any} s
303
293
  * @param {any} opts
304
- * @returns {Promise<any>}
294
+ * @returns {any}
305
295
  */
306
- module.exports.parse = function(s, opts) {
307
- const ret = wasm.parse(s, opts);
308
- return ret;
296
+ module.exports.transformSync = function(s, opts) {
297
+ const ret = wasm.transformSync(s, opts);
298
+ if (ret[2]) {
299
+ throw takeFromExternrefTable0(ret[1]);
300
+ }
301
+ return takeFromExternrefTable0(ret[0]);
309
302
  };
310
303
 
311
304
  /**
@@ -321,31 +314,38 @@ module.exports.transform = function(s, opts) {
321
314
  /**
322
315
  * @param {string} s
323
316
  * @param {any} opts
324
- * @returns {any}
317
+ * @returns {Promise<any>}
325
318
  */
326
- module.exports.minifySync = function(s, opts) {
327
- const ret = wasm.minifySync(s, opts);
328
- if (ret[2]) {
329
- throw takeFromExternrefTable0(ret[1]);
330
- }
331
- return takeFromExternrefTable0(ret[0]);
319
+ module.exports.parse = function(s, opts) {
320
+ const ret = wasm.parse(s, opts);
321
+ return ret;
332
322
  };
333
323
 
334
324
  /**
335
- * @param {any} s
325
+ * @param {string} s
336
326
  * @param {any} opts
337
327
  * @returns {any}
338
328
  */
339
- module.exports.transformSync = function(s, opts) {
340
- const ret = wasm.transformSync(s, opts);
329
+ module.exports.parseSync = function(s, opts) {
330
+ const ret = wasm.parseSync(s, opts);
341
331
  if (ret[2]) {
342
332
  throw takeFromExternrefTable0(ret[1]);
343
333
  }
344
334
  return takeFromExternrefTable0(ret[0]);
345
335
  };
346
336
 
337
+ /**
338
+ * @param {string} s
339
+ * @param {any} opts
340
+ * @returns {Promise<any>}
341
+ */
342
+ module.exports.minify = function(s, opts) {
343
+ const ret = wasm.minify(s, opts);
344
+ return ret;
345
+ };
346
+
347
347
  function __wbg_adapter_50(arg0, arg1, arg2) {
348
- wasm.closure1164_externref_shim(arg0, arg1, arg2);
348
+ wasm.closure1159_externref_shim(arg0, arg1, arg2);
349
349
  }
350
350
 
351
351
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
@@ -629,8 +629,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
629
629
  return ret;
630
630
  };
631
631
 
632
- module.exports.__wbindgen_closure_wrapper23626 = function(arg0, arg1, arg2) {
633
- const ret = makeMutClosure(arg0, arg1, 1165, __wbg_adapter_50);
632
+ module.exports.__wbindgen_closure_wrapper23601 = function(arg0, arg1, arg2) {
633
+ const ret = makeMutClosure(arg0, arg1, 1160, __wbg_adapter_50);
634
634
  return ret;
635
635
  };
636
636
 
package/wasm_bg.wasm CHANGED
Binary file