@next/swc-wasm-nodejs 16.1.1-canary.17 → 16.1.1-canary.19

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.17",
3
+ "version": "16.1.1-canary.19",
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 mdxCompile(value: string, opts: any): Promise<any>;
4
3
  export function mdxCompileSync(value: string, opts: any): any;
5
- export function transform(s: any, opts: any): Promise<any>;
6
- export function parse(s: string, opts: any): Promise<any>;
7
- export function transformSync(s: any, opts: any): any;
8
- export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
4
+ export function mdxCompile(value: string, opts: any): Promise<any>;
9
5
  export function minifySync(s: string, opts: any): any;
10
6
  export function minify(s: string, opts: any): Promise<any>;
7
+ export function transformSync(s: any, opts: any): any;
8
+ export function transform(s: any, opts: any): Promise<any>;
11
9
  export function parseSync(s: string, opts: any): any;
10
+ export function parse(s: string, opts: any): Promise<any>;
11
+ export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
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} 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
- };
228
219
 
229
220
  function takeFromExternrefTable0(idx) {
230
221
  const value = wasm.__wbindgen_export_4.get(idx);
@@ -245,22 +236,35 @@ module.exports.mdxCompileSync = function(value, opts) {
245
236
  };
246
237
 
247
238
  /**
248
- * @param {any} s
239
+ * @param {string} value
249
240
  * @param {any} opts
250
241
  * @returns {Promise<any>}
251
242
  */
252
- module.exports.transform = function(s, opts) {
253
- const ret = wasm.transform(s, opts);
243
+ module.exports.mdxCompile = function(value, opts) {
244
+ const ret = wasm.mdxCompile(value, opts);
254
245
  return ret;
255
246
  };
256
247
 
248
+ /**
249
+ * @param {string} s
250
+ * @param {any} opts
251
+ * @returns {any}
252
+ */
253
+ module.exports.minifySync = function(s, opts) {
254
+ const ret = wasm.minifySync(s, opts);
255
+ if (ret[2]) {
256
+ throw takeFromExternrefTable0(ret[1]);
257
+ }
258
+ return takeFromExternrefTable0(ret[0]);
259
+ };
260
+
257
261
  /**
258
262
  * @param {string} s
259
263
  * @param {any} opts
260
264
  * @returns {Promise<any>}
261
265
  */
262
- module.exports.parse = function(s, opts) {
263
- const ret = wasm.parse(s, opts);
266
+ module.exports.minify = function(s, opts) {
267
+ const ret = wasm.minify(s, opts);
264
268
  return ret;
265
269
  };
266
270
 
@@ -277,6 +281,39 @@ module.exports.transformSync = function(s, opts) {
277
281
  return takeFromExternrefTable0(ret[0]);
278
282
  };
279
283
 
284
+ /**
285
+ * @param {any} s
286
+ * @param {any} opts
287
+ * @returns {Promise<any>}
288
+ */
289
+ module.exports.transform = function(s, opts) {
290
+ const ret = wasm.transform(s, opts);
291
+ return ret;
292
+ };
293
+
294
+ /**
295
+ * @param {string} s
296
+ * @param {any} opts
297
+ * @returns {any}
298
+ */
299
+ module.exports.parseSync = function(s, opts) {
300
+ const ret = wasm.parseSync(s, opts);
301
+ if (ret[2]) {
302
+ throw takeFromExternrefTable0(ret[1]);
303
+ }
304
+ return takeFromExternrefTable0(ret[0]);
305
+ };
306
+
307
+ /**
308
+ * @param {string} s
309
+ * @param {any} opts
310
+ * @returns {Promise<any>}
311
+ */
312
+ module.exports.parse = function(s, opts) {
313
+ const ret = wasm.parse(s, opts);
314
+ return ret;
315
+ };
316
+
280
317
  function passArray8ToWasm0(arg, malloc) {
281
318
  const ptr = malloc(arg.length * 1, 1) >>> 0;
282
319
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -308,48 +345,12 @@ module.exports.expandNextJsTemplate = function(content, template_path, next_pack
308
345
  return v4;
309
346
  };
310
347
 
311
- /**
312
- * @param {string} s
313
- * @param {any} opts
314
- * @returns {any}
315
- */
316
- module.exports.minifySync = function(s, opts) {
317
- const ret = wasm.minifySync(s, opts);
318
- if (ret[2]) {
319
- throw takeFromExternrefTable0(ret[1]);
320
- }
321
- return takeFromExternrefTable0(ret[0]);
322
- };
323
-
324
- /**
325
- * @param {string} s
326
- * @param {any} opts
327
- * @returns {Promise<any>}
328
- */
329
- module.exports.minify = function(s, opts) {
330
- const ret = wasm.minify(s, opts);
331
- return ret;
332
- };
333
-
334
- /**
335
- * @param {string} s
336
- * @param {any} opts
337
- * @returns {any}
338
- */
339
- module.exports.parseSync = function(s, opts) {
340
- const ret = wasm.parseSync(s, opts);
341
- if (ret[2]) {
342
- throw takeFromExternrefTable0(ret[1]);
343
- }
344
- return takeFromExternrefTable0(ret[0]);
345
- };
346
-
347
348
  function __wbg_adapter_50(arg0, arg1, arg2) {
348
- wasm.closure1308_externref_shim(arg0, arg1, arg2);
349
+ wasm.closure1211_externref_shim(arg0, arg1, arg2);
349
350
  }
350
351
 
351
- function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
352
- wasm.closure126_externref_shim(arg0, arg1, arg2, arg3);
352
+ function __wbg_adapter_89(arg0, arg1, arg2, arg3) {
353
+ wasm.closure124_externref_shim(arg0, arg1, arg2, arg3);
353
354
  }
354
355
 
355
356
  module.exports.__wbg_String_fed4d24b68977888 = function(arg0, arg1) {
@@ -479,7 +480,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
479
480
  const a = state0.a;
480
481
  state0.a = 0;
481
482
  try {
482
- return __wbg_adapter_79(a, state0.b, arg0, arg1);
483
+ return __wbg_adapter_89(a, state0.b, arg0, arg1);
483
484
  } finally {
484
485
  state0.a = a;
485
486
  }
@@ -629,8 +630,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
629
630
  return ret;
630
631
  };
631
632
 
632
- module.exports.__wbindgen_closure_wrapper25035 = function(arg0, arg1, arg2) {
633
- const ret = makeMutClosure(arg0, arg1, 1309, __wbg_adapter_50);
633
+ module.exports.__wbindgen_closure_wrapper25315 = function(arg0, arg1, arg2) {
634
+ const ret = makeMutClosure(arg0, arg1, 1212, __wbg_adapter_50);
634
635
  return ret;
635
636
  };
636
637
 
package/wasm_bg.wasm CHANGED
Binary file