@next/swc-wasm-nodejs 16.0.0-canary.8 → 16.0.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-nodejs",
3
- "version": "16.0.0-canary.8",
3
+ "version": "16.0.0",
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 parse(s: string, opts: any): Promise<any>;
4
3
  export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
5
- export function transform(s: any, opts: any): Promise<any>;
6
4
  export function transformSync(s: any, opts: any): any;
7
- export function minifySync(s: string, opts: any): any;
8
5
  export function minify(s: string, opts: any): Promise<any>;
9
6
  export function parseSync(s: string, opts: any): any;
10
- export function mdxCompileSync(value: string, opts: any): any;
7
+ export function transform(s: any, opts: any): Promise<any>;
8
+ export function parse(s: string, opts: any): Promise<any>;
9
+ export function minifySync(s: string, opts: any): any;
11
10
  export function mdxCompile(value: string, opts: any): Promise<any>;
11
+ export function mdxCompileSync(value: string, opts: any): any;
package/wasm.js CHANGED
@@ -216,15 +216,6 @@ 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} s
221
- * @param {any} opts
222
- * @returns {Promise<any>}
223
- */
224
- module.exports.parse = function(s, opts) {
225
- const ret = wasm.parse(s, opts);
226
- return ret;
227
- };
228
219
 
229
220
  function passArray8ToWasm0(arg, malloc) {
230
221
  const ptr = malloc(arg.length * 1, 1) >>> 0;
@@ -263,16 +254,6 @@ module.exports.expandNextJsTemplate = function(content, template_path, next_pack
263
254
  return v4;
264
255
  };
265
256
 
266
- /**
267
- * @param {any} s
268
- * @param {any} opts
269
- * @returns {Promise<any>}
270
- */
271
- module.exports.transform = function(s, opts) {
272
- const ret = wasm.transform(s, opts);
273
- return ret;
274
- };
275
-
276
257
  /**
277
258
  * @param {any} s
278
259
  * @param {any} opts
@@ -286,13 +267,23 @@ module.exports.transformSync = function(s, opts) {
286
267
  return takeFromExternrefTable0(ret[0]);
287
268
  };
288
269
 
270
+ /**
271
+ * @param {string} s
272
+ * @param {any} opts
273
+ * @returns {Promise<any>}
274
+ */
275
+ module.exports.minify = function(s, opts) {
276
+ const ret = wasm.minify(s, opts);
277
+ return ret;
278
+ };
279
+
289
280
  /**
290
281
  * @param {string} s
291
282
  * @param {any} opts
292
283
  * @returns {any}
293
284
  */
294
- module.exports.minifySync = function(s, opts) {
295
- const ret = wasm.minifySync(s, opts);
285
+ module.exports.parseSync = function(s, opts) {
286
+ const ret = wasm.parseSync(s, opts);
296
287
  if (ret[2]) {
297
288
  throw takeFromExternrefTable0(ret[1]);
298
289
  }
@@ -300,35 +291,32 @@ module.exports.minifySync = function(s, opts) {
300
291
  };
301
292
 
302
293
  /**
303
- * @param {string} s
294
+ * @param {any} s
304
295
  * @param {any} opts
305
296
  * @returns {Promise<any>}
306
297
  */
307
- module.exports.minify = function(s, opts) {
308
- const ret = wasm.minify(s, opts);
298
+ module.exports.transform = function(s, opts) {
299
+ const ret = wasm.transform(s, opts);
309
300
  return ret;
310
301
  };
311
302
 
312
303
  /**
313
304
  * @param {string} s
314
305
  * @param {any} opts
315
- * @returns {any}
306
+ * @returns {Promise<any>}
316
307
  */
317
- module.exports.parseSync = function(s, opts) {
318
- const ret = wasm.parseSync(s, opts);
319
- if (ret[2]) {
320
- throw takeFromExternrefTable0(ret[1]);
321
- }
322
- return takeFromExternrefTable0(ret[0]);
308
+ module.exports.parse = function(s, opts) {
309
+ const ret = wasm.parse(s, opts);
310
+ return ret;
323
311
  };
324
312
 
325
313
  /**
326
- * @param {string} value
314
+ * @param {string} s
327
315
  * @param {any} opts
328
316
  * @returns {any}
329
317
  */
330
- module.exports.mdxCompileSync = function(value, opts) {
331
- const ret = wasm.mdxCompileSync(value, opts);
318
+ module.exports.minifySync = function(s, opts) {
319
+ const ret = wasm.minifySync(s, opts);
332
320
  if (ret[2]) {
333
321
  throw takeFromExternrefTable0(ret[1]);
334
322
  }
@@ -345,12 +333,25 @@ module.exports.mdxCompile = function(value, opts) {
345
333
  return ret;
346
334
  };
347
335
 
336
+ /**
337
+ * @param {string} value
338
+ * @param {any} opts
339
+ * @returns {any}
340
+ */
341
+ module.exports.mdxCompileSync = function(value, opts) {
342
+ const ret = wasm.mdxCompileSync(value, opts);
343
+ if (ret[2]) {
344
+ throw takeFromExternrefTable0(ret[1]);
345
+ }
346
+ return takeFromExternrefTable0(ret[0]);
347
+ };
348
+
348
349
  function __wbg_adapter_50(arg0, arg1, arg2) {
349
- wasm.closure1154_externref_shim(arg0, arg1, arg2);
350
+ wasm.closure1150_externref_shim(arg0, arg1, arg2);
350
351
  }
351
352
 
352
353
  function __wbg_adapter_81(arg0, arg1, arg2, arg3) {
353
- wasm.closure122_externref_shim(arg0, arg1, arg2, arg3);
354
+ wasm.closure123_externref_shim(arg0, arg1, arg2, arg3);
354
355
  }
355
356
 
356
357
  module.exports.__wbg_String_fed4d24b68977888 = function(arg0, arg1) {
@@ -630,8 +631,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
630
631
  return ret;
631
632
  };
632
633
 
633
- module.exports.__wbindgen_closure_wrapper24026 = function(arg0, arg1, arg2) {
634
- const ret = makeMutClosure(arg0, arg1, 1155, __wbg_adapter_50);
634
+ module.exports.__wbindgen_closure_wrapper24044 = function(arg0, arg1, arg2) {
635
+ const ret = makeMutClosure(arg0, arg1, 1151, __wbg_adapter_50);
635
636
  return ret;
636
637
  };
637
638
 
package/wasm_bg.wasm CHANGED
Binary file