@depup/angular-eslint__template-parser 21.3.1-depup.0 → 22.2.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/changes.json +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -4
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/angular-eslint__template-parser
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [@angular-eslint/template-parser](https://www.npmjs.com/package/@angular-eslint/template-parser) @
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [@angular-eslint/template-parser](https://www.npmjs.com/package/@angular-eslint/template-parser) @ 22.2.0 |
|
|
17
|
+
| Processed | 2026-08-30 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,EAEX,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAW,YAAY,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAEtC,KAAK,eAAe,GAAG,GAAG,CAAC;AAE3B,UAAU,IAAI;IAEZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,UAAU,WAAW;IACnB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC9B;AAED,UAAU,KAAM,SAAQ,QAAQ,CAAC,QAAQ;IACv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E,MAAM,EACC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM;CASjC;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,UAAU,GACrB,kBAAkB,CAOpB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,iBAAS,cAAc,CACrB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB;IACD,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;IAChD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE;QACR,6BAA6B,EAAE,OAAO,6BAA6B,CAAC;QACpE,0BAA0B,EAAE,OAAO,0BAA0B,CAAC;KAC/D,CAAC;CACH,CA+DA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,GAAG,CAE/D;AAGD,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC;AAElE,eAAO,MAAM,IAAI;;;CAGhB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -19,6 +19,7 @@ const KEYS = {
|
|
|
19
19
|
Element: ['children', 'inputs', 'outputs', 'attributes'],
|
|
20
20
|
Interpolation: ['expressions'],
|
|
21
21
|
KeyedRead: ['receiver', 'key'],
|
|
22
|
+
SafeKeyedRead: ['receiver', 'key'],
|
|
22
23
|
NonNullAssert: ['expression'],
|
|
23
24
|
PrefixNot: ['expression'],
|
|
24
25
|
Program: ['templateNodes'],
|
|
@@ -49,6 +50,16 @@ const KEYS = {
|
|
|
49
50
|
Content: ['children'],
|
|
50
51
|
LetDeclaration: ['value'],
|
|
51
52
|
ParenthesizedExpression: ['expression'],
|
|
53
|
+
// Angular v22 expression syntax. Without these entries traversal falls back
|
|
54
|
+
// to `getFallbackKeys`, whose filter drops single-object children that do not
|
|
55
|
+
// yet have a `.type` string at preprocess time, silently dropping entire
|
|
56
|
+
// subtrees nested inside these positions.
|
|
57
|
+
// NOTE: `ArrowFunction.parameters` are name-only
|
|
58
|
+
// `ArrowFunctionIdentifierParameter` nodes with no nested expressions, so they
|
|
59
|
+
// intentionally do not need traversal.
|
|
60
|
+
ArrowFunction: ['body'],
|
|
61
|
+
SpreadElement: ['expression'],
|
|
62
|
+
TaggedTemplateLiteral: ['tag', 'template'],
|
|
52
63
|
};
|
|
53
64
|
function fallbackKeysFilter(key) {
|
|
54
65
|
let value = null;
|
|
@@ -221,11 +232,21 @@ function getEndSourceSpanFromAST(ast) {
|
|
|
221
232
|
});
|
|
222
233
|
return endSourceSpan;
|
|
223
234
|
}
|
|
224
|
-
function convertNgAstCommentsToTokens(comments) {
|
|
235
|
+
function convertNgAstCommentsToTokens(comments, code) {
|
|
225
236
|
const commentTokens = comments.map((comment) => {
|
|
237
|
+
// As of Angular v22, the compiler collects TypeScript-style comments
|
|
238
|
+
// written inside an element's opening tag alongside classic HTML
|
|
239
|
+
// `<!-- -->` comments. `//` comments must be surfaced as Line comments so
|
|
240
|
+
// that ESLint applies its inline directive semantics (e.g.
|
|
241
|
+
// `eslint-disable-next-line`) correctly, whereas block-style and HTML
|
|
242
|
+
// comments are Block comments. The compiler does not expose a
|
|
243
|
+
// discriminator on the Comment node, so we inspect the raw source text at
|
|
244
|
+
// the start of the comment's span.
|
|
245
|
+
const type = code.startsWith('//', comment.sourceSpan.start.offset)
|
|
246
|
+
? 'Line'
|
|
247
|
+
: 'Block';
|
|
226
248
|
return {
|
|
227
|
-
|
|
228
|
-
type: 'Block',
|
|
249
|
+
type,
|
|
229
250
|
value: comment.value,
|
|
230
251
|
loc: (0, convert_source_span_to_loc_1.convertNodeSourceSpanToLoc)(comment.sourceSpan),
|
|
231
252
|
range: [comment.sourceSpan.start.offset, comment.sourceSpan.end.offset],
|
|
@@ -276,7 +297,7 @@ function parseForESLint(code, options) {
|
|
|
276
297
|
}
|
|
277
298
|
const ast = {
|
|
278
299
|
type: 'Program',
|
|
279
|
-
comments: convertNgAstCommentsToTokens(ngAstCommentNodes),
|
|
300
|
+
comments: convertNgAstCommentsToTokens(ngAstCommentNodes, code),
|
|
280
301
|
tokens: [],
|
|
281
302
|
range: [0, 0],
|
|
282
303
|
loc: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/angular-eslint__template-parser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.2.0-depup.0",
|
|
4
4
|
"description": "Angular Template parser for ESLint (with updated dependencies)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/angular-eslint/angular-eslint.git",
|
|
11
11
|
"directory": "packages/template-parser"
|
|
12
12
|
},
|
|
13
|
+
"bugs": "https://github.com/angular-eslint/angular-eslint/issues",
|
|
13
14
|
"files": [
|
|
14
15
|
"dist",
|
|
15
16
|
"!**/*.tsbuildinfo",
|
|
@@ -20,10 +21,10 @@
|
|
|
20
21
|
],
|
|
21
22
|
"dependencies": {
|
|
22
23
|
"eslint-scope": "9.1.2",
|
|
23
|
-
"@angular-eslint/bundled-angular-compiler": "
|
|
24
|
+
"@angular-eslint/bundled-angular-compiler": "22.2.0"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
|
-
"eslint": "^
|
|
27
|
+
"eslint": "^9.0.0 || ^10.0.0",
|
|
27
28
|
"typescript": "*"
|
|
28
29
|
},
|
|
29
30
|
"gitHead": "e2006e5e9c99e5a943d1a999e0efa5247d29ec24",
|
|
@@ -39,8 +40,8 @@
|
|
|
39
40
|
"changes": {},
|
|
40
41
|
"depsUpdated": 0,
|
|
41
42
|
"originalPackage": "@angular-eslint/template-parser",
|
|
42
|
-
"originalVersion": "
|
|
43
|
-
"processedAt": "2026-
|
|
43
|
+
"originalVersion": "22.2.0",
|
|
44
|
+
"processedAt": "2026-08-30T16:08:06.444Z",
|
|
44
45
|
"smokeTest": "passed"
|
|
45
46
|
}
|
|
46
47
|
}
|