Skip to content

Commit 6be7050

Browse files
renovate[bot]CopilotBrooooooklyn
authored
chore(deps): update oxc to ^0.149.0 (#468)
* chore(deps): update oxc to ^0.149.0 * fix: adapt to oxc 0.149.0 ParserReturn API changes The `panicked` field on `ParserReturn` was renamed to `fatal_error` in oxc_parser 0.149.0. Update all 5 usages across transform.rs, linker, optimizer, and oxc_converter. Also remove the now-unused `transform_expressions_in_expression` import in expand_safe_reads.rs. Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Brooooooklyn <3468483+Brooooooklyn@users.noreply.github.com>
1 parent d71c686 commit 6be7050

9 files changed

Lines changed: 225 additions & 227 deletions

File tree

Cargo.lock

Lines changed: 38 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ multiple_crate_versions = "allow"
8787

8888
[workspace.dependencies]
8989
# External oxc crates from crates.io
90-
oxc_allocator = "0.147"
91-
oxc_ast = "0.147"
92-
oxc_ast_visit = "0.147"
93-
oxc_diagnostics = "0.147"
94-
oxc_napi = "0.147"
95-
oxc_parser = "0.147"
96-
oxc_semantic = "0.147"
97-
oxc_span = "0.147"
98-
oxc_syntax = "0.147"
90+
oxc_allocator = "0.149"
91+
oxc_ast = "0.149"
92+
oxc_ast_visit = "0.149"
93+
oxc_diagnostics = "0.149"
94+
oxc_napi = "0.149"
95+
oxc_parser = "0.149"
96+
oxc_semantic = "0.149"
97+
oxc_span = "0.149"
98+
oxc_syntax = "0.149"
9999
oxc_sourcemap = "8.0.0"
100-
oxc_str = "0.147"
101-
oxc_transformer = "0.147"
102-
oxc_codegen = "0.147"
100+
oxc_str = "0.149"
101+
oxc_transformer = "0.149"
102+
oxc_codegen = "0.149"
103103

104104
# Internal
105105
oxc_angular_compiler = { path = "crates/oxc_angular_compiler" }

crates/oxc_angular_compiler/src/component/transform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ fn remove_parameter_property_fields(
19711971
fn strip_typescript(allocator: &Allocator, path: &str, code: &str) -> String {
19721972
let source_type = SourceType::from_path(path).unwrap_or_default();
19731973
let parser_ret = Parser::new(allocator, code, source_type).parse();
1974-
if parser_ret.panicked {
1974+
if parser_ret.fatal_error {
19751975
return code.to_string();
19761976
}
19771977

crates/oxc_angular_compiler/src/linker/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn link(allocator: &Allocator, code: &str, filename: &str) -> LinkResult {
9292
let source_type = SourceType::from_path(filename).unwrap_or(SourceType::mjs());
9393
let parser_result = Parser::new(allocator, code, source_type).parse();
9494

95-
if parser_result.panicked || !parser_result.diagnostics.is_empty() {
95+
if parser_result.fatal_error || !parser_result.diagnostics.is_empty() {
9696
return LinkResult { code: code.to_string(), map: None, linked: false };
9797
}
9898

crates/oxc_angular_compiler/src/optimizer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub fn optimize(
119119
let parser_result = Parser::new(allocator, code, source_type).parse();
120120

121121
// If parsing failed, return original code
122-
if parser_result.panicked || !parser_result.diagnostics.is_empty() {
122+
if parser_result.fatal_error || !parser_result.diagnostics.is_empty() {
123123
return OptimizeResult { code: code.to_string(), map: None };
124124
}
125125

crates/oxc_angular_compiler/src/output/oxc_converter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ fn strip_expression_types(expr_source: &str) -> String {
716716
let wrapped = format!("0,({expr_source})");
717717
let source_type = oxc_span::SourceType::mjs();
718718
let parser_ret = oxc_parser::Parser::new(&allocator, &wrapped, source_type).parse();
719-
if !parser_ret.panicked && parser_ret.diagnostics.is_empty() {
719+
if !parser_ret.fatal_error && parser_ret.diagnostics.is_empty() {
720720
return expr_source.to_string();
721721
}
722722
}
@@ -728,7 +728,7 @@ fn strip_expression_types(expr_source: &str) -> String {
728728
let source_type = oxc_span::SourceType::ts().with_module(true);
729729
let parser_ret = oxc_parser::Parser::new(&allocator, &wrapped, source_type).parse();
730730

731-
if parser_ret.panicked {
731+
if parser_ret.fatal_error {
732732
return expr_source.to_string();
733733
}
734734

crates/oxc_angular_compiler/src/pipeline/phases/expand_safe_reads.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ use oxc_str::Ident;
7777
use crate::ir::expression::{
7878
AssignTemporaryExpr, IrExpression, ReadTemporaryExpr, ResolvedCallExpr, ResolvedKeyedReadExpr,
7979
ResolvedPropertyReadExpr, SafeTernaryExpr, VisitorContextFlag,
80-
transform_expressions_in_create_op, transform_expressions_in_expression,
81-
transform_expressions_in_update_op,
80+
transform_expressions_in_create_op, transform_expressions_in_update_op,
8281
};
8382
use crate::ir::ops::XrefId;
8483
use crate::pipeline::compilation::{ComponentCompilationJob, HostBindingCompilationJob};

napi/angular-compiler/e2e/compare/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"@oxc-node/cli": "catalog:",
3434
"@oxc-node/core": "catalog:",
3535
"@types/node": "catalog:",
36-
"oxc-parser": "^0.147.0",
37-
"oxc-transform": "^0.147.0",
36+
"oxc-parser": "^0.149.0",
37+
"oxc-transform": "^0.149.0",
3838
"oxfmt": "catalog:",
3939
"typescript": "catalog:",
4040
"vitest": "catalog:"

0 commit comments

Comments
 (0)