@swc/core 1.3.77 → 1.3.79
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 +79 -0
- package/Visitor.d.ts +1 -1
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/package.json +15 -12
- package/spack.d.ts +1 -1
- package/types.d.ts +0 -1884
- package/types.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,85 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
- **(es)** Fix default value of `jsc.minify.format.comments` (#7853) ([64e51d3](https://github.com/swc-project/swc/commit/64e51d3a28052734d2eaf9992bc8ba578dd5630b))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- **(es/minifier)** Don't inline properties if the var is not `fn-local` (#7839) ([7fe01e6](https://github.com/swc-project/swc/commit/7fe01e64dd9917d375a4f1cf9661ffaca822c5b3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- **(es/minifier)** Don't remove exports (#7856) ([ae8cd94](https://github.com/swc-project/swc/commit/ae8cd9430dd1ec0d857ac7f87ffa4b76258be92c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
- **(es/module)** Make `jsc.paths` work for a nest.js app (#7852) ([d33a973](https://github.com/swc-project/swc/commit/d33a97303ceeee4069321ef21027ff99fe973a79))
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- **(css/ast)** Support `@scope` at-rule (#7837) ([a34f359](https://github.com/swc-project/swc/commit/a34f3592b3fd2731b63a5c58c5022e12a403850b))
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Tasks
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- **(ci)** Fix CI (#7857) ([854e2e7](https://github.com/swc-project/swc/commit/854e2e78b38699fd09c65074a38a21d1d9836002))
|
|
30
|
+
|
|
31
|
+
### Refactor
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
- **(common)** Mark some methods of `Input` unsafe (#7848) ([c657324](https://github.com/swc-project/swc/commit/c65732496e4e2aab664b7443a29f5180cba6e965))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- **(es/helpers)** Move packages for monorepo (#7833) ([1ab406c](https://github.com/swc-project/swc/commit/1ab406cd7aa19ea333a8462b0cd496ceb3e39ac1))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
- **(es/minifier)** Pre-calculate `reassigned` (#7832) ([65db1ba](https://github.com/swc-project/swc/commit/65db1badff3108983fcd59f933e9f87c55d62916))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- **(es/types)** Extract `@swc/types` as a small, reusable package (#7834) ([f713f1b](https://github.com/swc-project/swc/commit/f713f1b2f6783ed6d85edd6decd87daa473acea0))
|
|
45
|
+
|
|
46
|
+
## [1.3.78] - 2023-08-17
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
- **(es/codegen)** Add quotes to property names when `ascii_only` is `true` (#7820) ([04921f3](https://github.com/swc-project/swc/commit/04921f301afbc2dc74bed4cb24e7656b60e54327))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- **(es/compat)** Remove wrong logic for object patterns in `object_rest` (#7788) ([3766a7c](https://github.com/swc-project/swc/commit/3766a7c776b63e159be3f11f5f931c5e5f968cdb))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
- **(es/minifier)** Preserve `cooked` while compressing template literals (#7773) ([05990a9](https://github.com/swc-project/swc/commit/05990a98fd3f06a3c03bd1e795800acf22f16035))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
- **(es/minifier)** Abort seq inliner if var is not fn_local or reassigned (#7804) ([f8ca366](https://github.com/swc-project/swc/commit/f8ca366cc179d2d83d35148c3600b8faa2e7f801))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
- **(es/minifier)** Preserve more analysis data upon inlining (#7823) ([31de19e](https://github.com/swc-project/swc/commit/31de19ece22663623b1fc1fe48c90b7aa41e41e0))
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
- **(es/module)** Improve error message about relative `jsc.baseUrl` (#7827) ([9099883](https://github.com/swc-project/swc/commit/9099883175c590106109670de01ab32b33303bfd))
|
|
71
|
+
|
|
72
|
+
### Refactor
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
- **(common)** Make `ahash` optional (#7816) ([981d7b1](https://github.com/swc-project/swc/commit/981d7b152b2f488a67d42052152db22225f1d094))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
- **(es/parser)** Remove needless `unsafe` (#7818) ([8b809db](https://github.com/swc-project/swc/commit/8b809dbe23cab3db2159979cf1852a69c109f1e0))- **general**: Use `ahash` from `swc_common` in more places (#7815) ([b43e38d](https://github.com/swc-project/swc/commit/b43e38d3f92bc889e263b741dbe173a6f2206d88))
|
|
80
|
+
|
|
81
|
+
## [1.3.77] - 2023-08-16
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
8
87
|
- **(es)** Resolve `jsc.baseUrl` for `.swcrc` specified by `--config-file` (#7801) ([fe1ca26](https://github.com/swc-project/swc/commit/fe1ca26218493d2e7d4121433c365a37e13285e6))
|
|
9
88
|
|
|
10
89
|
|
package/Visitor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 "
|
|
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 "@swc/types";
|
|
2
2
|
export declare class Visitor {
|
|
3
3
|
visitProgram(n: Program): Program;
|
|
4
4
|
visitModule(m: Module): Module;
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Plugin, ParseOptions, Module, Output, Options, Script, Program, JsMinifyOptions } from "
|
|
2
|
-
export * from "
|
|
1
|
+
import type { Plugin, ParseOptions, Module, Output, Options, Script, Program, JsMinifyOptions } from "@swc/types";
|
|
2
|
+
export * from "@swc/types";
|
|
3
3
|
import { BundleInput } from "./spack";
|
|
4
4
|
/**
|
|
5
5
|
* Version of the swc binding.
|
package/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
49
|
exports.DEFAULT_EXTENSIONS = exports.getBinaryMetadata = exports.__experimental_registerGlobalTraceConfig = exports.minifySync = exports.minify = exports.bundle = exports.transformFileSync = exports.transformFile = exports.transformSync = exports.transform = exports.printSync = exports.print = exports.parseFileSync = exports.parseFile = exports.parseSync = exports.parse = exports.Compiler = exports.plugins = exports.version = void 0;
|
|
50
50
|
const path_1 = require("path");
|
|
51
|
-
__exportStar(require("
|
|
51
|
+
__exportStar(require("@swc/types"), exports);
|
|
52
52
|
const spack_1 = require("./spack");
|
|
53
53
|
const assert = __importStar(require("assert"));
|
|
54
54
|
// Allow overrides to the location of the .node binding file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swc/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.79",
|
|
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.79",
|
|
149
|
+
"@swc/core-darwin-x64": "1.3.79",
|
|
150
|
+
"@swc/core-linux-x64-gnu": "1.3.79",
|
|
151
|
+
"@swc/core-linux-x64-musl": "1.3.79",
|
|
152
|
+
"@swc/core-win32-ia32-msvc": "1.3.79",
|
|
153
|
+
"@swc/core-linux-arm64-gnu": "1.3.79",
|
|
154
|
+
"@swc/core-linux-arm-gnueabihf": "1.3.79",
|
|
155
|
+
"@swc/core-darwin-arm64": "1.3.79",
|
|
156
|
+
"@swc/core-linux-arm64-musl": "1.3.79",
|
|
157
|
+
"@swc/core-win32-arm64-msvc": "1.3.79"
|
|
158
158
|
},
|
|
159
159
|
"files": [
|
|
160
160
|
"CHANGELOG.md",
|
|
@@ -176,5 +176,8 @@
|
|
|
176
176
|
"postinstall.js",
|
|
177
177
|
"bindings/binding_core_wasm/pkg/binding_core_wasm.d.ts"
|
|
178
178
|
],
|
|
179
|
-
"packageManager": "yarn@3.5.0"
|
|
179
|
+
"packageManager": "yarn@3.5.0",
|
|
180
|
+
"dependencies": {
|
|
181
|
+
"@swc/types": "^0.1.3"
|
|
182
|
+
}
|
|
180
183
|
}
|
package/spack.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Options } from "
|
|
1
|
+
import { Options } from "@swc/types";
|
|
2
2
|
export type BundleInput = BundleOptions | BundleOptions[];
|
|
3
3
|
export declare const isLocalFile: RegExp;
|
|
4
4
|
export declare function compileBundleOptions(config: BundleInput | string | undefined): Promise<BundleInput>;
|