From b395f483d1e0cb43b1f96126c5c17f9a8c9d0d32 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sat, 10 Aug 2024 01:41:28 +0800 Subject: [PATCH 1/9] fix(es/typescript): Strip exported default overload function declaration (#9412) --- .changeset/soft-plants-prove.md | 5 ++++ crates/swc_fast_ts_strip/src/lib.rs | 26 +++++++++++++------ .../defaultExportWithOverloads01.strip.broken | 7 ----- .../tsc/defaultExportWithOverloads01.strip.js | 7 ----- 4 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 .changeset/soft-plants-prove.md delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.broken delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.js diff --git a/.changeset/soft-plants-prove.md b/.changeset/soft-plants-prove.md new file mode 100644 index 000000000000..f58520003bf0 --- /dev/null +++ b/.changeset/soft-plants-prove.md @@ -0,0 +1,5 @@ +--- +swc_fast_ts_strip: patch +--- + +fix(es/typescript): Strip exported default overload function declaration diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index 10a41796e823..d2a06d6c43b7 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -12,13 +12,13 @@ use swc_common::{ }; use swc_ecma_ast::{ ArrayPat, ArrowExpr, AutoAccessor, BindingIdent, Class, ClassDecl, ClassMethod, ClassProp, - Constructor, Decl, DoWhileStmt, EsVersion, ExportAll, ExportDecl, ExportDefaultDecl, - ExportSpecifier, FnDecl, ForInStmt, ForOfStmt, ForStmt, IfStmt, ImportDecl, ImportSpecifier, - NamedExport, ObjectPat, Param, Pat, PrivateMethod, PrivateProp, Program, Stmt, TsAsExpr, - TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, TsIndexSignature, - TsInstantiation, TsModuleDecl, TsModuleName, TsNamespaceDecl, TsNonNullExpr, TsParamPropParam, - TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, TsTypeParamDecl, - TsTypeParamInstantiation, VarDeclarator, WhileStmt, + Constructor, Decl, DefaultDecl, DoWhileStmt, EsVersion, ExportAll, ExportDecl, + ExportDefaultDecl, ExportSpecifier, FnDecl, ForInStmt, ForOfStmt, ForStmt, IfStmt, ImportDecl, + ImportSpecifier, NamedExport, ObjectPat, Param, Pat, PrivateMethod, PrivateProp, Program, Stmt, + TsAsExpr, TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, + TsIndexSignature, TsInstantiation, TsModuleDecl, TsModuleName, TsNamespaceDecl, TsNonNullExpr, + TsParamPropParam, TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, + TsTypeParamDecl, TsTypeParamInstantiation, VarDeclarator, WhileStmt, }; use swc_ecma_parser::{ lexer::Lexer, @@ -775,7 +775,7 @@ impl Visit for TsStrip { } fn visit_export_default_decl(&mut self, n: &ExportDefaultDecl) { - if n.decl.is_ts_interface_decl() { + if n.decl.is_ts_declare() { self.add_replacement(n.span); self.fix_asi(n.span); return; @@ -1100,6 +1100,16 @@ impl IsTsDecl for Stmt { } } +impl IsTsDecl for DefaultDecl { + fn is_ts_declare(&self) -> bool { + match self { + Self::Class(..) => false, + DefaultDecl::Fn(r#fn) => r#fn.function.body.is_none(), + DefaultDecl::TsInterfaceDecl(..) => true, + } + } +} + trait U8Helper { fn is_utf8_char_boundary(&self) -> bool; } diff --git a/crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.broken b/crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.broken deleted file mode 100644 index 4f66eee030eb..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.broken +++ /dev/null @@ -1,7 +0,0 @@ - x Expected '{', got ';' - ,-[$DIR/tests/tsc/defaultExportWithOverloads01.strip.js:4:1] - 3 | - 4 | export default function f(); - : ^ - 5 | export default function f(x ); - `---- diff --git a/crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.js b/crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.js deleted file mode 100644 index 1d671e02dc32..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/defaultExportWithOverloads01.strip.js +++ /dev/null @@ -1,7 +0,0 @@ -// @module: commonjs -// @target: ES5 - -export default function f(); -export default function f(x ); -export default function f(...args ) { -} \ No newline at end of file From 442fb7b48715597d62f8d09327f93acc66f2d1b8 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sat, 10 Aug 2024 02:12:45 +0800 Subject: [PATCH 2/9] fix(es/typescript): Strip `this` param in getter/setter (#9414) --- .changeset/friendly-onions-bathe.md | 5 + crates/swc_fast_ts_strip/src/lib.rs | 40 +++++- crates/swc_fast_ts_strip/tests/fixture.rs | 1 + .../tsc/errorSuperPropertyAccess.strip.broken | 7 - .../tsc/errorSuperPropertyAccess.strip.js | 127 ------------------ .../tsc/thisTypeInAccessors.strip.broken | 7 - .../tests/tsc/thisTypeInAccessors.strip.js | 38 ------ .../thisTypeInAccessorsNegative.strip.broken | 7 - .../tsc/thisTypeInAccessorsNegative.strip.js | 19 --- .../typeOfThisInStaticMembers9.strip.broken | 14 -- .../tsc/typeOfThisInStaticMembers9.strip.js | 22 --- 11 files changed, 40 insertions(+), 247 deletions(-) create mode 100644 .changeset/friendly-onions-bathe.md delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.broken delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.js delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.broken delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.js delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.broken delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.js delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.broken delete mode 100644 crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.js diff --git a/.changeset/friendly-onions-bathe.md b/.changeset/friendly-onions-bathe.md new file mode 100644 index 000000000000..3ed326df271a --- /dev/null +++ b/.changeset/friendly-onions-bathe.md @@ -0,0 +1,5 @@ +--- +swc_fast_ts_strip: patch +--- + +fix(es/typescript): Strip `this` param in getter/setter diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index d2a06d6c43b7..cf81f508c347 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -13,12 +13,12 @@ use swc_common::{ use swc_ecma_ast::{ ArrayPat, ArrowExpr, AutoAccessor, BindingIdent, Class, ClassDecl, ClassMethod, ClassProp, Constructor, Decl, DefaultDecl, DoWhileStmt, EsVersion, ExportAll, ExportDecl, - ExportDefaultDecl, ExportSpecifier, FnDecl, ForInStmt, ForOfStmt, ForStmt, IfStmt, ImportDecl, - ImportSpecifier, NamedExport, ObjectPat, Param, Pat, PrivateMethod, PrivateProp, Program, Stmt, - TsAsExpr, TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, - TsIndexSignature, TsInstantiation, TsModuleDecl, TsModuleName, TsNamespaceDecl, TsNonNullExpr, - TsParamPropParam, TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, - TsTypeParamDecl, TsTypeParamInstantiation, VarDeclarator, WhileStmt, + ExportDefaultDecl, ExportSpecifier, FnDecl, ForInStmt, ForOfStmt, ForStmt, GetterProp, IfStmt, + ImportDecl, ImportSpecifier, NamedExport, ObjectPat, Param, Pat, PrivateMethod, PrivateProp, + Program, SetterProp, Stmt, TsAsExpr, TsConstAssertion, TsEnumDecl, TsExportAssignment, + TsImportEqualsDecl, TsIndexSignature, TsInstantiation, TsModuleDecl, TsModuleName, + TsNamespaceDecl, TsNonNullExpr, TsParamPropParam, TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, + TsTypeAssertion, TsTypeParamDecl, TsTypeParamInstantiation, VarDeclarator, WhileStmt, }; use swc_ecma_parser::{ lexer::Lexer, @@ -1069,6 +1069,34 @@ impl Visit for TsStrip { self.add_overwrite(n.body.span_lo(), b';'); } } + + fn visit_getter_prop(&mut self, n: &GetterProp) { + let l_parern_index = self.get_next_token_index(n.key.span_hi()); + let l_parern = &self.tokens[l_parern_index]; + debug_assert_eq!(l_parern.token, Token::LParen); + + let r_parern_pos = n.type_ann.as_ref().map_or(n.body.span_lo(), |t| t.span.lo) - BytePos(1); + let r_parern = self.get_prev_token(r_parern_pos); + debug_assert_eq!(r_parern.token, Token::RParen); + + let span = span(l_parern.span.lo + BytePos(1), r_parern.span.hi - BytePos(1)); + self.add_replacement(span); + + n.visit_children_with(self); + } + + fn visit_setter_prop(&mut self, n: &SetterProp) { + if let Some(this_param) = &n.this_param { + self.add_replacement(this_param.span()); + + let comma = self.get_prev_token(n.param.span_lo() - BytePos(1)); + debug_assert_eq!(comma.token, Token::Comma); + + self.add_replacement(comma.span); + } + + n.visit_children_with(self); + } } trait IsTsDecl { diff --git a/crates/swc_fast_ts_strip/tests/fixture.rs b/crates/swc_fast_ts_strip/tests/fixture.rs index 254f8353e9b1..9c54bb131bbe 100644 --- a/crates/swc_fast_ts_strip/tests/fixture.rs +++ b/crates/swc_fast_ts_strip/tests/fixture.rs @@ -130,6 +130,7 @@ fn reparse(cm: &Lrc, handler: &Handler, filename: &PathBuf, input: St let fm = cm.new_source_file(filename.into(), input); let syntax = Syntax::Es(EsSyntax { + allow_super_outside_method: true, auto_accessors: true, decorators: true, decorators_before_export: true, diff --git a/crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.broken b/crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.broken deleted file mode 100644 index c530df833f7b..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.broken +++ /dev/null @@ -1,7 +0,0 @@ - x Invalid access to super - ,-[$DIR/tests/tsc/errorSuperPropertyAccess.strip.js:73:1] - 72 | function inner() { - 73 | super.publicFunc(); - : ^^^^^^^^^^ - 74 | } - `---- diff --git a/crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.js b/crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.js deleted file mode 100644 index 883d0b4a4b83..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/errorSuperPropertyAccess.strip.js +++ /dev/null @@ -1,127 +0,0 @@ -//super property access in constructor of class with no base type -//super property access in instance member function of class with no base type -//super property access in instance member accessor(get and set) of class with no base type -class NoBase { - constructor() { - var a = super.prototype; - var b = super.hasOwnProperty(''); - } - - fn() { - var a = super.prototype; - var b = super.hasOwnProperty(''); - } - - m = super.prototype; - n = super.hasOwnProperty(''); - - //super static property access in static member function of class with no base type - //super static property access in static member accessor(get and set) of class with no base type - static static1() { - super.hasOwnProperty(''); - } - - static get static2() { - super.hasOwnProperty(''); - return ''; - } - - static set static2(n) { - super.hasOwnProperty(''); - } -} - -class SomeBase { - privateFunc() { } - privateMember = 0; - - publicFunc() { } - publicMember = 0; - - static privateStaticFunc() { } - static privateStaticMember = 0; - - static publicStaticFunc() { } - static publicStaticMember = 0; - -} - - -//super.publicInstanceMemberNotFunction in constructor of derived class -//super.publicInstanceMemberNotFunction in instance member function of derived class -//super.publicInstanceMemberNotFunction in instance member accessor(get and set) of derived class -//super property access only available with typed this -class SomeDerived1 extends SomeBase { - constructor() { - super(); - super.publicMember = 1; - } - - fn() { - var x = super.publicMember; - } - - get a() { - var x = super.publicMember; - return undefined; - } - set a(n) { - n = super.publicMember; - } - fn2() { - function inner() { - super.publicFunc(); - } - var x = { - test: function () { return super.publicFunc(); } - } - } -} - -//super.privateProperty in constructor of derived class -//super.privateProperty in instance member function of derived class -//super.privateProperty in instance member accessor(get and set) of derived class -class SomeDerived2 extends SomeBase { - constructor() { - super(); - super.privateMember = 1; - } - - fn() { - var x = super.privateMember; - } - - get a() { - var x = super.privateMember; - return undefined; - } - set a(n) { - n = super.privateMember; - } -} - -//super.publicStaticMemberNotFunction in static member function of derived class -//super.publicStaticMemberNotFunction in static member accessor(get and set) of derived class -//super.privateStaticProperty in static member function of derived class -//super.privateStaticProperty in static member accessor(get and set) of derived class -class SomeDerived3 extends SomeBase { - static fn() { - super.publicStaticMember = 3; - super.privateStaticMember = 3; - super.privateStaticFunc(); - } - static get a() { - super.publicStaticMember = 3; - super.privateStaticMember = 3; - super.privateStaticFunc(); - return ''; - } - static set a(n) { - super.publicStaticMember = 3; - super.privateStaticMember = 3; - super.privateStaticFunc(); - } -} - -// In object literal -var obj = { n: super.wat, p: super.foo() }; diff --git a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.broken b/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.broken deleted file mode 100644 index 2335516ef9b0..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.broken +++ /dev/null @@ -1,7 +0,0 @@ - x Expected ident - ,-[$DIR/tests/tsc/thisTypeInAccessors.strip.js:11:1] - 10 | n: 12, - 11 | get x(this: Foo) { return this.n; }, - : ^^^^ - 12 | set x(this , n ) { this.n = n; } - `---- diff --git a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.js b/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.js deleted file mode 100644 index 8558467123ed..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessors.strip.js +++ /dev/null @@ -1,38 +0,0 @@ -// @noImplicitAny: true -// @noImplicitThis: true -// @target: es5 - - - - - -const explicit = { - n: 12, - get x(this: Foo) { return this.n; }, - set x(this , n ) { this.n = n; } -} -const copiedFromGetter = { - n: 14, - get x(this: Foo) { return this.n; }, - set x(n) { this.n = n; } -} -const copiedFromSetter = { - n: 15, - get x() { return this.n }, - set x(this , n ) { this.n = n; } -} -const copiedFromGetterUnannotated = { - n: 16, - get x(this: Foo) { return this.n }, - set x(this, n) { this.n = n; } -} - -class Explicit { - n = 17; - get x( ) { return this.n; } - set x( n ) { this.n = n; } -} -class Contextual { - n = 21; - get x() { return this.n } // inside a class, so already correct -} diff --git a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.broken b/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.broken deleted file mode 100644 index a8674e1ca618..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.broken +++ /dev/null @@ -1,7 +0,0 @@ - x Expected ident - ,-[$DIR/tests/tsc/thisTypeInAccessorsNegative.strip.js:13:1] - 12 | n: 13, - 13 | get x(this: Foo) { return this.n; }, - : ^^^^ - 14 | set x(this , n) { this.wrong = "method"; } - `---- diff --git a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.js b/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.js deleted file mode 100644 index 3ee08a14d55b..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/thisTypeInAccessorsNegative.strip.js +++ /dev/null @@ -1,19 +0,0 @@ -// @noImplicitAny: true -// @noImplicitThis: true -// @target: es5 - - - - - - - -const mismatch = { - n: 13, - get x(this: Foo) { return this.n; }, - set x(this , n) { this.wrong = "method"; } -} -const contextual = { - n: 16, - get x() { return this.n; } -} diff --git a/crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.broken b/crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.broken deleted file mode 100644 index ba26229a1d56..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.broken +++ /dev/null @@ -1,14 +0,0 @@ - x Expression expected - ,-[$DIR/tests/tsc/typeOfThisInStaticMembers9.strip.js:9:1] - 8 | static arrowFunctionBoundary = () => super.f + 1; - 9 | static functionExprBoundary = function () { return super.f + 2 }; - : ^ - 10 | static classExprBoundary = class { a = super.f + 3 }; - `---- - x Expression expected - ,-[$DIR/tests/tsc/typeOfThisInStaticMembers9.strip.js:13:1] - 12 | function foo () { - 13 | return super.f + 4 - : ^ - 14 | } - `---- diff --git a/crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.js b/crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.js deleted file mode 100644 index 8c5fc9308b1e..000000000000 --- a/crates/swc_fast_ts_strip/tests/tsc/typeOfThisInStaticMembers9.strip.js +++ /dev/null @@ -1,22 +0,0 @@ -// @target: esnext, es2022, es6, es5 - -class C { - static f = 1 -} - -class D extends C { - static arrowFunctionBoundary = () => super.f + 1; - static functionExprBoundary = function () { return super.f + 2 }; - static classExprBoundary = class { a = super.f + 3 }; - static functionAndClassDeclBoundary = (() => { - function foo () { - return super.f + 4 - } - class C { - a = super.f + 5 - method () { - return super.f +6 - } - } - })(); -} From 165c8facd42d756077fde99defe91ffe656aede8 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sat, 10 Aug 2024 03:06:29 +0800 Subject: [PATCH 3/9] fix(es/typescript): Update ts-strip type definition (#9415) **Related issue:** - Closes #9413 --- .changeset/thin-chicken-build.md | 6 ++++++ bindings/binding_typescript_wasm/src/lib.rs | 5 +++-- crates/swc_fast_ts_strip/src/lib.rs | 9 +++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .changeset/thin-chicken-build.md diff --git a/.changeset/thin-chicken-build.md b/.changeset/thin-chicken-build.md new file mode 100644 index 000000000000..43571479659d --- /dev/null +++ b/.changeset/thin-chicken-build.md @@ -0,0 +1,6 @@ +--- +swc_fast_ts_strip: patch +swc_core: patch +--- + +fix(es/typescript): Update ts-strip type definition diff --git a/bindings/binding_typescript_wasm/src/lib.rs b/bindings/binding_typescript_wasm/src/lib.rs index 680726add384..0a9a3b35e525 100644 --- a/bindings/binding_typescript_wasm/src/lib.rs +++ b/bindings/binding_typescript_wasm/src/lib.rs @@ -12,8 +12,9 @@ use wasm_bindgen_futures::{ /// auto generated one, which is not reflecting most of types in detail. #[wasm_bindgen(typescript_custom_section)] const INTERFACE_DEFINITIONS: &'static str = r#" -export function transform(src: string, opts?: Options): Promise; -export function transformSync(src: string, opts?: Options): TransformOutput; +export declare function transform(src: string, opts?: Options): Promise; +export declare function transformSync(src: string, opts?: Options): TransformOutput; +export type { Options, TransformOutput }; "#; #[wasm_bindgen(skip_typescript)] diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index cf81f508c347..d67bfd499a82 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -64,8 +64,17 @@ interface Options { module?: boolean; filename?: string; mode?: Mode; + transform?; TransformConfig; sourceMap?: boolean; } + +interface TransformConfig { + verbatimModuleSyntax?: boolean; + importNotUsedAsValues?: "remove" | "preserve"; + noEmptyExport?: boolean; + importExportAssignConfig?: "Classic" | "Preserve" | "NodeNext" | "EsNext"; + tsEnumIsMutable?: boolean; +} "#; #[derive(Debug, Default, Deserialize)] From 1c655413925cca6887f128390a0f6d70579fc938 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 9 Aug 2024 19:09:34 +0000 Subject: [PATCH 4/9] chore: Publish crates with `swc_core` `v0.100.6` --- .changeset/friendly-onions-bathe.md | 5 ----- .changeset/lemon-hornets-attend.md | 5 ----- .changeset/soft-plants-prove.md | 5 ----- .changeset/thin-chicken-build.md | 6 ------ Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_fast_ts_strip/Cargo.toml | 2 +- 7 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 .changeset/friendly-onions-bathe.md delete mode 100644 .changeset/lemon-hornets-attend.md delete mode 100644 .changeset/soft-plants-prove.md delete mode 100644 .changeset/thin-chicken-build.md diff --git a/.changeset/friendly-onions-bathe.md b/.changeset/friendly-onions-bathe.md deleted file mode 100644 index 3ed326df271a..000000000000 --- a/.changeset/friendly-onions-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_fast_ts_strip: patch ---- - -fix(es/typescript): Strip `this` param in getter/setter diff --git a/.changeset/lemon-hornets-attend.md b/.changeset/lemon-hornets-attend.md deleted file mode 100644 index 71c0510eb375..000000000000 --- a/.changeset/lemon-hornets-attend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_fast_ts_strip: patch ---- - -fix(es/typescript): Strip optional mark and definite mark diff --git a/.changeset/soft-plants-prove.md b/.changeset/soft-plants-prove.md deleted file mode 100644 index f58520003bf0..000000000000 --- a/.changeset/soft-plants-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_fast_ts_strip: patch ---- - -fix(es/typescript): Strip exported default overload function declaration diff --git a/.changeset/thin-chicken-build.md b/.changeset/thin-chicken-build.md deleted file mode 100644 index 43571479659d..000000000000 --- a/.changeset/thin-chicken-build.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_fast_ts_strip: patch -swc_core: patch ---- - -fix(es/typescript): Update ts-strip type definition diff --git a/Cargo.lock b/Cargo.lock index b92ba66a32a2..ba5ade7549e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4010,7 +4010,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.100.5" +version = "0.100.6" dependencies = [ "anyhow", "binding_macros", @@ -5095,7 +5095,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.5.2" +version = "0.5.3" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 57d7228afe84..fe2f41ded544 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.100.5" +version = "0.100.6" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 9df4521a7617..9408e982e256 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_ts_strip" repository = { workspace = true } -version = "0.5.2" +version = "0.5.3" [dependencies] From 48b5a58d7db50a100ae7ec42e10f194ac2c4e39e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 9 Aug 2024 19:15:53 +0000 Subject: [PATCH 5/9] chore: Publish `1.7.10-nightly-20240809.1` with `swc_core` `v0.100.6` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 4a95ea5527da..e07e8e985175 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.9" +version = "1.7.10-nightly-20240809.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.9" +version = "1.7.10-nightly-20240809.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.9" +version = "1.7.10-nightly-20240809.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.364" +version = "0.91.365" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index dc5ea6397f9b..580d2502900a 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.9" +version = "1.7.10-nightly-20240809.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 8212e990d161..45543a62972c 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.9" +version = "1.7.10-nightly-20240809.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 26772176dff6..76938cc7f063 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.9" +version = "1.7.10-nightly-20240809.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index e1d936c0f7ec..e1daec350fe2 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.364" +version = "0.91.365" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 4a9ea7f46e86..48a0b55aab09 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index d1d1f99182b1..9cfa403dddeb 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 1b92bf0ca13e..ae7e0712bb3f 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 0bd8262c0d1b..b0e54a409ec8 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index ca30f1a48d17..5ddf7b6f9cb5 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 3d2ee1333a69..dc3c6a2ecea8 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index e8c4d091d682..a02ec53f411f 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 9736cc96691b..983fcf6c7d2d 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index d213a3abe15d..b94362a48873 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index f9cfbfaa3253..a859051673f4 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 3c8fe7b6a77b..bca2d1bc1338 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 3166bd79ffc4..d71056c4eafb 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index eec569d80e7c..d04636a38a82 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 0d50b47653b8..70d014b13624 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index a8a824edfea7..2766502094bb 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 623d264863e0..cce0694fdf68 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 273a85036354..41e6b017b616 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index efa351a5a7be..24ada7b69c0d 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 29f35f6bf65f..e18a65f17daa 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 4b578330d8f6..ddf7dbef5dc3 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index a52b8b381e3c..2ac463628830 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 71e7d19b5dcc..397c9ca1d5cc 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.9", + "version": "1.7.10-nightly-20240809.1", "os": [ "win32" ], From cf37df89543e24f81b2322013512c6f0f8848e96 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 9 Aug 2024 19:15:55 +0000 Subject: [PATCH 6/9] chore: Update changelog --- CHANGELOG.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36f7b43d7ff5..340472f43f02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,21 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/typescript)** Strip optional mark and definite mark ([#9411](https://github.com/swc-project/swc/issues/9411)) ([8c161a0](https://github.com/swc-project/swc/commit/8c161a003e741320434f31617bc2de98dd2c9a8f)) + + +- **(es/typescript)** Strip exported default overload function declaration ([#9412](https://github.com/swc-project/swc/issues/9412)) ([b395f48](https://github.com/swc-project/swc/commit/b395f483d1e0cb43b1f96126c5c17f9a8c9d0d32)) + + +- **(es/typescript)** Strip `this` param in getter/setter ([#9414](https://github.com/swc-project/swc/issues/9414)) ([442fb7b](https://github.com/swc-project/swc/commit/442fb7b48715597d62f8d09327f93acc66f2d1b8)) + + +- **(es/typescript)** Update ts-strip type definition ([#9415](https://github.com/swc-project/swc/issues/9415)) ([165c8fa](https://github.com/swc-project/swc/commit/165c8facd42d756077fde99defe91ffe656aede8)) + ## [1.7.9] - 2024-08-09 ### Bug Fixes @@ -1287,9 +1304,6 @@ -- **(es/minifier)** Fix eval of `toString` of array with holes ([#8727](https://github.com/swc-project/swc/issues/8727)) ([f3fbd9d](https://github.com/swc-project/swc/commit/f3fbd9d54925b708139a37865508430cdcb98f9a)) - - - **(es/minifier)** Do not evaluate `slice` calls with negative index ([#8726](https://github.com/swc-project/swc/issues/8726)) ([23f9635](https://github.com/swc-project/swc/commit/23f9635d2cb523d63e5d1611dcf55922bcc54a87)) @@ -1311,15 +1325,6 @@ -- **(es/lints)** Add `no-prototype-builtins` rule ([#8684](https://github.com/swc-project/swc/issues/8684)) ([a5dbb17](https://github.com/swc-project/swc/commit/a5dbb17612327c66366086f99b44c6731d125ffc)) - - - **(es/lints)** Add `prefer-object-spread` rule ([#8696](https://github.com/swc-project/swc/issues/8696)) ([aa9297b](https://github.com/swc-project/swc/commit/aa9297b42e001f6b7319881870f6012a56c50aef)) -### Refactor - - - -- **(es)** Prepare `wasm32-wasi-preview1-threads` target support ([#8724](https://github.com/swc-project/swc/issues/8724)) ([e3acd14](https://github.com/swc-project/swc/commit/e3acd1476c2428e5329a359bb7323687c06108d2)) - From 7b7eb48a32537240d3e93a66eba33abfb863f1bd Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 9 Aug 2024 20:13:03 +0000 Subject: [PATCH 7/9] chore: Publish `1.7.10` with `swc_core` `v0.100.6` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index e07e8e985175..02ced2a97043 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.10-nightly-20240809.1" +version = "1.7.10" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.10-nightly-20240809.1" +version = "1.7.10" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.10-nightly-20240809.1" +version = "1.7.10" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.365" +version = "0.91.366" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 580d2502900a..50c7ca5a3305 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.10-nightly-20240809.1" +version = "1.7.10" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 45543a62972c..1c6abd32b800 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.10-nightly-20240809.1" +version = "1.7.10" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 76938cc7f063..59910f6dfe27 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.10-nightly-20240809.1" +version = "1.7.10" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index e1daec350fe2..9ac3f1a6eb92 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.365" +version = "0.91.366" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 48a0b55aab09..6db22ca6e58b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 9cfa403dddeb..394d0aae48ee 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index ae7e0712bb3f..9913dc902a59 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index b0e54a409ec8..9982a60bd065 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 5ddf7b6f9cb5..af9fd5c5a875 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index dc3c6a2ecea8..f461a34f6ee1 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index a02ec53f411f..c18dff002be5 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 983fcf6c7d2d..3b122cbc51c8 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index b94362a48873..1c9eed8935fd 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index a859051673f4..4450416ebeba 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index bca2d1bc1338..24a6fc085add 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index d71056c4eafb..65cf880c5ef6 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index d04636a38a82..09ffb22b0820 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 70d014b13624..2356f21382ec 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 2766502094bb..4424cba96643 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index cce0694fdf68..e8194243dd70 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 41e6b017b616..5b8a3779f387 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 24ada7b69c0d..2c4a2ef6eac5 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index e18a65f17daa..3b96a3bad415 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index ddf7dbef5dc3..b989b2526a78 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 2ac463628830..08fdf8a553ce 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 397c9ca1d5cc..efeb8f8e20ed 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.10-nightly-20240809.1", + "version": "1.7.10", "os": [ "win32" ], From ff4ba2b078103871cd3fcd80a9d26f0ac13d8c84 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 9 Aug 2024 20:13:04 +0000 Subject: [PATCH 8/9] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 340472f43f02..9b8a929299b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.7.10] - 2024-08-09 ### Bug Fixes @@ -1304,9 +1304,6 @@ -- **(es/minifier)** Do not evaluate `slice` calls with negative index ([#8726](https://github.com/swc-project/swc/issues/8726)) ([23f9635](https://github.com/swc-project/swc/commit/23f9635d2cb523d63e5d1611dcf55922bcc54a87)) - - - **(es/minifier)** Handle cyclic references while dropping unused properties ([#8725](https://github.com/swc-project/swc/issues/8725)) ([102241b](https://github.com/swc-project/swc/commit/102241b812b8e815b59575178193bb71b4264bab)) From f4cab32dd2697506c071f69c385986ac481e931b Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Sun, 11 Aug 2024 12:31:43 +0200 Subject: [PATCH 9/9] chore: Mention swc in the license (#9417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change adds mention of SWC in the license otherwise it would be anonymous (and odd 😄 ) --- LICENSE | 2 +- bindings/binding_core_node/LICENSE | 2 +- bindings/binding_core_wasm/LICENSE | 2 +- bindings/binding_minifier_node/LICENSE | 2 +- bindings/binding_minifier_wasm/LICENSE | 2 +- bindings/binding_typescript_wasm/LICENSE | 2 +- packages/helpers/LICENSE | 2 +- packages/types/LICENSE | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/bindings/binding_core_node/LICENSE b/bindings/binding_core_node/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/bindings/binding_core_node/LICENSE +++ b/bindings/binding_core_node/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/bindings/binding_core_wasm/LICENSE b/bindings/binding_core_wasm/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/bindings/binding_core_wasm/LICENSE +++ b/bindings/binding_core_wasm/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/bindings/binding_minifier_node/LICENSE b/bindings/binding_minifier_node/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/bindings/binding_minifier_node/LICENSE +++ b/bindings/binding_minifier_node/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/bindings/binding_minifier_wasm/LICENSE b/bindings/binding_minifier_wasm/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/bindings/binding_minifier_wasm/LICENSE +++ b/bindings/binding_minifier_wasm/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/bindings/binding_typescript_wasm/LICENSE b/bindings/binding_typescript_wasm/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/bindings/binding_typescript_wasm/LICENSE +++ b/bindings/binding_typescript_wasm/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/helpers/LICENSE b/packages/helpers/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/packages/helpers/LICENSE +++ b/packages/helpers/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/packages/types/LICENSE b/packages/types/LICENSE index f8e5e5ea0340..6a08504909fe 100644 --- a/packages/types/LICENSE +++ b/packages/types/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] +Copyright 2024 SWC contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.