@next/swc-wasm-nodejs 16.0.2-canary.8 → 16.0.2

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.8",
3
+ "version": "16.0.2",
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
- export function transformSync(s: any, opts: any): any;
5
3
  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
- export function parseSync(s: string, opts: any): any;
8
4
  export function minifySync(s: string, opts: any): any;
5
+ export function parseSync(s: string, opts: any): any;
6
+ export function minify(s: string, opts: any): Promise<any>;
7
+ export function transform(s: any, opts: any): Promise<any>;
9
8
  export function parse(s: string, opts: any): Promise<any>;
10
- export function mdxCompile(value: string, opts: any): Promise<any>;
9
+ export function transformSync(s: any, opts: any): any;
11
10
  export function mdxCompileSync(value: string, opts: any): any;
11
+ export function mdxCompile(value: string, opts: any): Promise<any>;
package/wasm.js CHANGED
@@ -216,33 +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
-
229
- function takeFromExternrefTable0(idx) {
230
- const value = wasm.__wbindgen_export_4.get(idx);
231
- wasm.__externref_table_dealloc(idx);
232
- return value;
233
- }
234
- /**
235
- * @param {any} s
236
- * @param {any} opts
237
- * @returns {any}
238
- */
239
- module.exports.transformSync = function(s, opts) {
240
- const ret = wasm.transformSync(s, opts);
241
- if (ret[2]) {
242
- throw takeFromExternrefTable0(ret[1]);
243
- }
244
- return takeFromExternrefTable0(ret[0]);
245
- };
246
219
 
247
220
  function passArray8ToWasm0(arg, malloc) {
248
221
  const ptr = malloc(arg.length * 1, 1) >>> 0;
@@ -250,6 +223,12 @@ function passArray8ToWasm0(arg, malloc) {
250
223
  WASM_VECTOR_LEN = arg.length;
251
224
  return ptr;
252
225
  }
226
+
227
+ function takeFromExternrefTable0(idx) {
228
+ const value = wasm.__wbindgen_export_4.get(idx);
229
+ wasm.__externref_table_dealloc(idx);
230
+ return value;
231
+ }
253
232
  /**
254
233
  * @param {Uint8Array} content
255
234
  * @param {string} template_path
@@ -276,13 +255,16 @@ module.exports.expandNextJsTemplate = function(content, template_path, next_pack
276
255
  };
277
256
 
278
257
  /**
279
- * @param {any} s
258
+ * @param {string} s
280
259
  * @param {any} opts
281
- * @returns {Promise<any>}
260
+ * @returns {any}
282
261
  */
283
- module.exports.transform = function(s, opts) {
284
- const ret = wasm.transform(s, opts);
285
- return ret;
262
+ module.exports.minifySync = function(s, opts) {
263
+ const ret = wasm.minifySync(s, opts);
264
+ if (ret[2]) {
265
+ throw takeFromExternrefTable0(ret[1]);
266
+ }
267
+ return takeFromExternrefTable0(ret[0]);
286
268
  };
287
269
 
288
270
  /**
@@ -301,14 +283,21 @@ module.exports.parseSync = function(s, opts) {
301
283
  /**
302
284
  * @param {string} s
303
285
  * @param {any} opts
304
- * @returns {any}
286
+ * @returns {Promise<any>}
305
287
  */
306
- module.exports.minifySync = function(s, opts) {
307
- const ret = wasm.minifySync(s, opts);
308
- if (ret[2]) {
309
- throw takeFromExternrefTable0(ret[1]);
310
- }
311
- return takeFromExternrefTable0(ret[0]);
288
+ module.exports.minify = function(s, opts) {
289
+ const ret = wasm.minify(s, opts);
290
+ return ret;
291
+ };
292
+
293
+ /**
294
+ * @param {any} s
295
+ * @param {any} opts
296
+ * @returns {Promise<any>}
297
+ */
298
+ module.exports.transform = function(s, opts) {
299
+ const ret = wasm.transform(s, opts);
300
+ return ret;
312
301
  };
313
302
 
314
303
  /**
@@ -322,13 +311,16 @@ module.exports.parse = function(s, opts) {
322
311
  };
323
312
 
324
313
  /**
325
- * @param {string} value
314
+ * @param {any} s
326
315
  * @param {any} opts
327
- * @returns {Promise<any>}
316
+ * @returns {any}
328
317
  */
329
- module.exports.mdxCompile = function(value, opts) {
330
- const ret = wasm.mdxCompile(value, opts);
331
- return ret;
318
+ module.exports.transformSync = function(s, opts) {
319
+ const ret = wasm.transformSync(s, opts);
320
+ if (ret[2]) {
321
+ throw takeFromExternrefTable0(ret[1]);
322
+ }
323
+ return takeFromExternrefTable0(ret[0]);
332
324
  };
333
325
 
334
326
  /**
@@ -344,8 +336,18 @@ module.exports.mdxCompileSync = function(value, opts) {
344
336
  return takeFromExternrefTable0(ret[0]);
345
337
  };
346
338
 
339
+ /**
340
+ * @param {string} value
341
+ * @param {any} opts
342
+ * @returns {Promise<any>}
343
+ */
344
+ module.exports.mdxCompile = function(value, opts) {
345
+ const ret = wasm.mdxCompile(value, opts);
346
+ return ret;
347
+ };
348
+
347
349
  function __wbg_adapter_50(arg0, arg1, arg2) {
348
- wasm.closure1162_externref_shim(arg0, arg1, arg2);
350
+ wasm.closure1166_externref_shim(arg0, arg1, arg2);
349
351
  }
350
352
 
351
353
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
@@ -629,8 +631,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
629
631
  return ret;
630
632
  };
631
633
 
632
- module.exports.__wbindgen_closure_wrapper23874 = function(arg0, arg1, arg2) {
633
- const ret = makeMutClosure(arg0, arg1, 1163, __wbg_adapter_50);
634
+ module.exports.__wbindgen_closure_wrapper23882 = function(arg0, arg1, arg2) {
635
+ const ret = makeMutClosure(arg0, arg1, 1167, __wbg_adapter_50);
634
636
  return ret;
635
637
  };
636
638
 
package/wasm_bg.wasm CHANGED
Binary file