@swc/core 1.3.37 → 1.3.38
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 +59 -0
- package/README.md +2 -11
- package/Visitor.d.ts +2 -2
- package/Visitor.js +3 -0
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,65 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(bindings/node)** Fix `visitBindingIdentifier` (#7000) ([30cff01](https://github.com/swc-project/swc/commit/30cff016563d8925ef2b150a669ac4b6de968b82))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(es)** Allow any kind of input source maps if it's enabled (#7002) ([da5367b](https://github.com/swc-project/swc/commit/da5367b3fbac2cf4ab7d7f4562d58be3cff0edf8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/minifier)** Don't skip expressions with side effects from seq inliner (#7007) ([cfeb088](https://github.com/swc-project/swc/commit/cfeb088c37bdc2a5df79f10d2b93ce84cb12542b))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/minifier)** Don't create invalid property names (#7010) ([bb2486c](https://github.com/swc-project/swc/commit/bb2486c4592214c19ee6a1aa747dda5e58a1b07d))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
- **(es/parser)** Fix parsing of an array spread in tsx properties (#7011) ([6d6731f](https://github.com/swc-project/swc/commit/6d6731f355ed3bc314be31061b971f9317bea713))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(es/preset-env)** Move `findLast` and `findLastIndex` to finished proposals (#7012) ([b46a724](https://github.com/swc-project/swc/commit/b46a7248c6ed220276f919748a5ebf84c622858a))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
- **(es/typescript)** Treat export default declarations as declarations (#7017) ([34f9ad3](https://github.com/swc-project/swc/commit/34f9ad3778527a40e6ede50e2e3e2f34f405ff11))
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
- **(es/minifier)** Optimize calls to `Boolean`/`Number`/`String`/`Symbol` (#7006) ([06cbb90](https://github.com/swc-project/swc/commit/06cbb9002da2bdc04440b6ace28432839f42ccdf))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
- **(es/parser)** Support auto accessors (#6981) ([37533a2](https://github.com/swc-project/swc/commit/37533a23fde30fe054bf321e7ca7a10a346c2f79))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- **(es/parser)** Add an option to disallow ambiguous jsx (#6913) ([a6471f3](https://github.com/swc-project/swc/commit/a6471f34c0786bd0e80b3b4c5356929ebb0a8483))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- **(es/transforms)** Add an option to drop unused imports (#6962) ([67d0a89](https://github.com/swc-project/swc/commit/67d0a89ae65d0efb07a43040b962735b5cc25ea8))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- **(es/transforms)** Support namespace imports from `const_modules` (#7013) ([3cb03d5](https://github.com/swc-project/swc/commit/3cb03d5299d3c6be56f8b7f8c42ba86122640424))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
- **(es/typescript)** Support `export type * from "mod"` (#6867) ([beb38d3](https://github.com/swc-project/swc/commit/beb38d34a26016051eb0ed364ea1112f416955ac))
|
|
48
|
+
|
|
49
|
+
### Miscellaneous Tasks
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
- **(ci)** Fix CI (#7014) ([a431a3a](https://github.com/swc-project/swc/commit/a431a3a204faebd283cb7db8359b048d9fcc9a87))
|
|
54
|
+
|
|
55
|
+
### Refactor
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
- **(es/parser)** Make lexer not generic over `Input` (#6993) ([367ac82](https://github.com/swc-project/swc/commit/367ac825f6bfab65cf8bcb21e68500daef8ad177))
|
|
60
|
+
|
|
61
|
+
## [1.3.37] - 2023-02-28
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
8
67
|
- **(bindings/cli)** Implement `source-file-name` and `source-root` options (#6973) ([3e3e41a](https://github.com/swc-project/swc/commit/3e3e41a1756519515df193db903f6992995420e9))
|
|
9
68
|
|
|
10
69
|
|
package/README.md
CHANGED
|
@@ -67,17 +67,8 @@ Please see [benchmark results](https://swc.rs/docs/benchmark-transform) on the w
|
|
|
67
67
|
<h2 align="center">Supporting swc</h2>
|
|
68
68
|
|
|
69
69
|
<p align="center">
|
|
70
|
-
<a href="
|
|
71
|
-
<img
|
|
72
|
-
</a>
|
|
73
|
-
<a href="#gold-sponsors">
|
|
74
|
-
<img alt="Gold sponsors on Open Collective" src="https://opencollective.com/swc/tiers/gold-sponsors/badge.svg?label=Gold%20sponsors&color=brightgreen"/>
|
|
75
|
-
</a>
|
|
76
|
-
<a href="#silver-sponsors">
|
|
77
|
-
<img alt="Silver sponsors on Open Collective" src="https://opencollective.com/swc/tiers/silver-sponsors/badge.svg?label=Silver%20sponsors&color=brightgreen"/>
|
|
78
|
-
</a>
|
|
79
|
-
<a href="#bronze-sponsors">
|
|
80
|
-
<img alt="Bronze sponsors on Open Collective" src="https://opencollective.com/swc/tiers/bronze-sponsors/badge.svg?label=Bronze%20sponsors&color=brightgreen"/>
|
|
70
|
+
<a href="https://opencollective.com/swc">
|
|
71
|
+
<img src="https://raw.githubusercontent.com/swc-project/swc-sponsor-images/main/sponsors.svg" alt="Sponsors">
|
|
81
72
|
</a>
|
|
82
73
|
</p>
|
|
83
74
|
|
package/Visitor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accessibility, ArrayExpression, ArrayPattern, ArrowFunctionExpression, Argument, AssignmentExpression, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, BigIntLiteral, BinaryExpression, 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, Expression, ExpressionStatement, Fn, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, GetterProperty, Identifier, IfStatement, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, JSXAttribute, JSXAttributeName, JSXAttributeOrSpread, JSXAttrValue, 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, ParenthesisExpression, Pattern, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, SpreadElement, Statement, StaticBlock, StringLiteral, Super, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, TsAsExpression, TsCallSignatureDeclaration, 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, TsSetterSignature, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression, Param, ExprOrSpread, TsConstAssertion, Import, SuperPropExpression } from "./types";
|
|
1
|
+
import { Accessibility, ArrayExpression, ArrayPattern, ArrowFunctionExpression, Argument, AssignmentExpression, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, BigIntLiteral, BinaryExpression, 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, Expression, ExpressionStatement, Fn, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, GetterProperty, Identifier, IfStatement, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, JSXAttribute, JSXAttributeName, JSXAttributeOrSpread, JSXAttrValue, 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, ParenthesisExpression, Pattern, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, SpreadElement, Statement, StaticBlock, StringLiteral, Super, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, TsAsExpression, TsCallSignatureDeclaration, 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, TsSetterSignature, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression, Param, ExprOrSpread, TsConstAssertion, Import, SuperPropExpression, BindingIdentifier } from "./types";
|
|
2
2
|
export declare class Visitor {
|
|
3
3
|
visitProgram(n: Program): Program;
|
|
4
4
|
visitModule(m: Module): Module;
|
|
@@ -192,7 +192,7 @@ export declare class Visitor {
|
|
|
192
192
|
visitNamedImportSpecifier(node: NamedImportSpecifier): NamedImportSpecifier;
|
|
193
193
|
visitImportNamespaceSpecifier(node: ImportNamespaceSpecifier): ImportNamespaceSpecifier;
|
|
194
194
|
visitImportDefaultSpecifier(node: ImportDefaultSpecifier): ImportSpecifier;
|
|
195
|
-
visitBindingIdentifier(i:
|
|
195
|
+
visitBindingIdentifier(i: BindingIdentifier): BindingIdentifier;
|
|
196
196
|
visitIdentifierReference(i: Identifier): Identifier;
|
|
197
197
|
visitLabelIdentifier(label: Identifier): Identifier;
|
|
198
198
|
visitIdentifier(n: Identifier): Identifier;
|
package/Visitor.js
CHANGED
|
@@ -1301,6 +1301,9 @@ class Visitor {
|
|
|
1301
1301
|
return node;
|
|
1302
1302
|
}
|
|
1303
1303
|
visitBindingIdentifier(i) {
|
|
1304
|
+
if (i.typeAnnotation) {
|
|
1305
|
+
i.typeAnnotation = this.visitTsTypeAnnotation(i.typeAnnotation);
|
|
1306
|
+
}
|
|
1304
1307
|
return this.visitIdentifier(i);
|
|
1305
1308
|
}
|
|
1306
1309
|
visitIdentifierReference(i) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.38",
|
|
4
4
|
"description": "Super-fast alternative for babel",
|
|
5
5
|
"homepage": "https://swc.rs",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -138,16 +138,16 @@
|
|
|
138
138
|
"url": "https://opencollective.com/swc"
|
|
139
139
|
},
|
|
140
140
|
"optionalDependencies": {
|
|
141
|
-
"@swc/core-win32-x64-msvc": "1.3.
|
|
142
|
-
"@swc/core-darwin-x64": "1.3.
|
|
143
|
-
"@swc/core-linux-x64-gnu": "1.3.
|
|
144
|
-
"@swc/core-linux-x64-musl": "1.3.
|
|
145
|
-
"@swc/core-win32-ia32-msvc": "1.3.
|
|
146
|
-
"@swc/core-linux-arm64-gnu": "1.3.
|
|
147
|
-
"@swc/core-linux-arm-gnueabihf": "1.3.
|
|
148
|
-
"@swc/core-darwin-arm64": "1.3.
|
|
149
|
-
"@swc/core-linux-arm64-musl": "1.3.
|
|
150
|
-
"@swc/core-win32-arm64-msvc": "1.3.
|
|
141
|
+
"@swc/core-win32-x64-msvc": "1.3.38",
|
|
142
|
+
"@swc/core-darwin-x64": "1.3.38",
|
|
143
|
+
"@swc/core-linux-x64-gnu": "1.3.38",
|
|
144
|
+
"@swc/core-linux-x64-musl": "1.3.38",
|
|
145
|
+
"@swc/core-win32-ia32-msvc": "1.3.38",
|
|
146
|
+
"@swc/core-linux-arm64-gnu": "1.3.38",
|
|
147
|
+
"@swc/core-linux-arm-gnueabihf": "1.3.38",
|
|
148
|
+
"@swc/core-darwin-arm64": "1.3.38",
|
|
149
|
+
"@swc/core-linux-arm64-musl": "1.3.38",
|
|
150
|
+
"@swc/core-win32-arm64-msvc": "1.3.38"
|
|
151
151
|
},
|
|
152
152
|
"files": [
|
|
153
153
|
"CHANGELOG.md",
|