@next/swc-wasm-nodejs 16.0.3 → 16.1.0-canary.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.3",
3
+ "version": "16.1.0-canary.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 expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
4
+ export function transform(s: any, opts: any): Promise<any>;
3
5
  export function transformSync(s: any, opts: any): any;
4
6
  export function parseSync(s: string, opts: any): any;
5
7
  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;
7
- export function parse(s: string, opts: any): Promise<any>;
8
8
  export function minifySync(s: string, opts: any): any;
9
- export function transform(s: any, opts: any): Promise<any>;
10
- export function mdxCompile(value: string, opts: any): Promise<any>;
9
+ export function parse(s: string, opts: any): Promise<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
@@ -217,53 +217,18 @@ function debugString(val) {
217
217
  return className;
218
218
  }
219
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 {any} s
227
- * @param {any} opts
228
- * @returns {any}
229
- */
230
- module.exports.transformSync = function(s, opts) {
231
- const ret = wasm.transformSync(s, opts);
232
- if (ret[2]) {
233
- throw takeFromExternrefTable0(ret[1]);
234
- }
235
- return takeFromExternrefTable0(ret[0]);
236
- };
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
-
261
220
  function passArray8ToWasm0(arg, malloc) {
262
221
  const ptr = malloc(arg.length * 1, 1) >>> 0;
263
222
  getUint8ArrayMemory0().set(arg, ptr / 1);
264
223
  WASM_VECTOR_LEN = arg.length;
265
224
  return ptr;
266
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
+ }
267
232
  /**
268
233
  * @param {Uint8Array} content
269
234
  * @param {string} template_path
@@ -290,22 +255,35 @@ module.exports.expandNextJsTemplate = function(content, template_path, next_pack
290
255
  };
291
256
 
292
257
  /**
293
- * @param {string} s
258
+ * @param {any} s
294
259
  * @param {any} opts
295
260
  * @returns {Promise<any>}
296
261
  */
297
- module.exports.parse = function(s, opts) {
298
- const ret = wasm.parse(s, opts);
262
+ module.exports.transform = function(s, opts) {
263
+ const ret = wasm.transform(s, opts);
299
264
  return ret;
300
265
  };
301
266
 
267
+ /**
268
+ * @param {any} s
269
+ * @param {any} opts
270
+ * @returns {any}
271
+ */
272
+ module.exports.transformSync = function(s, opts) {
273
+ const ret = wasm.transformSync(s, opts);
274
+ if (ret[2]) {
275
+ throw takeFromExternrefTable0(ret[1]);
276
+ }
277
+ return takeFromExternrefTable0(ret[0]);
278
+ };
279
+
302
280
  /**
303
281
  * @param {string} s
304
282
  * @param {any} opts
305
283
  * @returns {any}
306
284
  */
307
- module.exports.minifySync = function(s, opts) {
308
- const ret = wasm.minifySync(s, opts);
285
+ module.exports.parseSync = function(s, opts) {
286
+ const ret = wasm.parseSync(s, opts);
309
287
  if (ret[2]) {
310
288
  throw takeFromExternrefTable0(ret[1]);
311
289
  }
@@ -313,22 +291,35 @@ module.exports.minifySync = function(s, opts) {
313
291
  };
314
292
 
315
293
  /**
316
- * @param {any} s
294
+ * @param {string} s
317
295
  * @param {any} opts
318
296
  * @returns {Promise<any>}
319
297
  */
320
- module.exports.transform = function(s, opts) {
321
- const ret = wasm.transform(s, opts);
298
+ module.exports.minify = function(s, opts) {
299
+ const ret = wasm.minify(s, opts);
322
300
  return ret;
323
301
  };
324
302
 
325
303
  /**
326
- * @param {string} value
304
+ * @param {string} s
305
+ * @param {any} opts
306
+ * @returns {any}
307
+ */
308
+ module.exports.minifySync = function(s, opts) {
309
+ const ret = wasm.minifySync(s, opts);
310
+ if (ret[2]) {
311
+ throw takeFromExternrefTable0(ret[1]);
312
+ }
313
+ return takeFromExternrefTable0(ret[0]);
314
+ };
315
+
316
+ /**
317
+ * @param {string} s
327
318
  * @param {any} opts
328
319
  * @returns {Promise<any>}
329
320
  */
330
- module.exports.mdxCompile = function(value, opts) {
331
- const ret = wasm.mdxCompile(value, opts);
321
+ module.exports.parse = function(s, opts) {
322
+ const ret = wasm.parse(s, opts);
332
323
  return ret;
333
324
  };
334
325
 
@@ -345,12 +336,22 @@ module.exports.mdxCompileSync = function(value, opts) {
345
336
  return takeFromExternrefTable0(ret[0]);
346
337
  };
347
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
+
348
349
  function __wbg_adapter_50(arg0, arg1, arg2) {
349
- wasm.closure1163_externref_shim(arg0, arg1, arg2);
350
+ wasm.closure1165_externref_shim(arg0, arg1, arg2);
350
351
  }
351
352
 
352
353
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
353
- wasm.closure124_externref_shim(arg0, arg1, arg2, arg3);
354
+ wasm.closure126_externref_shim(arg0, arg1, arg2, arg3);
354
355
  }
355
356
 
356
357
  module.exports.__wbg_String_fed4d24b68977888 = function(arg0, arg1) {
@@ -533,13 +534,13 @@ module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(fun
533
534
  return ret;
534
535
  }, arguments) };
535
536
 
536
- module.exports.__wbg_queueMicrotask_6c22d88054515cb4 = function(arg0) {
537
- const ret = arg0.queueMicrotask;
538
- return ret;
537
+ module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
538
+ queueMicrotask(arg0);
539
539
  };
540
540
 
541
- module.exports.__wbg_queueMicrotask_b81e3a75ab81ca62 = function(arg0) {
542
- queueMicrotask(arg0);
541
+ module.exports.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
542
+ const ret = arg0.queueMicrotask;
543
+ return ret;
543
544
  };
544
545
 
545
546
  module.exports.__wbg_resolve_4851785c9c5f573d = function(arg0) {
@@ -630,8 +631,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
630
631
  return ret;
631
632
  };
632
633
 
633
- module.exports.__wbindgen_closure_wrapper23888 = function(arg0, arg1, arg2) {
634
- const ret = makeMutClosure(arg0, arg1, 1164, __wbg_adapter_50);
634
+ module.exports.__wbindgen_closure_wrapper23640 = function(arg0, arg1, arg2) {
635
+ const ret = makeMutClosure(arg0, arg1, 1166, __wbg_adapter_50);
635
636
  return ret;
636
637
  };
637
638
 
package/wasm_bg.wasm CHANGED
Binary file