@swc/core 1.3.52 → 1.3.54
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/CHANGELOG.md +52 -0
- package/Visitor.d.ts +2 -1
- package/Visitor.js +7 -0
- package/package.json +11 -11
- package/types.d.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,58 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(bindings/node)** Support `TsSatisfiesExpression` (#7317) ([761ef83](https://github.com/swc-project/swc/commit/761ef8389dd000e465bd385ec925654a8cb2ae09))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(common)** Workaround the `Arc` and `rkyv` issue (#7321) ([577f81e](https://github.com/swc-project/swc/commit/577f81ec405f4f3a3e58e3f97c07d3720dd80912))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/codegen)** Fix codegen of `TsModuleDecl` (#7319) ([0ca05d8](https://github.com/swc-project/swc/commit/0ca05d8b69b6301e2346e5de6c45a77c863676e9))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/compat)** Transform curried function call with optional chaining (#7313) ([66b5b11](https://github.com/swc-project/swc/commit/66b5b110bf94259e0e0223224940bb8d0384e9b6))
|
|
18
|
+
|
|
19
|
+
### Testing
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es)** Update tsc test suite (#7323) ([603f22d](https://github.com/swc-project/swc/commit/603f22de76eaeac1a64ee5e5f2e1dd095f908604))
|
|
24
|
+
|
|
25
|
+
## [1.3.53] - 2023-04-21
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
- **(es)** Fix a crash related to source map (#7307) ([e7f7b01](https://github.com/swc-project/swc/commit/e7f7b01f59b622c993ee584ae825a39c390b2570))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- **(es/helpers)** Remove unnecessary parameters in `helper_expr!` macro (#7296) ([38dfb91](https://github.com/swc-project/swc/commit/38dfb91ebc04eecab97ec023c79b183958fda227))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
- **(es/modules)** Support `jsc.baseUrl` without `jsc.paths` (#7302) ([9c279b8](https://github.com/swc-project/swc/commit/9c279b802b6a615fdba33a6f81866ce3ef606676))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
- **(es/parser)** Fix handling of `in` and `out` of typescript (#7308) ([6f81cb9](https://github.com/swc-project/swc/commit/6f81cb9c32219cd8e51a97c924e0b272fc25a0c1))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
- **(testing)** Fix path normalization on windows for testing diffs (#7299) ([3422923](https://github.com/swc-project/swc/commit/3422923cb004111f8c57501bb8b222905cf6bd09))
|
|
44
|
+
|
|
45
|
+
### Miscellaneous Tasks
|
|
46
|
+
- **general**: Update issue template to prevent useless issues (#7303) ([9816ba2](https://github.com/swc-project/swc/commit/9816ba27958af07399383fc995c49dc1ed3e3554))
|
|
47
|
+
|
|
48
|
+
### Testing
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
- **(es/compat)** Add a test for a wrong issue (#7300) ([38495a9](https://github.com/swc-project/swc/commit/38495a9835c47ded30d07d6c961a094e22146222))
|
|
53
|
+
|
|
54
|
+
## [1.3.52] - 2023-04-19
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
8
60
|
- **(es/minifier)** Fix a inliner bug related to `Script` (#7288) ([0aab90c](https://github.com/swc-project/swc/commit/0aab90c005b29b9fced96a04b84a49fe2298560e))
|
|
9
61
|
|
|
10
62
|
|
package/Visitor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accessibility, ArrayExpression, ArrayPattern, ArrowFunctionExpression,
|
|
1
|
+
import { Accessibility, Argument, ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, BigIntLiteral, BinaryExpression, BindingIdentifier, BlockStatement, BooleanLiteral, BreakStatement, CallExpression, CatchClause, Class, ClassDeclaration, ClassExpression, ClassMember, ClassMethod, ClassProperty, ComputedPropName, ConditionalExpression, Constructor, ContinueStatement, DebuggerStatement, Declaration, Decorator, DefaultDecl, DoWhileStatement, EmptyStatement, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultExpression, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, ExprOrSpread, Expression, ExpressionStatement, Fn, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, GetterProperty, Identifier, IfStatement, Import, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, JSXAttrValue, JSXAttribute, JSXAttributeName, JSXAttributeOrSpread, JSXClosingElement, JSXClosingFragment, JSXElement, JSXElementChild, JSXElementName, JSXEmptyExpression, JSXExpressionContainer, JSXFragment, JSXMemberExpression, JSXNamespacedName, JSXObject, JSXOpeningElement, JSXOpeningFragment, JSXSpreadChild, JSXText, KeyValuePatternProperty, KeyValueProperty, LabeledStatement, MemberExpression, MetaProperty, MethodProperty, Module, ModuleDeclaration, ModuleExportName, ModuleItem, NamedExportSpecifier, NamedImportSpecifier, NewExpression, NullLiteral, NumericLiteral, ObjectExpression, ObjectPattern, ObjectPatternProperty, OptionalChainingCall, OptionalChainingExpression, Param, ParenthesisExpression, Pattern, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, SpreadElement, Statement, StaticBlock, StringLiteral, Super, SuperPropExpression, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, TsAsExpression, TsCallSignatureDeclaration, TsConstAssertion, TsConstructSignatureDeclaration, TsEntityName, TsEnumDeclaration, TsEnumMember, TsEnumMemberId, TsExportAssignment, TsExpressionWithTypeArguments, TsExternalModuleReference, TsFnParameter, TsGetterSignature, TsImportEqualsDeclaration, TsIndexSignature, TsInstantiation, TsInterfaceBody, TsInterfaceDeclaration, TsMethodSignature, TsModuleBlock, TsModuleDeclaration, TsModuleName, TsModuleReference, TsNamespaceBody, TsNamespaceDeclaration, TsNamespaceExportDeclaration, TsNonNullExpression, TsParameterProperty, TsParameterPropertyParameter, TsPropertySignature, TsQualifiedName, TsSatisfiesExpression, TsSetterSignature, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression } from "./types";
|
|
2
2
|
export declare class Visitor {
|
|
3
3
|
visitProgram(n: Program): Program;
|
|
4
4
|
visitModule(m: Module): Module;
|
|
@@ -127,6 +127,7 @@ export declare class Visitor {
|
|
|
127
127
|
visitTsInstantiation(n: TsInstantiation): TsInstantiation;
|
|
128
128
|
visitTsNonNullExpression(n: TsNonNullExpression): Expression;
|
|
129
129
|
visitTsAsExpression(n: TsAsExpression): Expression;
|
|
130
|
+
visitTsSatisfiesExpression(n: TsSatisfiesExpression): Expression;
|
|
130
131
|
visitThisExpression(n: ThisExpression): Expression;
|
|
131
132
|
visitTemplateLiteral(n: TemplateLiteral): Expression;
|
|
132
133
|
visitParameters(n: Param[]): Param[];
|
package/Visitor.js
CHANGED
|
@@ -813,6 +813,8 @@ class Visitor {
|
|
|
813
813
|
return this.visitThisExpression(n);
|
|
814
814
|
case "TsAsExpression":
|
|
815
815
|
return this.visitTsAsExpression(n);
|
|
816
|
+
case "TsSatisfiesExpression":
|
|
817
|
+
return this.visitTsSatisfiesExpression(n);
|
|
816
818
|
case "TsNonNullExpression":
|
|
817
819
|
return this.visitTsNonNullExpression(n);
|
|
818
820
|
case "TsTypeAssertion":
|
|
@@ -903,6 +905,11 @@ class Visitor {
|
|
|
903
905
|
n.typeAnnotation = this.visitTsType(n.typeAnnotation);
|
|
904
906
|
return n;
|
|
905
907
|
}
|
|
908
|
+
visitTsSatisfiesExpression(n) {
|
|
909
|
+
n.expression = this.visitExpression(n.expression);
|
|
910
|
+
n.typeAnnotation = this.visitTsType(n.typeAnnotation);
|
|
911
|
+
return n;
|
|
912
|
+
}
|
|
906
913
|
visitThisExpression(n) {
|
|
907
914
|
return n;
|
|
908
915
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.54",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -145,16 +145,16 @@
|
|
|
145
145
|
"url": "https://opencollective.com/swc"
|
|
146
146
|
},
|
|
147
147
|
"optionalDependencies": {
|
|
148
|
-
"@swc/core-win32-x64-msvc": "1.3.
|
|
149
|
-
"@swc/core-darwin-x64": "1.3.
|
|
150
|
-
"@swc/core-linux-x64-gnu": "1.3.
|
|
151
|
-
"@swc/core-linux-x64-musl": "1.3.
|
|
152
|
-
"@swc/core-win32-ia32-msvc": "1.3.
|
|
153
|
-
"@swc/core-linux-arm64-gnu": "1.3.
|
|
154
|
-
"@swc/core-linux-arm-gnueabihf": "1.3.
|
|
155
|
-
"@swc/core-darwin-arm64": "1.3.
|
|
156
|
-
"@swc/core-linux-arm64-musl": "1.3.
|
|
157
|
-
"@swc/core-win32-arm64-msvc": "1.3.
|
|
148
|
+
"@swc/core-win32-x64-msvc": "1.3.54",
|
|
149
|
+
"@swc/core-darwin-x64": "1.3.54",
|
|
150
|
+
"@swc/core-linux-x64-gnu": "1.3.54",
|
|
151
|
+
"@swc/core-linux-x64-musl": "1.3.54",
|
|
152
|
+
"@swc/core-win32-ia32-msvc": "1.3.54",
|
|
153
|
+
"@swc/core-linux-arm64-gnu": "1.3.54",
|
|
154
|
+
"@swc/core-linux-arm-gnueabihf": "1.3.54",
|
|
155
|
+
"@swc/core-darwin-arm64": "1.3.54",
|
|
156
|
+
"@swc/core-linux-arm64-musl": "1.3.54",
|
|
157
|
+
"@swc/core-win32-arm64-msvc": "1.3.54"
|
|
158
158
|
},
|
|
159
159
|
"files": [
|
|
160
160
|
"CHANGELOG.md",
|
package/types.d.ts
CHANGED
|
@@ -974,7 +974,7 @@ export interface VariableDeclarator extends Node, HasSpan {
|
|
|
974
974
|
init?: Expression;
|
|
975
975
|
definite: boolean;
|
|
976
976
|
}
|
|
977
|
-
export type Expression = ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | UnaryExpression | UpdateExpression | BinaryExpression | AssignmentExpression | MemberExpression | SuperPropExpression | ConditionalExpression | CallExpression | NewExpression | SequenceExpression | Identifier | Literal | TemplateLiteral | TaggedTemplateExpression | ArrowFunctionExpression | ClassExpression | YieldExpression | MetaProperty | AwaitExpression | ParenthesisExpression | JSXMemberExpression | JSXNamespacedName | JSXEmptyExpression | JSXElement | JSXFragment | TsTypeAssertion | TsConstAssertion | TsNonNullExpression | TsAsExpression | TsInstantiation | PrivateName | OptionalChainingExpression | Invalid;
|
|
977
|
+
export type Expression = ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | UnaryExpression | UpdateExpression | BinaryExpression | AssignmentExpression | MemberExpression | SuperPropExpression | ConditionalExpression | CallExpression | NewExpression | SequenceExpression | Identifier | Literal | TemplateLiteral | TaggedTemplateExpression | ArrowFunctionExpression | ClassExpression | YieldExpression | MetaProperty | AwaitExpression | ParenthesisExpression | JSXMemberExpression | JSXNamespacedName | JSXEmptyExpression | JSXElement | JSXFragment | TsTypeAssertion | TsConstAssertion | TsNonNullExpression | TsAsExpression | TsSatisfiesExpression | TsInstantiation | PrivateName | OptionalChainingExpression | Invalid;
|
|
978
978
|
interface ExpressionBase extends Node, HasSpan {
|
|
979
979
|
}
|
|
980
980
|
export interface Identifier extends ExpressionBase {
|
|
@@ -1846,6 +1846,11 @@ export interface TsAsExpression extends ExpressionBase {
|
|
|
1846
1846
|
expression: Expression;
|
|
1847
1847
|
typeAnnotation: TsType;
|
|
1848
1848
|
}
|
|
1849
|
+
export interface TsSatisfiesExpression extends ExpressionBase {
|
|
1850
|
+
type: "TsSatisfiesExpression";
|
|
1851
|
+
expression: Expression;
|
|
1852
|
+
typeAnnotation: TsType;
|
|
1853
|
+
}
|
|
1849
1854
|
export interface TsInstantiation extends Node, HasSpan {
|
|
1850
1855
|
type: "TsInstantiation";
|
|
1851
1856
|
expression: Expression;
|