cspell 7.3.8 → 8.0.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 CHANGED
@@ -451,9 +451,9 @@ By default the flags `gim` are added if no flags are given.
451
451
 
452
452
  The spell checker works in the following way:
453
453
 
454
- 1. Find all text matching `includeRegExp`
455
- 1. Remove any text matching `ignoreRegExp`
456
- 1. Check the remaining text.
454
+ 1. Find all text matching `includeRegExp`
455
+ 1. Remove any text matching `ignoreRegExp`
456
+ 1. Check the remaining text.
457
457
 
458
458
  #### Exclude Example
459
459
 
@@ -185,6 +185,7 @@ function formatQuickFix(issue) {
185
185
  return `fix: (${fixes.join(', ')})`;
186
186
  }
187
187
  class TS extends Array {
188
+ raw;
188
189
  constructor(s) {
189
190
  super(s);
190
191
  this.raw = [s];
@@ -185,6 +185,7 @@ function formatQuickFix(issue) {
185
185
  return `fix: (${fixes.join(', ')})`;
186
186
  }
187
187
  class TS extends Array {
188
+ raw;
188
189
  constructor(s) {
189
190
  super(s);
190
191
  this.raw = [s];
@@ -3,6 +3,17 @@ import { calcExcludeGlobInfo } from '../util/glob.js';
3
3
  import * as util from '../util/util.js';
4
4
  const defaultContextRange = 20;
5
5
  export class LintRequest {
6
+ fileGlobs;
7
+ options;
8
+ reporter;
9
+ uniqueFilter;
10
+ locale;
11
+ configFile;
12
+ excludes;
13
+ root;
14
+ showContext;
15
+ enableGlobDot;
16
+ fileLists;
6
17
  constructor(fileGlobs, options, reporter) {
7
18
  this.fileGlobs = fileGlobs;
8
19
  this.options = options;
@@ -3,6 +3,17 @@ import { calcExcludeGlobInfo } from '../util/glob.mjs';
3
3
  import * as util from '../util/util.mjs';
4
4
  const defaultContextRange = 20;
5
5
  export class LintRequest {
6
+ fileGlobs;
7
+ options;
8
+ reporter;
9
+ uniqueFilter;
10
+ locale;
11
+ configFile;
12
+ excludes;
13
+ root;
14
+ showContext;
15
+ enableGlobDot;
16
+ fileLists;
6
17
  constructor(fileGlobs, options, reporter) {
7
18
  this.fileGlobs = fileGlobs;
8
19
  this.options = options;
@@ -3,6 +3,11 @@ export function simpleRepl() {
3
3
  return new SimpleRepl();
4
4
  }
5
5
  export class SimpleRepl {
6
+ prompt;
7
+ beforeEach;
8
+ completer;
9
+ _history;
10
+ rl;
6
11
  constructor(prompt = '> ') {
7
12
  this.prompt = prompt;
8
13
  this._history = [];
@@ -3,6 +3,11 @@ export function simpleRepl() {
3
3
  return new SimpleRepl();
4
4
  }
5
5
  export class SimpleRepl {
6
+ prompt;
7
+ beforeEach;
8
+ completer;
9
+ _history;
10
+ rl;
6
11
  constructor(prompt = '> ') {
7
12
  this.prompt = prompt;
8
13
  this._history = [];
@@ -2,42 +2,41 @@
2
2
  * Simple reporter for test purposes
3
3
  */
4
4
  export class InMemoryReporter {
5
- constructor() {
6
- this.log = [];
7
- this.errors = [];
8
- this.issueCount = 0;
9
- this.errorCount = 0;
10
- this.debugCount = 0;
11
- this.infoCount = 0;
12
- this.progressCount = 0;
13
- this.issues = [];
14
- this.issue = (issue) => {
15
- this.issues.push(issue);
16
- this.issueCount += 1;
17
- const { uri, row, col, text } = issue;
18
- this.log.push(`Issue: ${uri}[${row}, ${col}]: Unknown word: ${text}`);
19
- };
20
- this.error = (message, error) => {
21
- this.errorCount += 1;
22
- this.errors.push(error);
23
- this.log.push(`Error: ${message} ${error.toString()}`);
24
- };
25
- this.info = (message) => {
26
- this.infoCount += 1;
27
- this.log.push(`Info: ${message}`);
28
- };
29
- this.debug = (message) => {
30
- this.debugCount += 1;
31
- this.log.push(`Debug: ${message}`);
32
- };
33
- this.progress = (p) => {
34
- this.progressCount += 1;
35
- this.log.push(`Progress: ${p.type} ${p.fileNum} ${p.fileCount} ${p.filename}`);
36
- };
37
- this.result = (r) => {
38
- this.runResult = r;
39
- };
40
- this.dump = () => ({ log: this.log, issues: this.issues, runResult: this.runResult });
41
- }
5
+ log = [];
6
+ errors = [];
7
+ issueCount = 0;
8
+ errorCount = 0;
9
+ debugCount = 0;
10
+ infoCount = 0;
11
+ progressCount = 0;
12
+ issues = [];
13
+ runResult;
14
+ issue = (issue) => {
15
+ this.issues.push(issue);
16
+ this.issueCount += 1;
17
+ const { uri, row, col, text } = issue;
18
+ this.log.push(`Issue: ${uri}[${row}, ${col}]: Unknown word: ${text}`);
19
+ };
20
+ error = (message, error) => {
21
+ this.errorCount += 1;
22
+ this.errors.push(error);
23
+ this.log.push(`Error: ${message} ${error.toString()}`);
24
+ };
25
+ info = (message) => {
26
+ this.infoCount += 1;
27
+ this.log.push(`Info: ${message}`);
28
+ };
29
+ debug = (message) => {
30
+ this.debugCount += 1;
31
+ this.log.push(`Debug: ${message}`);
32
+ };
33
+ progress = (p) => {
34
+ this.progressCount += 1;
35
+ this.log.push(`Progress: ${p.type} ${p.fileNum} ${p.fileCount} ${p.filename}`);
36
+ };
37
+ result = (r) => {
38
+ this.runResult = r;
39
+ };
40
+ dump = () => ({ log: this.log, issues: this.issues, runResult: this.runResult });
42
41
  }
43
42
  //# sourceMappingURL=InMemoryReporter.js.map
@@ -2,42 +2,41 @@
2
2
  * Simple reporter for test purposes
3
3
  */
4
4
  export class InMemoryReporter {
5
- constructor() {
6
- this.log = [];
7
- this.errors = [];
8
- this.issueCount = 0;
9
- this.errorCount = 0;
10
- this.debugCount = 0;
11
- this.infoCount = 0;
12
- this.progressCount = 0;
13
- this.issues = [];
14
- this.issue = (issue) => {
15
- this.issues.push(issue);
16
- this.issueCount += 1;
17
- const { uri, row, col, text } = issue;
18
- this.log.push(`Issue: ${uri}[${row}, ${col}]: Unknown word: ${text}`);
19
- };
20
- this.error = (message, error) => {
21
- this.errorCount += 1;
22
- this.errors.push(error);
23
- this.log.push(`Error: ${message} ${error.toString()}`);
24
- };
25
- this.info = (message) => {
26
- this.infoCount += 1;
27
- this.log.push(`Info: ${message}`);
28
- };
29
- this.debug = (message) => {
30
- this.debugCount += 1;
31
- this.log.push(`Debug: ${message}`);
32
- };
33
- this.progress = (p) => {
34
- this.progressCount += 1;
35
- this.log.push(`Progress: ${p.type} ${p.fileNum} ${p.fileCount} ${p.filename}`);
36
- };
37
- this.result = (r) => {
38
- this.runResult = r;
39
- };
40
- this.dump = () => ({ log: this.log, issues: this.issues, runResult: this.runResult });
41
- }
5
+ log = [];
6
+ errors = [];
7
+ issueCount = 0;
8
+ errorCount = 0;
9
+ debugCount = 0;
10
+ infoCount = 0;
11
+ progressCount = 0;
12
+ issues = [];
13
+ runResult;
14
+ issue = (issue) => {
15
+ this.issues.push(issue);
16
+ this.issueCount += 1;
17
+ const { uri, row, col, text } = issue;
18
+ this.log.push(`Issue: ${uri}[${row}, ${col}]: Unknown word: ${text}`);
19
+ };
20
+ error = (message, error) => {
21
+ this.errorCount += 1;
22
+ this.errors.push(error);
23
+ this.log.push(`Error: ${message} ${error.toString()}`);
24
+ };
25
+ info = (message) => {
26
+ this.infoCount += 1;
27
+ this.log.push(`Info: ${message}`);
28
+ };
29
+ debug = (message) => {
30
+ this.debugCount += 1;
31
+ this.log.push(`Debug: ${message}`);
32
+ };
33
+ progress = (p) => {
34
+ this.progressCount += 1;
35
+ this.log.push(`Progress: ${p.type} ${p.fileNum} ${p.fileCount} ${p.filename}`);
36
+ };
37
+ result = (r) => {
38
+ this.runResult = r;
39
+ };
40
+ dump = () => ({ log: this.log, issues: this.issues, runResult: this.runResult });
42
41
  }
43
42
  //# sourceMappingURL=InMemoryReporter.mjs.map
@@ -20,14 +20,21 @@ const META_DATA_VERSION_SUFFIX = '-' + META_DATA_BASE_VERSION + '-' + Object.key
20
20
  * Caches cspell results on disk
21
21
  */
22
22
  export class DiskCache {
23
+ useCheckSum;
24
+ cspellVersion;
25
+ useUniversalCache;
26
+ cacheFileLocation;
27
+ cacheDir;
28
+ fileEntryCache;
29
+ dependencyCache = new Map();
30
+ dependencyCacheTree = {};
31
+ objectCollection = new ShallowObjectCollection();
32
+ ocCacheFileResult = new ShallowObjectCollection();
33
+ version;
23
34
  constructor(cacheFileLocation, useCheckSum, cspellVersion, useUniversalCache) {
24
35
  this.useCheckSum = useCheckSum;
25
36
  this.cspellVersion = cspellVersion;
26
37
  this.useUniversalCache = useUniversalCache;
27
- this.dependencyCache = new Map();
28
- this.dependencyCacheTree = {};
29
- this.objectCollection = new ShallowObjectCollection();
30
- this.ocCacheFileResult = new ShallowObjectCollection();
31
38
  this.cacheFileLocation = resolvePath(cacheFileLocation);
32
39
  this.cacheDir = dirname(this.cacheFileLocation);
33
40
  this.fileEntryCache = createFromFile(this.cacheFileLocation, useCheckSum, useUniversalCache);
@@ -20,14 +20,21 @@ const META_DATA_VERSION_SUFFIX = '-' + META_DATA_BASE_VERSION + '-' + Object.key
20
20
  * Caches cspell results on disk
21
21
  */
22
22
  export class DiskCache {
23
+ useCheckSum;
24
+ cspellVersion;
25
+ useUniversalCache;
26
+ cacheFileLocation;
27
+ cacheDir;
28
+ fileEntryCache;
29
+ dependencyCache = new Map();
30
+ dependencyCacheTree = {};
31
+ objectCollection = new ShallowObjectCollection();
32
+ ocCacheFileResult = new ShallowObjectCollection();
33
+ version;
23
34
  constructor(cacheFileLocation, useCheckSum, cspellVersion, useUniversalCache) {
24
35
  this.useCheckSum = useCheckSum;
25
36
  this.cspellVersion = cspellVersion;
26
37
  this.useUniversalCache = useUniversalCache;
27
- this.dependencyCache = new Map();
28
- this.dependencyCacheTree = {};
29
- this.objectCollection = new ShallowObjectCollection();
30
- this.ocCacheFileResult = new ShallowObjectCollection();
31
38
  this.cacheFileLocation = resolvePath(cacheFileLocation);
32
39
  this.cacheDir = dirname(this.cacheFileLocation);
33
40
  this.fileEntryCache = createFromFile(this.cacheFileLocation, useCheckSum, useUniversalCache);
@@ -1,9 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  const compare = Intl.Collator().compare;
3
3
  export class ShallowObjectCollection {
4
- constructor() {
5
- this.tree = {};
6
- }
4
+ tree = {};
7
5
  get(v) {
8
6
  if (typeof v !== 'object' || v === null) {
9
7
  return v;
@@ -35,9 +33,7 @@ export class ShallowObjectCollection {
35
33
  }
36
34
  }
37
35
  export class Collection {
38
- constructor() {
39
- this.col = { contains: new Map() };
40
- }
36
+ col = { contains: new Map() };
41
37
  /**
42
38
  * Add a plain object to the collection.
43
39
  * The actual object used is returned.
@@ -1,9 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  const compare = Intl.Collator().compare;
3
3
  export class ShallowObjectCollection {
4
- constructor() {
5
- this.tree = {};
6
- }
4
+ tree = {};
7
5
  get(v) {
8
6
  if (typeof v !== 'object' || v === null) {
9
7
  return v;
@@ -35,9 +33,7 @@ export class ShallowObjectCollection {
35
33
  }
36
34
  }
37
35
  export class Collection {
38
- constructor() {
39
- this.col = { contains: new Map() };
40
- }
36
+ col = { contains: new Map() };
41
37
  /**
42
38
  * Add a plain object to the collection.
43
39
  * The actual object used is returned.
@@ -1,11 +1,14 @@
1
1
  import { format } from 'util';
2
2
  export class CheckFailed extends Error {
3
+ exitCode;
3
4
  constructor(message, exitCode = 1) {
4
5
  super(message);
5
6
  this.exitCode = exitCode;
6
7
  }
7
8
  }
8
9
  export class ApplicationError extends Error {
10
+ exitCode;
11
+ cause;
9
12
  constructor(message, exitCode = 1, cause) {
10
13
  super(message);
11
14
  this.exitCode = exitCode;
@@ -13,6 +16,7 @@ export class ApplicationError extends Error {
13
16
  }
14
17
  }
15
18
  export class IOError extends ApplicationError {
19
+ cause;
16
20
  constructor(message, cause) {
17
21
  super(message, undefined, cause);
18
22
  this.cause = cause;
@@ -1,11 +1,14 @@
1
1
  import { format } from 'util';
2
2
  export class CheckFailed extends Error {
3
+ exitCode;
3
4
  constructor(message, exitCode = 1) {
4
5
  super(message);
5
6
  this.exitCode = exitCode;
6
7
  }
7
8
  }
8
9
  export class ApplicationError extends Error {
10
+ exitCode;
11
+ cause;
9
12
  constructor(message, exitCode = 1, cause) {
10
13
  super(message);
11
14
  this.exitCode = exitCode;
@@ -13,6 +16,7 @@ export class ApplicationError extends Error {
13
16
  }
14
17
  }
15
18
  export class IOError extends ApplicationError {
19
+ cause;
16
20
  constructor(message, cause) {
17
21
  super(message, undefined, cause);
18
22
  this.cause = cause;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell",
3
- "version": "7.3.8",
3
+ "version": "8.0.0",
4
4
  "description": "A Spelling Checker for Code!",
5
5
  "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
6
6
  "bin": {
@@ -80,18 +80,18 @@
80
80
  },
81
81
  "homepage": "https://streetsidesoftware.github.io/cspell/",
82
82
  "dependencies": {
83
- "@cspell/cspell-json-reporter": "7.3.8",
84
- "@cspell/cspell-pipe": "7.3.8",
85
- "@cspell/cspell-types": "7.3.8",
86
- "@cspell/dynamic-import": "7.3.8",
83
+ "@cspell/cspell-json-reporter": "8.0.0",
84
+ "@cspell/cspell-pipe": "8.0.0",
85
+ "@cspell/cspell-types": "8.0.0",
86
+ "@cspell/dynamic-import": "8.0.0",
87
87
  "chalk": "^5.3.0",
88
88
  "chalk-template": "^1.1.0",
89
89
  "commander": "^11.1.0",
90
- "cspell-gitignore": "7.3.8",
91
- "cspell-glob": "7.3.8",
92
- "cspell-io": "7.3.8",
93
- "cspell-lib": "7.3.8",
94
- "fast-glob": "^3.3.1",
90
+ "cspell-gitignore": "8.0.0",
91
+ "cspell-glob": "8.0.0",
92
+ "cspell-io": "8.0.0",
93
+ "cspell-lib": "8.0.0",
94
+ "fast-glob": "^3.3.2",
95
95
  "fast-json-stable-stringify": "^2.1.0",
96
96
  "file-entry-cache": "^7.0.1",
97
97
  "get-stdin": "^9.0.0",
@@ -100,15 +100,15 @@
100
100
  "vscode-uri": "^3.0.8"
101
101
  },
102
102
  "engines": {
103
- "node": ">=16"
103
+ "node": ">=18"
104
104
  },
105
105
  "devDependencies": {
106
- "@types/file-entry-cache": "^5.0.2",
106
+ "@types/file-entry-cache": "^5.0.4",
107
107
  "@types/glob": "^8.1.0",
108
- "@types/micromatch": "^4.0.3",
109
- "@types/semver": "^7.5.3",
108
+ "@types/micromatch": "^4.0.4",
109
+ "@types/semver": "^7.5.4",
110
110
  "micromatch": "^4.0.5",
111
111
  "minimatch": "^9.0.3"
112
112
  },
113
- "gitHead": "6717f5726b74c695d9023dbccf6f7e8a7ac6361f"
113
+ "gitHead": "67c22bf98baed1c17bbc658fba8656262d17e370"
114
114
  }