ember-eslint-parser 0.14.2 → 0.14.4

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.2",
3
+ "version": "0.14.4",
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:\"",
@@ -279,8 +279,11 @@ export const replaceRange = function replaceRange(s, start, end, substitute) {
279
279
  };
280
280
 
281
281
  function maskTemplateContentForLint(content) {
282
- // Preserve line endings and UTF-16 length, but remove template syntax from the JS placeholder.
283
- return content.replace(/[^\r\n]/g, ' ');
282
+ // Must produce byte-identical output to ember-estree's toPlaceholderJS
283
+ // masking, or typescript-eslint sees two different contents for the same
284
+ // .gts file (disk read vs lint parse) and invalidates + rebuilds the
285
+ // program on every file.
286
+ return content.replace(/[`$]/g, ' ');
284
287
  }
285
288
 
286
289
  const processor = new Preprocessor();
@@ -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 {