@swc/core 1.2.102 → 1.2.106

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/Visitor.d.ts CHANGED
@@ -11,9 +11,9 @@ export declare class Visitor {
11
11
  visitTsImportEqualsDeclaration(n: TsImportEqualsDeclaration): ModuleDeclaration;
12
12
  visitTsModuleReference(n: TsModuleReference): TsModuleReference;
13
13
  visitTsExternalModuleReference(n: TsExternalModuleReference): TsExternalModuleReference;
14
- visitExportAllDeclration(n: ExportAllDeclaration): ModuleDeclaration;
14
+ visitExportAllDeclaration(n: ExportAllDeclaration): ModuleDeclaration;
15
15
  visitExportDefaultExpression(n: ExportDefaultExpression): ModuleDeclaration;
16
- visitExportNamedDeclration(n: ExportNamedDeclaration): ModuleDeclaration;
16
+ visitExportNamedDeclaration(n: ExportNamedDeclaration): ModuleDeclaration;
17
17
  visitExportSpecifiers(nodes: ExportSpecifier[]): ExportSpecifier[];
18
18
  visitExportSpecifier(n: ExportSpecifier): ExportSpecifier;
19
19
  visitNamedExportSpecifier(n: NamedExportSpecifier): ExportSpecifier;
@@ -73,7 +73,7 @@ export declare class Visitor {
73
73
  visitTsEnumMember(n: TsEnumMember): TsEnumMember;
74
74
  visitTsEnumMemberId(n: TsEnumMemberId): TsEnumMemberId;
75
75
  visitFunctionDeclaration(decl: FunctionDeclaration): Declaration;
76
- visitClassDeclartion(decl: ClassDeclaration): Declaration;
76
+ visitClassDeclaration(decl: ClassDeclaration): Declaration;
77
77
  visitClassBody(members: ClassMember[]): ClassMember[];
78
78
  visitClassMember(member: ClassMember): ClassMember;
79
79
  visitTsIndexSignature(n: TsIndexSignature): ClassMember;
package/Visitor.js CHANGED
@@ -44,13 +44,13 @@ class Visitor {
44
44
  case "ExportDefaultDeclaration":
45
45
  return this.visitExportDefaultDeclaration(n);
46
46
  case "ExportNamedDeclaration":
47
- return this.visitExportNamedDeclration(n);
47
+ return this.visitExportNamedDeclaration(n);
48
48
  case "ExportDefaultExpression":
49
49
  return this.visitExportDefaultExpression(n);
50
50
  case "ImportDeclaration":
51
51
  return this.visitImportDeclaration(n);
52
52
  case "ExportAllDeclaration":
53
- return this.visitExportAllDeclration(n);
53
+ return this.visitExportAllDeclaration(n);
54
54
  case "TsImportEqualsDeclaration":
55
55
  return this.visitTsImportEqualsDeclaration(n);
56
56
  case "TsExportAssignment":
@@ -86,7 +86,7 @@ class Visitor {
86
86
  n.expression = this.visitExpression(n.expression);
87
87
  return n;
88
88
  }
89
- visitExportAllDeclration(n) {
89
+ visitExportAllDeclaration(n) {
90
90
  n.source = this.visitStringLiteral(n.source);
91
91
  return n;
92
92
  }
@@ -94,7 +94,7 @@ class Visitor {
94
94
  n.expression = this.visitExpression(n.expression);
95
95
  return n;
96
96
  }
97
- visitExportNamedDeclration(n) {
97
+ visitExportNamedDeclaration(n) {
98
98
  n.specifiers = this.visitExportSpecifiers(n.specifiers);
99
99
  n.source = this.visitOptionalStringLiteral(n.source);
100
100
  return n;
@@ -381,7 +381,7 @@ class Visitor {
381
381
  visitDeclaration(decl) {
382
382
  switch (decl.type) {
383
383
  case "ClassDeclaration":
384
- return this.visitClassDeclartion(decl);
384
+ return this.visitClassDeclaration(decl);
385
385
  case "FunctionDeclaration":
386
386
  return this.visitFunctionDeclaration(decl);
387
387
  case "TsEnumDeclaration":
@@ -496,7 +496,7 @@ class Visitor {
496
496
  decl = this.visitFunction(decl);
497
497
  return decl;
498
498
  }
499
- visitClassDeclartion(decl) {
499
+ visitClassDeclaration(decl) {
500
500
  decl = this.visitClass(decl);
501
501
  decl.identifier = this.visitIdentifier(decl.identifier);
502
502
  return decl;
package/cspell.json CHANGED
@@ -7,6 +7,7 @@
7
7
  "ahash",
8
8
  "anonymized",
9
9
  "ANONYMIZED",
10
+ "ansi",
10
11
  "Ansi",
11
12
  "armv",
12
13
  "arrayvec",
@@ -25,6 +26,7 @@
25
26
  "cname",
26
27
  "combinator",
27
28
  "Combinator",
29
+ "cond",
28
30
  "Cond",
29
31
  "constness",
30
32
  "corejs",
package/index.js CHANGED
@@ -34,7 +34,7 @@ exports.DEFAULT_EXTENSIONS = exports.minifySync = exports.minify = exports.bundl
34
34
  __exportStar(require("./types"), exports);
35
35
  const spack_1 = require("./spack");
36
36
  const helper_1 = require("@node-rs/helper");
37
- const bindings = (0, helper_1.loadBinding)(__dirname, "swc", "@swc/core");
37
+ const bindings = helper_1.loadBinding(__dirname, "swc", "@swc/core");
38
38
  /**
39
39
  * Version of the swc binding.
40
40
  */
@@ -166,7 +166,7 @@ class Compiler {
166
166
  }
167
167
  bundle(options) {
168
168
  return __awaiter(this, void 0, void 0, function* () {
169
- const opts = yield (0, spack_1.compileBundleOptions)(options);
169
+ const opts = yield spack_1.compileBundleOptions(options);
170
170
  if (Array.isArray(opts)) {
171
171
  const all = yield Promise.all(opts.map((opt) => __awaiter(this, void 0, void 0, function* () {
172
172
  return this.bundle(opt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.102",
3
+ "version": "1.2.106",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -31,6 +31,7 @@
31
31
  "defaults": true,
32
32
  "additional": [
33
33
  "x86_64-unknown-linux-musl",
34
+ "x86_64-unknown-freebsd",
34
35
  "i686-pc-windows-msvc",
35
36
  "aarch64-unknown-linux-gnu",
36
37
  "armv7-unknown-linux-gnueabihf",
@@ -48,6 +49,20 @@
48
49
  "dependencies": {
49
50
  "@node-rs/helper": "^1.0.0"
50
51
  },
52
+ "optionalDependencies": {
53
+ "@swc/core-win32-x64-msvc": "^1.2.106",
54
+ "@swc/core-darwin-x64": "^1.2.106",
55
+ "@swc/core-linux-x64-gnu": "^1.2.106",
56
+ "@swc/core-linux-x64-musl": "^1.2.106",
57
+ "@swc/core-freebsd-x64": "^1.2.106",
58
+ "@swc/core-win32-ia32-msvc": "^1.2.106",
59
+ "@swc/core-linux-arm64-gnu": "^1.2.106",
60
+ "@swc/core-linux-arm-gnueabihf": "^1.2.106",
61
+ "@swc/core-darwin-arm64": "^1.2.106",
62
+ "@swc/core-android-arm64": "^1.2.106",
63
+ "@swc/core-linux-arm64-musl": "^1.2.106",
64
+ "@swc/core-win32-arm64-msvc": "^1.2.106"
65
+ },
51
66
  "types": "./index.d.ts",
52
67
  "scripts": {
53
68
  "prepare": "husky install",
@@ -55,6 +70,7 @@
55
70
  "prepublishOnly": "tsc -d && napi prepublish -p scripts/npm --tagstyle npm",
56
71
  "build": "tsc -d && napi build --platform --release --cargo-name node --cargo-flags=\"-p node\"",
57
72
  "build:dev": "tsc -d && napi build --platform --cargo-name node --cargo-flags=\"-p node\"",
73
+ "build:ts": "tsc -d",
58
74
  "test": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest node-swc/__tests__",
59
75
  "version": "napi version -p scripts/npm"
60
76
  },
@@ -93,18 +109,5 @@
93
109
  "funding": {
94
110
  "type": "opencollective",
95
111
  "url": "https://opencollective.com/swc"
96
- },
97
- "optionalDependencies": {
98
- "@swc/core-win32-x64-msvc": "1.2.102",
99
- "@swc/core-darwin-x64": "1.2.102",
100
- "@swc/core-linux-x64-gnu": "1.2.102",
101
- "@swc/core-linux-x64-musl": "1.2.102",
102
- "@swc/core-win32-ia32-msvc": "1.2.102",
103
- "@swc/core-linux-arm64-gnu": "1.2.102",
104
- "@swc/core-linux-arm-gnueabihf": "1.2.102",
105
- "@swc/core-darwin-arm64": "1.2.102",
106
- "@swc/core-android-arm64": "1.2.102",
107
- "@swc/core-linux-arm64-musl": "1.2.102",
108
- "@swc/core-win32-arm64-msvc": "1.2.102"
109
112
  }
110
113
  }
package/types.d.ts CHANGED
@@ -333,7 +333,7 @@ export interface JscConfig {
333
333
  };
334
334
  minify?: JsMinifyOptions;
335
335
  }
336
- export declare type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021";
336
+ export declare type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022";
337
337
  export declare type ParserConfig = TsParserConfig | EsParserConfig;
338
338
  export interface TsParserConfig {
339
339
  syntax: "typescript";