ember-eslint-parser 0.14.3 → 0.14.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-eslint-parser",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -33,9 +33,9 @@
33
33
  "@babel/core": "^7.23.6",
34
34
  "@babel/eslint-parser": "^7.28.6",
35
35
  "@babel/plugin-proposal-decorators": "^7.25.9",
36
- "@typescript-eslint/parser": "^7.1.0",
37
- "@typescript-eslint/scope-manager": "^7.1.0",
38
- "@typescript-eslint/visitor-keys": "^7.1.0",
36
+ "@typescript-eslint/parser": "^8.0.0",
37
+ "@typescript-eslint/scope-manager": "^8.0.0",
38
+ "@typescript-eslint/visitor-keys": "^8.0.0",
39
39
  "concurrently": "^8.2.2",
40
40
  "eslint": "^8.0.1",
41
41
  "eslint-config-prettier": "^9.1.0",
@@ -72,6 +72,8 @@
72
72
  "scripts": {
73
73
  "bench": "./scripts/run-bench.sh tests/parser.bench.mjs",
74
74
  "bench:compare": "node scripts/bench-compare.mjs",
75
+ "bench:project": "./scripts/run-bench.sh tests/project.bench.mjs",
76
+ "bench:project:compare": "node scripts/bench-compare.mjs --bench tests/project.bench.mjs",
75
77
  "bench:summary": "./scripts/local-bench-summary.sh",
76
78
  "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
77
79
  "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
@@ -36,8 +36,16 @@ try {
36
36
  readFile(fname) {
37
37
  let fileName = fname;
38
38
  let content = '';
39
- if (fileName.endsWith('tsconfig.tsbuildinfo')) {
40
- return content;
39
+ if (fileName.endsWith('.tsbuildinfo')) {
40
+ // Incremental build state is optional and never a .gts/.gjs file, so
41
+ // delegate to the real host: it returns the content when present and
42
+ // reports a missing file as absent (undefined) instead of throwing.
43
+ // The watch program reads `tsBuildInfoFile` without a fileExists
44
+ // probe (readBuilderProgram -> host.readFile), so a fresh/cleaned
45
+ // project with a custom buildinfo path (e.g.
46
+ // "declarations/.tsbuildinfo") would otherwise abort linting of
47
+ // every file with a Parsing error: ENOENT.
48
+ return sys.readFile(fileName);
41
49
  }
42
50
 
43
51
  try {
@@ -147,6 +155,14 @@ try {
147
155
  originalFileName: virtualSourceFile.originalFileName,
148
156
  resolvedPath: virtualSourceFile.resolvedPath,
149
157
  impliedNodeFormat: virtualSourceFile.impliedNodeFormat,
158
+ // The twin is a .mts/.mjs, so its script kind has to stay the one the language
159
+ // service host reports for that extension. Inheriting the .gts/.gjs file's
160
+ // Deferred kind makes TypeScript's getOrCreateSourceFileByPath see a script-kind
161
+ // mismatch on the next program sync, and it responds by releasing and
162
+ // re-acquiring the document instead of updating it — a full re-parse of every
163
+ // twin, on every parse. It never settles either: the re-acquired file comes back
164
+ // as TS, and the next call to this function stamps it back to Deferred.
165
+ scriptKind: virtualSourceFile.scriptKind,
150
166
  };
151
167
  Object.assign(virtualSourceFile, sourceFile, keep);
152
168
  virtualSourceFile[virtualFlag] = true;