Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into regexpp
Browse files Browse the repository at this point in the history
  • Loading branch information
leaysgur committed Jul 5, 2024
2 parents f1699a8 + 74aae10 commit 858f041
Show file tree
Hide file tree
Showing 61 changed files with 982 additions and 342 deletions.
38 changes: 19 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,25 @@ cargo_common_metadata = "allow" # TODO: fix this

[workspace.dependencies]
# publish = true
oxc = { version = "0.16.3", path = "crates/oxc" }
oxc_allocator = { version = "0.16.3", path = "crates/oxc_allocator" }
oxc_ast = { version = "0.16.3", path = "crates/oxc_ast" }
oxc_codegen = { version = "0.16.3", path = "crates/oxc_codegen" }
oxc_diagnostics = { version = "0.16.3", path = "crates/oxc_diagnostics" }
oxc_index = { version = "0.16.3", path = "crates/oxc_index" }
oxc_minifier = { version = "0.16.3", path = "crates/oxc_minifier" }
oxc_parser = { version = "0.16.3", path = "crates/oxc_parser" }
oxc_semantic = { version = "0.16.3", path = "crates/oxc_semantic" }
oxc_span = { version = "0.16.3", path = "crates/oxc_span" }
oxc_syntax = { version = "0.16.3", path = "crates/oxc_syntax" }
oxc_transformer = { version = "0.16.3", path = "crates/oxc_transformer" }
oxc_sourcemap = { version = "0.16.3", path = "crates/oxc_sourcemap" }
oxc_ast_macros = { version = "0.16.3", path = "crates/oxc_ast_macros" }
oxc_traverse = { version = "0.16.3", path = "crates/oxc_traverse" }
oxc_module_lexer = { version = "0.16.3", path = "crates/oxc_module_lexer" }
oxc_cfg = { version = "0.16.3", path = "crates/oxc_cfg" }
oxc_isolated_declarations = { version = "0.16.3", path = "crates/oxc_isolated_declarations" }
oxc_transform_napi = { version = "0.16.3", path = "napi/transform" }
oxc = { version = "0.17.0", path = "crates/oxc" }
oxc_allocator = { version = "0.17.0", path = "crates/oxc_allocator" }
oxc_ast = { version = "0.17.0", path = "crates/oxc_ast" }
oxc_codegen = { version = "0.17.0", path = "crates/oxc_codegen" }
oxc_diagnostics = { version = "0.17.0", path = "crates/oxc_diagnostics" }
oxc_index = { version = "0.17.0", path = "crates/oxc_index" }
oxc_minifier = { version = "0.17.0", path = "crates/oxc_minifier" }
oxc_parser = { version = "0.17.0", path = "crates/oxc_parser" }
oxc_semantic = { version = "0.17.0", path = "crates/oxc_semantic" }
oxc_span = { version = "0.17.0", path = "crates/oxc_span" }
oxc_syntax = { version = "0.17.0", path = "crates/oxc_syntax" }
oxc_transformer = { version = "0.17.0", path = "crates/oxc_transformer" }
oxc_sourcemap = { version = "0.17.0", path = "crates/oxc_sourcemap" }
oxc_ast_macros = { version = "0.17.0", path = "crates/oxc_ast_macros" }
oxc_traverse = { version = "0.17.0", path = "crates/oxc_traverse" }
oxc_module_lexer = { version = "0.17.0", path = "crates/oxc_module_lexer" }
oxc_cfg = { version = "0.17.0", path = "crates/oxc_cfg" }
oxc_isolated_declarations = { version = "0.17.0", path = "crates/oxc_isolated_declarations" }
oxc_transform_napi = { version = "0.17.0", path = "napi/transform" }

# publish = false
oxc_macros = { path = "crates/oxc_macros" }
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc"
version = "0.16.3"
version = "0.17.0"
publish = true
authors.workspace = true
description.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_allocator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc_allocator"
version = "0.16.3"
version = "0.17.0"
authors.workspace = true
description.workspace = true
edition.workspace = true
Expand Down
23 changes: 23 additions & 0 deletions crates/oxc_ast/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project does not adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) until v1.0.0.

## [0.17.0] - 2024-07-05

- e32b4bc ast: [**BREAKING**] Store trivia comments in a sorted slice (#4045) (Luca Bruno)

- 1df6ac0 ast: [**BREAKING**] Rename `visit_enum_memeber` to `visit_ts_enum_member`. (#4000) (rzvxa)

- 4a0eaa0 ast: [**BREAKING**] Rename `visit_enum` to `visit_ts_enum_declaration`. (#3998) (rzvxa)

- c98d8aa ast: [**BREAKING**] Rename `visit_arrow_expression` to `visit_arrow_function_expression`. (#3995) (rzvxa)

### Features

- 1854a52 ast_codegen: Introduce the `#[span]` hint. (#4012) (rzvxa)
- 7538af1 ast_codegen: Add visit generator (#3954) (rzvxa)

### Bug Fixes

- 05a047c isolated-declarations: Method following an abstract method gets dropped (#4024) (Dunqing)

### Refactor

- b51f75b ast_codegen: No longer outputs discard variable for empty visitors. (#4008) (rzvxa)

## [0.16.3] - 2024-07-02

### Features
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc_ast"
version = "0.16.3"
version = "0.17.0"
authors.workspace = true
description.workspace = true
edition.workspace = true
Expand Down
7 changes: 7 additions & 0 deletions crates/oxc_ast_macros/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project does not adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) until v1.0.0.

## [0.17.0] - 2024-07-05

### Features

- 1854a52 ast_codegen: Introduce the `#[span]` hint. (#4012) (rzvxa)
- 7538af1 ast_codegen: Add visit generator (#3954) (rzvxa)

## [0.16.0] - 2024-06-26

### Refactor
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc_ast_macros"
version = "0.16.3"
version = "0.17.0"
publish = true
authors.workspace = true
description.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_cfg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc_cfg"
version = "0.16.3"
version = "0.17.0"
publish = true
authors.workspace = true
description.workspace = true
Expand Down
13 changes: 13 additions & 0 deletions crates/oxc_codegen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project does not adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) until v1.0.0.

## [0.17.0] - 2024-07-05

### Features

- 7768d23 isolated-declarations: Support optional class methods (#4035) (Egor Blinov)

### Bug Fixes

- aaac2d8 codegen: Preserve parentheses from AST instead calculating from operator precedence (#4055) (Boshen)
- 5e5b1b1 codegen: Correct accessibility emit for class formal-parameters/methods/properties (#4042) (Egor Blinov)
- 7844734 codegen: Missing const keyword in TSTypeParamter (#4022) (Dunqing)
- 6254a41 codegen: Missing TypeParamters in TSCallSignature (#4021) (Dunqing)

## [0.16.3] - 2024-07-02

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oxc_codegen"
version = "0.16.3"
version = "0.17.0"
publish = true
authors.workspace = true
description.workspace = true
Expand Down
21 changes: 14 additions & 7 deletions crates/oxc_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for Expression<'a> {
Self::ClassExpression(expr) => expr.gen(p, ctx),
Self::JSXElement(el) => el.gen(p, ctx),
Self::JSXFragment(fragment) => fragment.gen(p, ctx),
Self::ParenthesizedExpression(e) => e.expression.gen_expr(p, precedence, ctx),
Self::ParenthesizedExpression(e) => e.gen_expr(p, precedence, ctx),
Self::TSAsExpression(e) => e.gen_expr(p, precedence, ctx),
Self::TSSatisfiesExpression(e) => {
e.expression.gen_expr(p, precedence, ctx);
Expand All @@ -1067,6 +1067,14 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for Expression<'a> {
}
}

impl<'a, const MINIFY: bool> GenExpr<MINIFY> for TSAsExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
self.expression.gen_expr(p, precedence, ctx);
p.print_str(b" as ");
self.type_annotation.gen(p, ctx);
}
}

impl<const MINIFY: bool> GenComment<MINIFY> for ArrowFunctionExpression<'_> {
fn gen_comment(&self, codegen: &mut Codegen<{ MINIFY }>, _ctx: Context) {
gen_comment(self.span.start, codegen);
Expand All @@ -1079,15 +1087,14 @@ impl<const MINIFY: bool> GenComment<MINIFY> for Function<'_> {
}
}

impl<'a, const MINIFY: bool> GenExpr<MINIFY> for TSAsExpression<'a> {
impl<'a, const MINIFY: bool> GenExpr<MINIFY> for ParenthesizedExpression<'a> {
fn gen_expr(&self, p: &mut Codegen<{ MINIFY }>, precedence: Precedence, ctx: Context) {
p.print_str(b"(");
self.expression.gen_expr(p, precedence, ctx);
p.print_str(b" as ");
self.type_annotation.gen(p, ctx);
p.print_str(b")");
}
}

impl<'a, const MINIFY: bool> Gen<MINIFY> for IdentifierReference<'a> {
fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) {
// if let Some(mangler) = &p.mangler {
Expand Down Expand Up @@ -2062,9 +2069,9 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for NewExpression<'a> {
p.add_source_mapping(self.span.start);
p.print_str(b"new ");
self.callee.gen_expr(p, Precedence::NewWithoutArgs, ctx.and_forbid_call(true));
p.wrap(true, |p| {
p.print_list(&self.arguments, ctx);
});
p.print(b'(');
p.print_list(&self.arguments, ctx);
p.print(b')');
});
}
}
Expand Down
Loading

0 comments on commit 858f041

Please sign in to comment.