@swc-next/core-binding-wasm 0.4.0 → 0.4.1

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": "@swc-next/core-binding-wasm",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "The extensible Node.js API for SWC Next",
5
5
  "type": "module",
6
6
  "main": "./swc-next-core.node.mjs",
@@ -25,12 +25,32 @@ export function parseSync(source, sourceUtf16Len, options) {
25
25
  return takeBytes(resultPointer);
26
26
  }
27
27
 
28
- export function printSync(buffer, options) {
28
+ export function printSync(header, spans, kinds, payloads, extra, strings, options) {
29
29
  const call = getFunction("__swc_print_sync");
30
- if (!(buffer instanceof Uint8Array)) throw new TypeError("buffer must be a Uint8Array");
30
+ if (!(header instanceof Uint8Array)) throw new TypeError("header must be a Uint8Array");
31
+ if (!(spans instanceof Uint8Array)) throw new TypeError("spans must be a Uint8Array");
32
+ if (!(kinds instanceof Uint8Array)) throw new TypeError("kinds must be a Uint8Array");
33
+ if (!(payloads instanceof Uint8Array)) throw new TypeError("payloads must be a Uint8Array");
34
+ if (!(extra instanceof Uint8Array)) throw new TypeError("extra must be a Uint8Array");
35
+ if (!(strings instanceof Uint8Array)) throw new TypeError("strings must be a Uint8Array");
31
36
  const resultPointer = (withEncodedBytes(
32
- buffer,
33
- (bufferPointer) => call(bufferPointer, encodeU32(options, "options")),
37
+ header,
38
+ (headerPointer) => withEncodedBytes(
39
+ spans,
40
+ (spansPointer) => withEncodedBytes(
41
+ kinds,
42
+ (kindsPointer) => withEncodedBytes(
43
+ payloads,
44
+ (payloadsPointer) => withEncodedBytes(
45
+ extra,
46
+ (extraPointer) => withEncodedBytes(
47
+ strings,
48
+ (stringsPointer) => call(headerPointer, spansPointer, kindsPointer, payloadsPointer, extraPointer, stringsPointer, encodeU32(options, "options")),
49
+ ),
50
+ ),
51
+ ),
52
+ ),
53
+ ),
34
54
  )) >>> 0;
35
55
  const payload = takeFallibleResult(resultPointer);
36
56
  return decodeString(payload);
@@ -3,7 +3,7 @@ import { initializeAsync } from "./swc-next-core.runtime.mjs";
3
3
 
4
4
  export * from "./swc-next-core.bridge.mjs";
5
5
 
6
- export const version = "0.4.0";
6
+ export const version = "0.4.1";
7
7
 
8
8
  export default function init() {
9
9
  return initializeAsync(() =>
@@ -7,7 +7,7 @@ initializeSync(wasm);
7
7
 
8
8
  export * from "./swc-next-core.bridge.mjs";
9
9
 
10
- export const version = "0.4.0";
10
+ export const version = "0.4.1";
11
11
 
12
12
  export default function init() {
13
13
  return Promise.resolve();
@@ -7,7 +7,7 @@ initializeSync(readFileSync(new URL("./swc-next-core.wasm", import.meta.url)));
7
7
 
8
8
  export * from "./swc-next-core.bridge.mjs";
9
9
 
10
- export const version = "0.4.0";
10
+ export const version = "0.4.1";
11
11
 
12
12
  export default function init() {
13
13
  return Promise.resolve();
Binary file