@swc/core 1.5.22 → 1.5.24

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/binding.d.ts ADDED
@@ -0,0 +1,92 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+
4
+ export class Compiler {
5
+ constructor();
6
+ }
7
+ export type JsCompiler = Compiler;
8
+
9
+ export function bundle(
10
+ confItems: Buffer,
11
+ signal?: AbortSignal | undefined | null
12
+ ): Promise<{ [index: string]: { code: string; map?: string } }>;
13
+
14
+ export function getTargetTriple(): string;
15
+
16
+ export function initCustomTraceSubscriber(
17
+ traceOutFilePath?: string | undefined | null
18
+ ): void;
19
+
20
+ export function minify(
21
+ code: Buffer,
22
+ opts: Buffer,
23
+ signal?: AbortSignal | undefined | null
24
+ ): Promise<TransformOutput>;
25
+
26
+ export function minifySync(code: Buffer, opts: Buffer): TransformOutput;
27
+
28
+ export function parse(
29
+ src: string,
30
+ options: Buffer,
31
+ filename?: string | undefined | null,
32
+ signal?: AbortSignal | undefined | null
33
+ ): Promise<string>;
34
+
35
+ export function parseFile(
36
+ path: string,
37
+ options: Buffer,
38
+ signal?: AbortSignal | undefined | null
39
+ ): Promise<string>;
40
+
41
+ export function parseFileSync(path: string, opts: Buffer): string;
42
+
43
+ export function parseSync(
44
+ src: string,
45
+ opts: Buffer,
46
+ filename?: string | undefined | null
47
+ ): string;
48
+
49
+ export function print(
50
+ programJson: string,
51
+ options: Buffer,
52
+ signal?: AbortSignal | undefined | null
53
+ ): Promise<TransformOutput>;
54
+
55
+ export function printSync(program: string, options: Buffer): TransformOutput;
56
+
57
+ export function transform(
58
+ src: string,
59
+ isModule: boolean,
60
+ options: Buffer,
61
+ signal?: AbortSignal | undefined | null
62
+ ): Promise<TransformOutput>;
63
+
64
+ export function transformFile(
65
+ src: string,
66
+ isModule: boolean,
67
+ options: Buffer,
68
+ signal?: AbortSignal | undefined | null
69
+ ): Promise<TransformOutput>;
70
+
71
+ export function transformFileSync(
72
+ s: string,
73
+ isModule: boolean,
74
+ opts: Buffer
75
+ ): TransformOutput;
76
+
77
+ export interface TransformOutput {
78
+ code: string;
79
+ map?: string;
80
+ }
81
+
82
+ /** Hack for `Type Generation` */
83
+ export interface TransformOutput {
84
+ code: string;
85
+ map?: string;
86
+ }
87
+
88
+ export function transformSync(
89
+ s: string,
90
+ isModule: boolean,
91
+ opts: Buffer
92
+ ): TransformOutput;
@@ -57,7 +57,7 @@ const bindings = (() => {
57
57
  try {
58
58
  binding = !!bindingsOverride
59
59
  ? require((0, path_1.resolve)(bindingsOverride))
60
- : require("../binding.js");
60
+ : require("./binding.js");
61
61
  // If native binding loaded successfully, it should return proper target triple constant.
62
62
  const triple = binding.getTargetTriple();
63
63
  assert.ok(triple, "Failed to read target triple from native binary.");
@@ -74,7 +74,7 @@ const bindings = (() => {
74
74
  /**
75
75
  * Version of the swc binding.
76
76
  */
77
- exports.version = require("../package.json").version;
77
+ exports.version = require("./package.json").version;
78
78
  /**
79
79
  * @deprecated JavaScript API is deprecated. Please use Wasm plugin instead.
80
80
  */
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.5.22",
3
+ "version": "1.5.24",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
- "main": "./src/index.js",
6
+ "main": "./index.js",
7
7
  "author": "강동윤 <kdy1997.dev@gmail.com>",
8
8
  "license": "Apache-2.0",
9
9
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  "registry": "https://registry.npmjs.org/",
45
45
  "access": "public"
46
46
  },
47
- "types": "./src/index.d.ts",
47
+ "types": "./index.d.ts",
48
48
  "scripts": {
49
49
  "postinstall": "node postinstall.js",
50
50
  "artifacts": "napi artifacts --npm-dir scripts/npm",
@@ -71,21 +71,21 @@
71
71
  },
72
72
  "files": [
73
73
  "CHANGELOG.md",
74
- "src/Visitor.d.ts",
75
- "src/index.d.ts",
76
- "src/spack.js",
77
- "src/util.d.ts",
74
+ "Visitor.d.ts",
75
+ "index.d.ts",
76
+ "spack.js",
77
+ "util.d.ts",
78
78
  "LICENSE",
79
- "src/Visitor.js",
80
- "src/binding.d.ts",
81
- "src/index.js",
82
- "src/types.d.ts",
83
- "src/util.js",
79
+ "Visitor.js",
80
+ "binding.d.ts",
81
+ "index.js",
82
+ "types.d.ts",
83
+ "util.js",
84
84
  "README.md",
85
85
  "binding.js",
86
86
  "package.json",
87
- "src/spack.d.ts",
88
- "src/types.js",
87
+ "spack.d.ts",
88
+ "types.js",
89
89
  "postinstall.js",
90
90
  "bindings/binding_core_wasm/pkg/binding_core_wasm.d.ts"
91
91
  ],
@@ -100,15 +100,15 @@
100
100
  "typescript": "^5.3.3"
101
101
  },
102
102
  "optionalDependencies": {
103
- "@swc/core-darwin-x64": "1.5.22",
104
- "@swc/core-win32-x64-msvc": "1.5.22",
105
- "@swc/core-linux-x64-gnu": "1.5.22",
106
- "@swc/core-linux-x64-musl": "1.5.22",
107
- "@swc/core-win32-ia32-msvc": "1.5.22",
108
- "@swc/core-linux-arm-gnueabihf": "1.5.22",
109
- "@swc/core-linux-arm64-gnu": "1.5.22",
110
- "@swc/core-darwin-arm64": "1.5.22",
111
- "@swc/core-linux-arm64-musl": "1.5.22",
112
- "@swc/core-win32-arm64-msvc": "1.5.22"
103
+ "@swc/core-darwin-x64": "1.5.24",
104
+ "@swc/core-win32-x64-msvc": "1.5.24",
105
+ "@swc/core-linux-x64-gnu": "1.5.24",
106
+ "@swc/core-linux-x64-musl": "1.5.24",
107
+ "@swc/core-win32-ia32-msvc": "1.5.24",
108
+ "@swc/core-linux-arm-gnueabihf": "1.5.24",
109
+ "@swc/core-linux-arm64-gnu": "1.5.24",
110
+ "@swc/core-darwin-arm64": "1.5.24",
111
+ "@swc/core-linux-arm64-musl": "1.5.24",
112
+ "@swc/core-win32-arm64-msvc": "1.5.24"
113
113
  }
114
114
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes