@next/swc-wasm-web 16.0.2 → 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,13 +1,12 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-web",
3
- "type": "module",
4
- "version": "16.0.2",
3
+ "version": "16.0.3",
5
4
  "files": [
6
5
  "wasm_bg.wasm",
7
6
  "wasm.js",
8
7
  "wasm.d.ts"
9
8
  ],
10
- "main": "wasm.js",
9
+ "module": "wasm.js",
11
10
  "types": "wasm.d.ts",
12
11
  "sideEffects": [
13
12
  "./snippets/*"
package/wasm.d.ts CHANGED
@@ -1,14 +1,14 @@
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 minifySync(s: string, opts: any): any;
3
+ export function transformSync(s: any, opts: any): any;
5
4
  export function parseSync(s: string, opts: any): any;
6
5
  export function minify(s: string, opts: any): Promise<any>;
7
- export function transform(s: any, 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;
8
7
  export function parse(s: string, opts: any): Promise<any>;
9
- export function transformSync(s: any, opts: any): any;
10
- export function mdxCompileSync(value: string, opts: any): any;
8
+ export function minifySync(s: string, opts: any): any;
9
+ export function transform(s: any, opts: any): Promise<any>;
11
10
  export function mdxCompile(value: string, opts: any): Promise<any>;
11
+ export function mdxCompileSync(value: string, opts: any): any;
12
12
 
13
13
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
14
14
 
@@ -31,7 +31,7 @@ export interface InitOutput {
31
31
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
32
32
  readonly __wbindgen_export_6: WebAssembly.Table;
33
33
  readonly __externref_table_dealloc: (a: number) => void;
34
- readonly closure1166_externref_shim: (a: number, b: number, c: any) => void;
34
+ readonly closure1163_externref_shim: (a: number, b: number, c: any) => void;
35
35
  readonly closure124_externref_shim: (a: number, b: number, c: any, d: any) => void;
36
36
  readonly __wbindgen_start: () => void;
37
37
  }
package/wasm.js CHANGED
@@ -213,18 +213,53 @@ function debugString(val) {
213
213
  return className;
214
214
  }
215
215
 
216
+ function takeFromExternrefTable0(idx) {
217
+ const value = wasm.__wbindgen_export_4.get(idx);
218
+ wasm.__externref_table_dealloc(idx);
219
+ return value;
220
+ }
221
+ /**
222
+ * @param {any} s
223
+ * @param {any} opts
224
+ * @returns {any}
225
+ */
226
+ export function transformSync(s, opts) {
227
+ const ret = wasm.transformSync(s, opts);
228
+ if (ret[2]) {
229
+ throw takeFromExternrefTable0(ret[1]);
230
+ }
231
+ return takeFromExternrefTable0(ret[0]);
232
+ }
233
+
234
+ /**
235
+ * @param {string} s
236
+ * @param {any} opts
237
+ * @returns {any}
238
+ */
239
+ export function parseSync(s, opts) {
240
+ const ret = wasm.parseSync(s, opts);
241
+ if (ret[2]) {
242
+ throw takeFromExternrefTable0(ret[1]);
243
+ }
244
+ return takeFromExternrefTable0(ret[0]);
245
+ }
246
+
247
+ /**
248
+ * @param {string} s
249
+ * @param {any} opts
250
+ * @returns {Promise<any>}
251
+ */
252
+ export function minify(s, opts) {
253
+ const ret = wasm.minify(s, opts);
254
+ return ret;
255
+ }
256
+
216
257
  function passArray8ToWasm0(arg, malloc) {
217
258
  const ptr = malloc(arg.length * 1, 1) >>> 0;
218
259
  getUint8ArrayMemory0().set(arg, ptr / 1);
219
260
  WASM_VECTOR_LEN = arg.length;
220
261
  return ptr;
221
262
  }
222
-
223
- function takeFromExternrefTable0(idx) {
224
- const value = wasm.__wbindgen_export_4.get(idx);
225
- wasm.__externref_table_dealloc(idx);
226
- return value;
227
- }
228
263
  /**
229
264
  * @param {Uint8Array} content
230
265
  * @param {string} template_path
@@ -253,14 +288,11 @@ export function expandNextJsTemplate(content, template_path, next_package_dir_pa
253
288
  /**
254
289
  * @param {string} s
255
290
  * @param {any} opts
256
- * @returns {any}
291
+ * @returns {Promise<any>}
257
292
  */
258
- export function minifySync(s, opts) {
259
- const ret = wasm.minifySync(s, opts);
260
- if (ret[2]) {
261
- throw takeFromExternrefTable0(ret[1]);
262
- }
263
- return takeFromExternrefTable0(ret[0]);
293
+ export function parse(s, opts) {
294
+ const ret = wasm.parse(s, opts);
295
+ return ret;
264
296
  }
265
297
 
266
298
  /**
@@ -268,24 +300,14 @@ export function minifySync(s, opts) {
268
300
  * @param {any} opts
269
301
  * @returns {any}
270
302
  */
271
- export function parseSync(s, opts) {
272
- const ret = wasm.parseSync(s, opts);
303
+ export function minifySync(s, opts) {
304
+ const ret = wasm.minifySync(s, opts);
273
305
  if (ret[2]) {
274
306
  throw takeFromExternrefTable0(ret[1]);
275
307
  }
276
308
  return takeFromExternrefTable0(ret[0]);
277
309
  }
278
310
 
279
- /**
280
- * @param {string} s
281
- * @param {any} opts
282
- * @returns {Promise<any>}
283
- */
284
- export function minify(s, opts) {
285
- const ret = wasm.minify(s, opts);
286
- return ret;
287
- }
288
-
289
311
  /**
290
312
  * @param {any} s
291
313
  * @param {any} opts
@@ -297,28 +319,15 @@ export function transform(s, opts) {
297
319
  }
298
320
 
299
321
  /**
300
- * @param {string} s
322
+ * @param {string} value
301
323
  * @param {any} opts
302
324
  * @returns {Promise<any>}
303
325
  */
304
- export function parse(s, opts) {
305
- const ret = wasm.parse(s, opts);
326
+ export function mdxCompile(value, opts) {
327
+ const ret = wasm.mdxCompile(value, opts);
306
328
  return ret;
307
329
  }
308
330
 
309
- /**
310
- * @param {any} s
311
- * @param {any} opts
312
- * @returns {any}
313
- */
314
- export function transformSync(s, opts) {
315
- const ret = wasm.transformSync(s, opts);
316
- if (ret[2]) {
317
- throw takeFromExternrefTable0(ret[1]);
318
- }
319
- return takeFromExternrefTable0(ret[0]);
320
- }
321
-
322
331
  /**
323
332
  * @param {string} value
324
333
  * @param {any} opts
@@ -332,18 +341,8 @@ export function mdxCompileSync(value, opts) {
332
341
  return takeFromExternrefTable0(ret[0]);
333
342
  }
334
343
 
335
- /**
336
- * @param {string} value
337
- * @param {any} opts
338
- * @returns {Promise<any>}
339
- */
340
- export function mdxCompile(value, opts) {
341
- const ret = wasm.mdxCompile(value, opts);
342
- return ret;
343
- }
344
-
345
344
  function __wbg_adapter_50(arg0, arg1, arg2) {
346
- wasm.closure1166_externref_shim(arg0, arg1, arg2);
345
+ wasm.closure1163_externref_shim(arg0, arg1, arg2);
347
346
  }
348
347
 
349
348
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
@@ -613,8 +612,8 @@ function __wbg_get_imports() {
613
612
  const ret = false;
614
613
  return ret;
615
614
  };
616
- imports.wbg.__wbindgen_closure_wrapper23882 = function(arg0, arg1, arg2) {
617
- const ret = makeMutClosure(arg0, arg1, 1167, __wbg_adapter_50);
615
+ imports.wbg.__wbindgen_closure_wrapper23888 = function(arg0, arg1, arg2) {
616
+ const ret = makeMutClosure(arg0, arg1, 1164, __wbg_adapter_50);
618
617
  return ret;
619
618
  };
620
619
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/wasm_bg.wasm CHANGED
Binary file