Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"release": "release-it"
},
"devDependencies": {
"@angular/compiler": "21.1.0-rc.0",
"@angular/compiler": "21.1.0",
"@babel/code-frame": "8.0.0-beta.3",
"@babel/parser": "8.0.0-beta.3",
"@babel/types": "8.0.0-beta.3",
Expand Down
14 changes: 2 additions & 12 deletions src/ast-transform/transforms/transform-binary-expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import type * as babel from '@babel/types';

import { type NodeTransformer } from '../node-transformer.ts';

const isAssignmentOperator = (
operator: Binary['operation'],
): operator is babel.AssignmentExpression['operator'] =>
Binary.isAssignmentOperation(operator);

const isLogicalOperator = (
operator: Binary['operation'],
): operator is babel.LogicalExpression['operator'] =>
Expand All @@ -30,7 +25,7 @@ export const visitBinary = (
return { type: 'LogicalExpression', operator, left, right };
}

if (isAssignmentOperator(operator)) {
if (Binary.isAssignmentOperation(operator)) {
return {
type: 'AssignmentExpression',
left: left as babel.AssignmentExpression['left'],
Expand All @@ -39,10 +34,5 @@ export const visitBinary = (
};
}

return {
left,
right,
type: 'BinaryExpression',
operator: operator as babel.BinaryExpression['operator'],
};
return { left, right, type: 'BinaryExpression', operator: operator };
};
2 changes: 1 addition & 1 deletion src/ast-transform/transforms/transform-unary-expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ export const visitUnary = (
type: 'UnaryExpression',
prefix: true,
argument: transformer.transformChild<babel.Expression>(node.expr),
operator: node.operator as '-' | '+',
operator: node.operator,
});
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ __metadata:
version: 8
cacheKey: 10

"@angular/compiler@npm:21.1.0-rc.0":
version: 21.1.0-rc.0
resolution: "@angular/compiler@npm:21.1.0-rc.0"
"@angular/compiler@npm:21.1.0":
version: 21.1.0
resolution: "@angular/compiler@npm:21.1.0"
dependencies:
tslib: "npm:^2.3.0"
checksum: 10/a4721142e932fe62b27a5e383b540ccb83cd2ca456e8ff3bdd62be1022f46b46d224213108b1186978de5f0d6e6916e7c074fb4270b16818f66b155f53531ac5
checksum: 10/1f409c20eb36079719e004f9e683a41d9d9fd975d814132faa28f941a0d491ba392c7cca92061f8dbe540bd922cac905f76ccab48a87c82c764b3b7cdb6b28dd
languageName: node
linkType: hard

Expand Down Expand Up @@ -1565,7 +1565,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "angular-estree-parser@workspace:."
dependencies:
"@angular/compiler": "npm:21.1.0-rc.0"
"@angular/compiler": "npm:21.1.0"
"@babel/code-frame": "npm:8.0.0-beta.3"
"@babel/parser": "npm:8.0.0-beta.3"
"@babel/types": "npm:8.0.0-beta.3"
Expand Down