@next/swc-wasm-nodejs 16.0.2-canary.9 → 16.0.3

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.2-canary.9",
3
+ "version": "16.0.3",
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 minify(s: string, opts: any): Promise<any>;
4
3
  export function transformSync(s: any, opts: any): any;
5
- export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
6
- export function transform(s: any, opts: any): Promise<any>;
7
4
  export function parseSync(s: string, opts: any): any;
8
- export function minifySync(s: string, opts: any): any;
5
+ export function minify(s: string, opts: any): Promise<any>;
6
+ export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
9
7
  export function parse(s: string, opts: any): Promise<any>;
8
+ export function minifySync(s: string, opts: any): any;
9
+ export function transform(s: any, opts: any): Promise<any>;
10
10
  export function mdxCompile(value: string, opts: any): Promise<any>;
11
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.minify = function(s, opts) {
225
- const ret = wasm.minify(s, opts);
226
- return ret;
227
- };
228
219
 
229
220
  function takeFromExternrefTable0(idx) {
230
221
  const value = wasm.__wbindgen_export_4.get(idx);
@@ -244,6 +235,29 @@ module.exports.transformSync = function(s, opts) {
244
235
  return takeFromExternrefTable0(ret[0]);
245
236
  };
246
237
 
238
+ /**
239
+ * @param {string} s
240
+ * @param {any} opts
241
+ * @returns {any}
242
+ */
243
+ module.exports.parseSync = function(s, opts) {
244
+ const ret = wasm.parseSync(s, opts);
245
+ if (ret[2]) {
246
+ throw takeFromExternrefTable0(ret[1]);
247
+ }
248
+ return takeFromExternrefTable0(ret[0]);
249
+ };
250
+
251
+ /**
252
+ * @param {string} s
253
+ * @param {any} opts
254
+ * @returns {Promise<any>}
255
+ */
256
+ module.exports.minify = function(s, opts) {
257
+ const ret = wasm.minify(s, opts);
258
+ return ret;
259
+ };
260
+
247
261
  function passArray8ToWasm0(arg, malloc) {
248
262
  const ptr = malloc(arg.length * 1, 1) >>> 0;
249
263
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -276,28 +290,15 @@ module.exports.expandNextJsTemplate = function(content, template_path, next_pack
276
290
  };
277
291
 
278
292
  /**
279
- * @param {any} s
293
+ * @param {string} s
280
294
  * @param {any} opts
281
295
  * @returns {Promise<any>}
282
296
  */
283
- module.exports.transform = function(s, opts) {
284
- const ret = wasm.transform(s, opts);
297
+ module.exports.parse = function(s, opts) {
298
+ const ret = wasm.parse(s, opts);
285
299
  return ret;
286
300
  };
287
301
 
288
- /**
289
- * @param {string} s
290
- * @param {any} opts
291
- * @returns {any}
292
- */
293
- module.exports.parseSync = function(s, opts) {
294
- const ret = wasm.parseSync(s, opts);
295
- if (ret[2]) {
296
- throw takeFromExternrefTable0(ret[1]);
297
- }
298
- return takeFromExternrefTable0(ret[0]);
299
- };
300
-
301
302
  /**
302
303
  * @param {string} s
303
304
  * @param {any} opts
@@ -312,12 +313,12 @@ module.exports.minifySync = function(s, opts) {
312
313
  };
313
314
 
314
315
  /**
315
- * @param {string} s
316
+ * @param {any} s
316
317
  * @param {any} opts
317
318
  * @returns {Promise<any>}
318
319
  */
319
- module.exports.parse = function(s, opts) {
320
- const ret = wasm.parse(s, opts);
320
+ module.exports.transform = function(s, opts) {
321
+ const ret = wasm.transform(s, opts);
321
322
  return ret;
322
323
  };
323
324
 
@@ -345,7 +346,7 @@ module.exports.mdxCompileSync = function(value, opts) {
345
346
  };
346
347
 
347
348
  function __wbg_adapter_50(arg0, arg1, arg2) {
348
- wasm.closure1162_externref_shim(arg0, arg1, arg2);
349
+ wasm.closure1163_externref_shim(arg0, arg1, arg2);
349
350
  }
350
351
 
351
352
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
@@ -629,8 +630,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
629
630
  return ret;
630
631
  };
631
632
 
632
- module.exports.__wbindgen_closure_wrapper23874 = function(arg0, arg1, arg2) {
633
- const ret = makeMutClosure(arg0, arg1, 1163, __wbg_adapter_50);
633
+ module.exports.__wbindgen_closure_wrapper23888 = function(arg0, arg1, arg2) {
634
+ const ret = makeMutClosure(arg0, arg1, 1164, __wbg_adapter_50);
634
635
  return ret;
635
636
  };
636
637
 
package/wasm_bg.wasm CHANGED
Binary file