Skip to content

Commit 2db7893

Browse files
authored
Remove workaround for Angular bug (#339)
1 parent 35d9765 commit 2db7893

File tree

3 files changed

+247
-155
lines changed

3 files changed

+247
-155
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
"release": "release-it"
2828
},
2929
"devDependencies": {
30-
"@angular/compiler": "20.1.0",
30+
"@angular/compiler": "20.1.2",
3131
"@babel/code-frame": "7.27.1",
3232
"@babel/parser": "7.28.0",
3333
"@babel/types": "7.28.1",
3434
"@types/babel__code-frame": "7.0.6",
35-
"@types/node": "24.0.13",
35+
"@types/node": "24.0.14",
3636
"@vitest/coverage-v8": "3.2.4",
3737
"del-cli": "6.0.0",
3838
"eslint": "9.31.0",
@@ -44,13 +44,13 @@
4444
"lines-and-columns": "2.0.4",
4545
"npm-run-all2": "8.0.4",
4646
"prettier": "3.6.2",
47-
"release-it": "19.0.3",
47+
"release-it": "19.0.4",
4848
"typescript": "5.8.3",
49-
"typescript-eslint": "8.36.0",
49+
"typescript-eslint": "8.37.0",
5050
"vitest": "3.2.4"
5151
},
5252
"peerDependencies": {
53-
"@angular/compiler": "^20.1.0"
53+
"@angular/compiler": "^20.1.2"
5454
},
5555
"engines": {
5656
"node": ">= 20"

src/transform-node.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,19 +276,13 @@ class Transformer extends Source {
276276
node instanceof angular.KeyedRead ||
277277
node instanceof angular.SafeKeyedRead
278278
) {
279-
// TODO: Use `node.sourceSpan.end` directly
280-
// https://github.com/angular/angular/issues/62617
281-
const end =
282-
this.text.charAt(node.sourceSpan.end - 1) === '='
283-
? this.getCharacterLastIndex(/\S/, node.sourceSpan.end - 2) + 1
284-
: node.sourceSpan.end;
285279
return this.#transformReceiverAndName(
286280
node.receiver,
287281
this.#transform<babel.Expression>(node.key),
288282
{
289283
computed: true,
290284
optional: node instanceof angular.SafeKeyedRead,
291-
end: end, // ]
285+
end: node.sourceSpan.end, // ]
292286
hasParentParens: isInParentParens,
293287
},
294288
);

0 commit comments

Comments
 (0)