@swc/core 1.2.88 → 1.2.92

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/README.md CHANGED
@@ -57,7 +57,7 @@ Please see [benchmark results](https://swc.rs/docs/benchmark-transform) on the w
57
57
 
58
58
  swc is a community-driven project, and is maintained by a group of [volunteers](https://opencollective.com/swc#team). If you'd like to help support the future of the project, please consider:
59
59
 
60
- - Giving developer time on the project. (Message us on [Github discussions](https://github.com/swc-project/swc/discussions) (preferred) or [Slack](https://swc-org.slack.com/) for guidance!)
60
+ - Giving developer time on the project. (Message us on [Discord](https://discord.gg/GnHbXTdZz6) (preferred) or [Github discussions](https://github.com/swc-project/swc/discussions) for guidance!)
61
61
  - Giving funds by becoming a sponsor (see https://opencollective.com/swc)!
62
62
 
63
63
  ## Contributing
package/Visitor.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Accessibility, ArrayExpression, ArrayPattern, ArrowFunctionExpression, Argument, AssignmentExpression, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, 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, ModuleItem, NamedExportSpecifier, NamedImportSpecifier, NewExpression, NullLiteral, NumericLiteral, ObjectExpression, ObjectPattern, ObjectPatternProperty, OptionalChainingExpression, ParenthesisExpression, Pattern, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, SpreadElement, Statement, StringLiteral, Super, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, TsAsExpression, TsEntityName, TsEnumDeclaration, TsEnumMember, TsEnumMemberId, TsExportAssignment, TsExpressionWithTypeArguments, TsExternalModuleReference, TsFnParameter, TsImportEqualsDeclaration, TsIndexSignature, TsInterfaceBody, TsInterfaceDeclaration, TsModuleBlock, TsModuleDeclaration, TsModuleName, TsModuleReference, TsNamespaceBody, TsNamespaceDeclaration, TsNamespaceExportDeclaration, TsNonNullExpression, TsParameterProperty, TsParameterPropertyParameter, TsQualifiedName, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression, Param, ExprOrSpread, TsConstAssertion } from "./types";
2
- export default class Visitor {
2
+ export declare class Visitor {
3
3
  visitProgram(n: Program): Program;
4
4
  visitModule(m: Module): Module;
5
5
  visitScript(m: Script): Script;
@@ -197,3 +197,4 @@ export default class Visitor {
197
197
  visitArrayPatternElements(nodes: (Pattern | undefined)[]): (Pattern | undefined)[];
198
198
  visitArrayPatternElement(n: Pattern | undefined): Pattern | undefined;
199
199
  }
200
+ export default Visitor;
package/Visitor.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Visitor = void 0;
3
4
  class Visitor {
4
5
  visitProgram(n) {
5
6
  switch (n.type) {
@@ -1286,4 +1287,5 @@ class Visitor {
1286
1287
  return n;
1287
1288
  }
1288
1289
  }
1290
+ exports.Visitor = Visitor;
1289
1291
  exports.default = Visitor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swc/core",
3
- "version": "1.2.88",
3
+ "version": "1.2.92",
4
4
  "description": "Super-fast alternative for babel",
5
5
  "homepage": "https://swc.rs",
6
6
  "main": "./index.js",
@@ -91,17 +91,17 @@
91
91
  "url": "https://opencollective.com/swc"
92
92
  },
93
93
  "optionalDependencies": {
94
- "@swc/core-win32-x64-msvc": "^1.2.88",
95
- "@swc/core-darwin-x64": "^1.2.88",
96
- "@swc/core-linux-x64-gnu": "^1.2.88",
97
- "@swc/core-linux-x64-musl": "^1.2.88",
98
- "@swc/core-win32-ia32-msvc": "^1.2.88",
99
- "@swc/core-linux-arm64-gnu": "^1.2.88",
100
- "@swc/core-linux-arm-gnueabihf": "^1.2.88",
101
- "@swc/core-darwin-arm64": "^1.2.88",
102
- "@swc/core-android-arm64": "^1.2.88",
103
- "@swc/core-freebsd-x64": "^1.2.88",
104
- "@swc/core-linux-arm64-musl": "^1.2.88",
105
- "@swc/core-win32-arm64-msvc": "^1.2.88"
94
+ "@swc/core-win32-x64-msvc": "1.2.92",
95
+ "@swc/core-darwin-x64": "1.2.92",
96
+ "@swc/core-linux-x64-gnu": "1.2.92",
97
+ "@swc/core-linux-x64-musl": "1.2.92",
98
+ "@swc/core-win32-ia32-msvc": "1.2.92",
99
+ "@swc/core-linux-arm64-gnu": "1.2.92",
100
+ "@swc/core-linux-arm-gnueabihf": "1.2.92",
101
+ "@swc/core-darwin-arm64": "1.2.92",
102
+ "@swc/core-android-arm64": "1.2.92",
103
+ "@swc/core-freebsd-x64": "1.2.92",
104
+ "@swc/core-linux-arm64-musl": "1.2.92",
105
+ "@swc/core-win32-arm64-msvc": "1.2.92"
106
106
  }
107
107
  }
package/types.d.ts CHANGED
@@ -257,11 +257,11 @@ export declare type Swcrc = Config | Config[];
257
257
  */
258
258
  export interface Config {
259
259
  /**
260
- * Note: The type is string beacuse it follow rust's regex syntax.
260
+ * Note: The type is string because it follow rust's regex syntax.
261
261
  */
262
262
  test?: string | string[];
263
263
  /**
264
- * Note: The type is string beacuse it follow rust's regex syntax.
264
+ * Note: The type is string because it follow rust's regex syntax.
265
265
  */
266
266
  exclude?: string | string[];
267
267
  env?: EnvConfig;
@@ -331,6 +331,7 @@ export interface JscConfig {
331
331
  paths?: {
332
332
  [from: string]: [string];
333
333
  };
334
+ minify?: JsMinifyOptions;
334
335
  }
335
336
  export declare type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021";
336
337
  export declare type ParserConfig = TsParserConfig | EsParserConfig;