@next/swc-wasm-nodejs 16.0.2-canary.5 → 16.0.2-canary.6

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.5",
3
+ "version": "16.0.2-canary.6",
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 parseSync(s: string, opts: any): any;
4
3
  export function minify(s: string, opts: any): Promise<any>;
5
4
  export function transformSync(s: any, opts: any): any;
6
- export function parse(s: string, opts: any): Promise<any>;
7
- export function minifySync(s: string, opts: any): any;
8
5
  export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
9
6
  export function transform(s: any, opts: any): Promise<any>;
10
- export function mdxCompileSync(value: string, opts: any): any;
7
+ export function parseSync(s: string, opts: any): any;
8
+ export function minifySync(s: string, opts: any): any;
9
+ export function parse(s: string, opts: any): Promise<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,25 +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
- function takeFromExternrefTable0(idx) {
221
- const value = wasm.__wbindgen_export_4.get(idx);
222
- wasm.__externref_table_dealloc(idx);
223
- return value;
224
- }
225
- /**
226
- * @param {string} s
227
- * @param {any} opts
228
- * @returns {any}
229
- */
230
- module.exports.parseSync = function(s, opts) {
231
- const ret = wasm.parseSync(s, opts);
232
- if (ret[2]) {
233
- throw takeFromExternrefTable0(ret[1]);
234
- }
235
- return takeFromExternrefTable0(ret[0]);
236
- };
237
-
238
219
  /**
239
220
  * @param {string} s
240
221
  * @param {any} opts
@@ -245,6 +226,11 @@ module.exports.minify = function(s, opts) {
245
226
  return ret;
246
227
  };
247
228
 
229
+ function takeFromExternrefTable0(idx) {
230
+ const value = wasm.__wbindgen_export_4.get(idx);
231
+ wasm.__externref_table_dealloc(idx);
232
+ return value;
233
+ }
248
234
  /**
249
235
  * @param {any} s
250
236
  * @param {any} opts
@@ -258,29 +244,6 @@ module.exports.transformSync = function(s, opts) {
258
244
  return takeFromExternrefTable0(ret[0]);
259
245
  };
260
246
 
261
- /**
262
- * @param {string} s
263
- * @param {any} opts
264
- * @returns {Promise<any>}
265
- */
266
- module.exports.parse = function(s, opts) {
267
- const ret = wasm.parse(s, opts);
268
- return ret;
269
- };
270
-
271
- /**
272
- * @param {string} s
273
- * @param {any} opts
274
- * @returns {any}
275
- */
276
- module.exports.minifySync = function(s, opts) {
277
- const ret = wasm.minifySync(s, opts);
278
- if (ret[2]) {
279
- throw takeFromExternrefTable0(ret[1]);
280
- }
281
- return takeFromExternrefTable0(ret[0]);
282
- };
283
-
284
247
  function passArray8ToWasm0(arg, malloc) {
285
248
  const ptr = malloc(arg.length * 1, 1) >>> 0;
286
249
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -323,18 +286,41 @@ module.exports.transform = function(s, opts) {
323
286
  };
324
287
 
325
288
  /**
326
- * @param {string} value
289
+ * @param {string} s
327
290
  * @param {any} opts
328
291
  * @returns {any}
329
292
  */
330
- module.exports.mdxCompileSync = function(value, opts) {
331
- const ret = wasm.mdxCompileSync(value, opts);
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
+ * @param {string} s
303
+ * @param {any} opts
304
+ * @returns {any}
305
+ */
306
+ module.exports.minifySync = function(s, opts) {
307
+ const ret = wasm.minifySync(s, opts);
332
308
  if (ret[2]) {
333
309
  throw takeFromExternrefTable0(ret[1]);
334
310
  }
335
311
  return takeFromExternrefTable0(ret[0]);
336
312
  };
337
313
 
314
+ /**
315
+ * @param {string} s
316
+ * @param {any} opts
317
+ * @returns {Promise<any>}
318
+ */
319
+ module.exports.parse = function(s, opts) {
320
+ const ret = wasm.parse(s, opts);
321
+ return ret;
322
+ };
323
+
338
324
  /**
339
325
  * @param {string} value
340
326
  * @param {any} opts
@@ -345,8 +331,21 @@ module.exports.mdxCompile = function(value, opts) {
345
331
  return ret;
346
332
  };
347
333
 
334
+ /**
335
+ * @param {string} value
336
+ * @param {any} opts
337
+ * @returns {any}
338
+ */
339
+ module.exports.mdxCompileSync = function(value, opts) {
340
+ const ret = wasm.mdxCompileSync(value, opts);
341
+ if (ret[2]) {
342
+ throw takeFromExternrefTable0(ret[1]);
343
+ }
344
+ return takeFromExternrefTable0(ret[0]);
345
+ };
346
+
348
347
  function __wbg_adapter_50(arg0, arg1, arg2) {
349
- wasm.closure1168_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_wrapper23912 = function(arg0, arg1, arg2) {
634
- const ret = makeMutClosure(arg0, arg1, 1169, __wbg_adapter_50);
632
+ module.exports.__wbindgen_closure_wrapper23874 = 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