@next/swc-wasm-nodejs 16.1.1-canary.14 → 16.1.1-canary.16

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.1-canary.14",
3
+ "version": "16.1.1-canary.16",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function mdxCompileSync(value: string, opts: any): any;
4
3
  export function mdxCompile(value: string, opts: any): Promise<any>;
5
- export function parse(s: string, opts: any): Promise<any>;
6
- export function minify(s: string, opts: any): Promise<any>;
4
+ export function mdxCompileSync(value: string, opts: any): any;
7
5
  export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
8
6
  export function transform(s: any, opts: any): Promise<any>;
9
- export function minifySync(s: string, opts: any): any;
10
- export function transformSync(s: any, opts: any): any;
11
7
  export function parseSync(s: string, opts: any): any;
8
+ export function parse(s: string, opts: any): Promise<any>;
9
+ export function transformSync(s: any, opts: any): any;
10
+ export function minifySync(s: string, opts: any): any;
11
+ export function minify(s: string, opts: any): Promise<any>;
package/wasm.js CHANGED
@@ -216,6 +216,15 @@ function debugString(val) {
216
216
  // TODO we could test for more things here, like `Set`s and `Map`s.
217
217
  return className;
218
218
  }
219
+ /**
220
+ * @param {string} value
221
+ * @param {any} opts
222
+ * @returns {Promise<any>}
223
+ */
224
+ module.exports.mdxCompile = function(value, opts) {
225
+ const ret = wasm.mdxCompile(value, opts);
226
+ return ret;
227
+ };
219
228
 
220
229
  function takeFromExternrefTable0(idx) {
221
230
  const value = wasm.__wbindgen_export_4.get(idx);
@@ -235,36 +244,6 @@ module.exports.mdxCompileSync = function(value, opts) {
235
244
  return takeFromExternrefTable0(ret[0]);
236
245
  };
237
246
 
238
- /**
239
- * @param {string} value
240
- * @param {any} opts
241
- * @returns {Promise<any>}
242
- */
243
- module.exports.mdxCompile = function(value, opts) {
244
- const ret = wasm.mdxCompile(value, opts);
245
- return ret;
246
- };
247
-
248
- /**
249
- * @param {string} s
250
- * @param {any} opts
251
- * @returns {Promise<any>}
252
- */
253
- module.exports.parse = function(s, opts) {
254
- const ret = wasm.parse(s, opts);
255
- return ret;
256
- };
257
-
258
- /**
259
- * @param {string} s
260
- * @param {any} opts
261
- * @returns {Promise<any>}
262
- */
263
- module.exports.minify = function(s, opts) {
264
- const ret = wasm.minify(s, opts);
265
- return ret;
266
- };
267
-
268
247
  function passArray8ToWasm0(arg, malloc) {
269
248
  const ptr = malloc(arg.length * 1, 1) >>> 0;
270
249
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -311,14 +290,24 @@ module.exports.transform = function(s, opts) {
311
290
  * @param {any} opts
312
291
  * @returns {any}
313
292
  */
314
- module.exports.minifySync = function(s, opts) {
315
- const ret = wasm.minifySync(s, opts);
293
+ module.exports.parseSync = function(s, opts) {
294
+ const ret = wasm.parseSync(s, opts);
316
295
  if (ret[2]) {
317
296
  throw takeFromExternrefTable0(ret[1]);
318
297
  }
319
298
  return takeFromExternrefTable0(ret[0]);
320
299
  };
321
300
 
301
+ /**
302
+ * @param {string} s
303
+ * @param {any} opts
304
+ * @returns {Promise<any>}
305
+ */
306
+ module.exports.parse = function(s, opts) {
307
+ const ret = wasm.parse(s, opts);
308
+ return ret;
309
+ };
310
+
322
311
  /**
323
312
  * @param {any} s
324
313
  * @param {any} opts
@@ -337,16 +326,26 @@ module.exports.transformSync = function(s, opts) {
337
326
  * @param {any} opts
338
327
  * @returns {any}
339
328
  */
340
- module.exports.parseSync = function(s, opts) {
341
- const ret = wasm.parseSync(s, opts);
329
+ module.exports.minifySync = function(s, opts) {
330
+ const ret = wasm.minifySync(s, opts);
342
331
  if (ret[2]) {
343
332
  throw takeFromExternrefTable0(ret[1]);
344
333
  }
345
334
  return takeFromExternrefTable0(ret[0]);
346
335
  };
347
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
+
348
347
  function __wbg_adapter_50(arg0, arg1, arg2) {
349
- wasm.closure1159_externref_shim(arg0, arg1, arg2);
348
+ wasm.closure1162_externref_shim(arg0, arg1, arg2);
350
349
  }
351
350
 
352
351
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
@@ -630,8 +629,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
630
629
  return ret;
631
630
  };
632
631
 
633
- module.exports.__wbindgen_closure_wrapper23586 = function(arg0, arg1, arg2) {
634
- const ret = makeMutClosure(arg0, arg1, 1160, __wbg_adapter_50);
632
+ module.exports.__wbindgen_closure_wrapper23447 = function(arg0, arg1, arg2) {
633
+ const ret = makeMutClosure(arg0, arg1, 1163, __wbg_adapter_50);
635
634
  return ret;
636
635
  };
637
636
 
package/wasm_bg.wasm CHANGED
Binary file