cspell 10.0.0 → 10.0.1
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/dist/esm/app.d.ts +1 -1
- package/dist/esm/app.js +1 -1
- package/dist/esm/{application-DYrUtKeK.d.ts → application-BXlOXgoM.d.ts} +2 -2
- package/dist/esm/{application-BeNl-OE0.js → application-Ck3Auwvx.js} +37 -19
- package/dist/esm/application.d.ts +2 -2
- package/dist/esm/application.js +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/{options-1v2EW2_1.d.ts → options-CShRqKvy.d.ts} +1 -1
- package/package.json +17 -17
package/dist/esm/app.d.ts
CHANGED
package/dist/esm/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ApplicationError, S as width, T as console, _ as padLeft, a as parseApplicationFeatureFlags, b as pruneAnsiTextEnd, c as listDictionaries, d as validateUnitSize, f as unindent, g as tableToLines, i as lint, l as ReportChoicesAll, m as npmPackage, n as checkText, o as suggestions, p as DEFAULT_CACHE_LOCATION, r as createInit, s as trace, t as IncludeExcludeFlag, u as cvtLinterCliCommandOptionsToLinterCliOptions, v as padWidth, w as CheckFailed, x as pruneAnsiTextStart, y as ansiWidth } from "./application-
|
|
1
|
+
import { C as ApplicationError, S as width, T as console, _ as padLeft, a as parseApplicationFeatureFlags, b as pruneAnsiTextEnd, c as listDictionaries, d as validateUnitSize, f as unindent, g as tableToLines, i as lint, l as ReportChoicesAll, m as npmPackage, n as checkText, o as suggestions, p as DEFAULT_CACHE_LOCATION, r as createInit, s as trace, t as IncludeExcludeFlag, u as cvtLinterCliCommandOptionsToLinterCliOptions, v as padWidth, w as CheckFailed, x as pruneAnsiTextStart, y as ansiWidth } from "./application-Ck3Auwvx.js";
|
|
2
2
|
import { Link } from "cspell-lib";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import * as iPath from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SuggestionOptions, i as LinterCliOptions, n as DictionariesOptions, o as TraceOptions, r as LegacyOptions, t as BaseOptions } from "./options-
|
|
1
|
+
import { a as SuggestionOptions, i as LinterCliOptions, n as DictionariesOptions, o as TraceOptions, r as LegacyOptions, t as BaseOptions } from "./options-CShRqKvy.js";
|
|
2
2
|
import { CheckTextInfo, FeatureFlags, IncludeExcludeFlag, SuggestionsForWordResult, TraceResult, TraceWordResult } from "cspell-lib";
|
|
3
3
|
import { CSpellReporter, RunResult } from "@cspell/cspell-types";
|
|
4
4
|
|
|
@@ -117,4 +117,4 @@ declare function createInit(options: InitOptions): Promise<void>;
|
|
|
117
117
|
declare function parseApplicationFeatureFlags(flags: string[] | undefined): FeatureFlags;
|
|
118
118
|
//#endregion
|
|
119
119
|
export { checkText as a, parseApplicationFeatureFlags as c, listDictionaries as d, TraceResult as i, suggestions as l, CheckTextResult as n, createInit as o, IncludeExcludeFlag as r, lint as s, AppError as t, trace as u };
|
|
120
|
-
//# sourceMappingURL=application-
|
|
120
|
+
//# sourceMappingURL=application-BXlOXgoM.d.ts.map
|
|
@@ -29,6 +29,7 @@ import * as readline from "node:readline";
|
|
|
29
29
|
import { parse, stringify } from "flatted";
|
|
30
30
|
//#region src/console.ts
|
|
31
31
|
var ImplChannel = class {
|
|
32
|
+
stream;
|
|
32
33
|
constructor(stream) {
|
|
33
34
|
this.stream = stream;
|
|
34
35
|
}
|
|
@@ -39,6 +40,8 @@ var ImplChannel = class {
|
|
|
39
40
|
getColorLevel = () => getColorLevel(this.stream);
|
|
40
41
|
};
|
|
41
42
|
var Console = class {
|
|
43
|
+
stdout;
|
|
44
|
+
stderr;
|
|
42
45
|
stderrChannel;
|
|
43
46
|
stdoutChannel;
|
|
44
47
|
constructor(stdout = process.stdout, stderr = process.stderr) {
|
|
@@ -64,12 +67,15 @@ function getColorLevel(stream) {
|
|
|
64
67
|
//#endregion
|
|
65
68
|
//#region src/util/errors.ts
|
|
66
69
|
var CheckFailed = class extends Error {
|
|
70
|
+
exitCode;
|
|
67
71
|
constructor(message, exitCode = 1) {
|
|
68
72
|
super(message);
|
|
69
73
|
this.exitCode = exitCode;
|
|
70
74
|
}
|
|
71
75
|
};
|
|
72
76
|
var ApplicationError = class extends Error {
|
|
77
|
+
exitCode;
|
|
78
|
+
cause;
|
|
73
79
|
constructor(message, exitCode = 1, cause) {
|
|
74
80
|
super(message);
|
|
75
81
|
this.exitCode = exitCode;
|
|
@@ -77,6 +83,7 @@ var ApplicationError = class extends Error {
|
|
|
77
83
|
}
|
|
78
84
|
};
|
|
79
85
|
var IOError = class extends ApplicationError {
|
|
86
|
+
cause;
|
|
80
87
|
constructor(message, cause) {
|
|
81
88
|
super(message, void 0, cause);
|
|
82
89
|
this.cause = cause;
|
|
@@ -617,11 +624,7 @@ function getReporter(options, config) {
|
|
|
617
624
|
stderr.write("\r");
|
|
618
625
|
stderr.clearLine(0);
|
|
619
626
|
}
|
|
620
|
-
if (
|
|
621
|
-
if (issuesCollection?.length) {
|
|
622
|
-
consoleError("Issues found:");
|
|
623
|
-
issuesCollection.forEach((issue) => consoleError(issue));
|
|
624
|
-
}
|
|
627
|
+
if (errorCollection?.length) consoleError("-------------------------------------------");
|
|
625
628
|
const filesChecked = files - (skippedFiles || 0);
|
|
626
629
|
const cachedFilesText = cachedFiles ? ` (${cachedFiles} from cache)` : "";
|
|
627
630
|
const skippedFilesText = skippedFiles ? `, skipped: ${skippedFiles}` : "";
|
|
@@ -766,8 +769,9 @@ function formatIssue(io, templateStr, issue, maxIssueTextWidth) {
|
|
|
766
769
|
return t.replace(/\s+/, " ");
|
|
767
770
|
}
|
|
768
771
|
const { uri = "", filename, row, col, text, context = issue.line, offset } = issue;
|
|
772
|
+
const textLen = issue.length ?? text.length;
|
|
769
773
|
const contextLeft = clean(context.text.slice(0, offset - context.offset));
|
|
770
|
-
const contextRight = clean(context.text.slice(offset +
|
|
774
|
+
const contextRight = clean(context.text.slice(offset + textLen - context.offset));
|
|
771
775
|
const contextFull = clean(context.text);
|
|
772
776
|
const padContext = " ".repeat(Math.max(maxIssueTextWidth - text.length, 0));
|
|
773
777
|
const rowText = row.toString();
|
|
@@ -1184,7 +1188,7 @@ try {
|
|
|
1184
1188
|
const pkgDir = _dirname;
|
|
1185
1189
|
const npmPackage = {
|
|
1186
1190
|
name: "cspell",
|
|
1187
|
-
version: "10.0.
|
|
1191
|
+
version: "10.0.1",
|
|
1188
1192
|
engines: { node: ">=22.18.0" }
|
|
1189
1193
|
};
|
|
1190
1194
|
//#endregion
|
|
@@ -1268,6 +1272,7 @@ function mergeReportIssueOptions(a, b) {
|
|
|
1268
1272
|
return options;
|
|
1269
1273
|
}
|
|
1270
1274
|
var LintReporter = class {
|
|
1275
|
+
defaultReporter;
|
|
1271
1276
|
#reporters = [];
|
|
1272
1277
|
#config;
|
|
1273
1278
|
#finalized = false;
|
|
@@ -1525,8 +1530,16 @@ function glob$1(patterns, options) {
|
|
|
1525
1530
|
}
|
|
1526
1531
|
//#endregion
|
|
1527
1532
|
//#region src/util/stdin.ts
|
|
1528
|
-
function readStdin() {
|
|
1529
|
-
|
|
1533
|
+
async function* readStdin() {
|
|
1534
|
+
const rl = readline.createInterface(process.stdin);
|
|
1535
|
+
try {
|
|
1536
|
+
yield* rl;
|
|
1537
|
+
} catch (e) {
|
|
1538
|
+
if (!isReadlineClosedError(e)) throw e;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
function isReadlineClosedError(e) {
|
|
1542
|
+
return e instanceof Error && e.message.includes("closed");
|
|
1530
1543
|
}
|
|
1531
1544
|
//#endregion
|
|
1532
1545
|
//#region src/util/stdinUrl.ts
|
|
@@ -1685,6 +1698,7 @@ function relativeToCwd(filename, cwd = process.cwd()) {
|
|
|
1685
1698
|
//#endregion
|
|
1686
1699
|
//#region src/util/cache/file-entry-cache/flatCache.ts
|
|
1687
1700
|
var FlatCache = class {
|
|
1701
|
+
cacheFilename;
|
|
1688
1702
|
#cache;
|
|
1689
1703
|
constructor(cacheFilename) {
|
|
1690
1704
|
this.cacheFilename = cacheFilename;
|
|
@@ -1946,6 +1960,11 @@ const META_DATA_VERSION_SUFFIX = "-1-" + Object.keys({
|
|
|
1946
1960
|
* Caches cspell results on disk
|
|
1947
1961
|
*/
|
|
1948
1962
|
var DiskCache = class {
|
|
1963
|
+
cacheFileLocation;
|
|
1964
|
+
useCheckSum;
|
|
1965
|
+
cspellVersion;
|
|
1966
|
+
useUniversalCache;
|
|
1967
|
+
fileEntryCache;
|
|
1949
1968
|
cacheDir;
|
|
1950
1969
|
dependencyCache = /* @__PURE__ */ new Map();
|
|
1951
1970
|
dependencyCacheTree = {};
|
|
@@ -2626,7 +2645,6 @@ function sizeToNumber(size) {
|
|
|
2626
2645
|
//#endregion
|
|
2627
2646
|
//#region src/lint/processFiles.ts
|
|
2628
2647
|
const BATCH_FETCH_SIZE = 12;
|
|
2629
|
-
const BATCH_PROCESS_SIZE = 1;
|
|
2630
2648
|
function prefetch(fileToProcess, cfg) {
|
|
2631
2649
|
const { filename } = fileToProcess;
|
|
2632
2650
|
if (isBinaryFile$1(filename, cfg.root)) return {
|
|
@@ -2734,14 +2752,10 @@ async function processFiles(files, options) {
|
|
|
2734
2752
|
for await (const pf of prefetchFilesAsync(files)) yield processPrefetchFileResult(pf);
|
|
2735
2753
|
return;
|
|
2736
2754
|
}
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
yield processPrefetchFileResult(pf);
|
|
2741
|
-
}
|
|
2742
|
-
return;
|
|
2755
|
+
for (const pf of prefetchFiles(files)) {
|
|
2756
|
+
await pf.result;
|
|
2757
|
+
yield processPrefetchFileResult(pf);
|
|
2743
2758
|
}
|
|
2744
|
-
yield* pipe(prefetchIterable(pipe(prefetchFiles(files), opMap$1(async (pf) => processPrefetchFileResult(pf))), BATCH_PROCESS_SIZE));
|
|
2745
2759
|
}
|
|
2746
2760
|
for await (const processed of loadAndProcessFiles()) {
|
|
2747
2761
|
const { filename, sequence, sequenceSize, result } = processed;
|
|
@@ -2780,7 +2794,7 @@ function runResult(init = {}) {
|
|
|
2780
2794
|
};
|
|
2781
2795
|
}
|
|
2782
2796
|
//#endregion
|
|
2783
|
-
//#region \0@oxc-project+runtime@0.
|
|
2797
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/usingCtx.js
|
|
2784
2798
|
function _usingCtx() {
|
|
2785
2799
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
2786
2800
|
var n = Error();
|
|
@@ -3100,6 +3114,9 @@ function calcVerboseLevel(options) {
|
|
|
3100
3114
|
//#region src/lint/LintRequest.ts
|
|
3101
3115
|
const defaultContextRange = 20;
|
|
3102
3116
|
var LintRequest = class {
|
|
3117
|
+
fileGlobs;
|
|
3118
|
+
options;
|
|
3119
|
+
reporter;
|
|
3103
3120
|
locale;
|
|
3104
3121
|
configFile;
|
|
3105
3122
|
excludes;
|
|
@@ -3193,6 +3210,7 @@ function simpleRepl() {
|
|
|
3193
3210
|
return new SimpleRepl();
|
|
3194
3211
|
}
|
|
3195
3212
|
var SimpleRepl = class {
|
|
3213
|
+
prompt;
|
|
3196
3214
|
beforeEach;
|
|
3197
3215
|
completer;
|
|
3198
3216
|
_history;
|
|
@@ -3436,4 +3454,4 @@ function parseApplicationFeatureFlags(flags) {
|
|
|
3436
3454
|
//#endregion
|
|
3437
3455
|
export { ApplicationError as C, width as S, console as T, padLeft as _, parseApplicationFeatureFlags as a, pruneAnsiTextEnd as b, listDictionaries as c, validateUnitSize as d, unindent as f, tableToLines as g, getReporter as h, lint as i, ReportChoicesAll as l, npmPackage as m, checkText as n, suggestions as o, DEFAULT_CACHE_LOCATION as p, createInit as r, trace as s, IncludeExcludeFlag as t, cvtLinterCliCommandOptionsToLinterCliOptions as u, padWidth as v, CheckFailed as w, pruneAnsiTextStart as x, ansiWidth as y };
|
|
3438
3456
|
|
|
3439
|
-
//# sourceMappingURL=application-
|
|
3457
|
+
//# sourceMappingURL=application-Ck3Auwvx.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-
|
|
2
|
-
export { AppError, CheckTextResult, IncludeExcludeFlag, TraceResult, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
|
1
|
+
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-BXlOXgoM.js";
|
|
2
|
+
export { AppError, CheckTextResult, IncludeExcludeFlag, type TraceResult, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
package/dist/esm/application.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseApplicationFeatureFlags, c as listDictionaries, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-
|
|
1
|
+
import { a as parseApplicationFeatureFlags, c as listDictionaries, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-Ck3Auwvx.js";
|
|
2
2
|
export { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as LinterCliOptions, o as TraceOptions, s as FinalizedReporter, t as BaseOptions } from "./options-
|
|
2
|
-
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-
|
|
1
|
+
import { i as LinterCliOptions, o as TraceOptions, s as FinalizedReporter, t as BaseOptions } from "./options-CShRqKvy.js";
|
|
2
|
+
import { a as checkText, c as parseApplicationFeatureFlags, d as listDictionaries, i as TraceResult, l as suggestions, n as CheckTextResult, o as createInit, r as IncludeExcludeFlag, s as lint, t as AppError, u as trace } from "./application-BXlOXgoM.js";
|
|
3
3
|
import { CSpellReporter, ReporterConfiguration } from "@cspell/cspell-types";
|
|
4
4
|
import { WriteStream } from "node:tty";
|
|
5
5
|
export * from "@cspell/cspell-types";
|
|
@@ -43,5 +43,5 @@ interface ReporterOptions extends Pick<LinterCliOptions, "color" | "debug" | "is
|
|
|
43
43
|
}
|
|
44
44
|
declare function getReporter(options: ReporterOptions, config?: CSpellReporterConfiguration): FinalizedReporter;
|
|
45
45
|
//#endregion
|
|
46
|
-
export { AppError, type BaseOptions, type LinterCliOptions as CSpellApplicationOptions, type CSpellReporterConfiguration, type CSpellReporterModule, CheckTextResult, IncludeExcludeFlag, type TraceOptions, TraceResult, checkText, createInit, getReporter as getDefaultReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
|
46
|
+
export { AppError, type BaseOptions, type LinterCliOptions as CSpellApplicationOptions, type CSpellReporterConfiguration, type CSpellReporterModule, CheckTextResult, IncludeExcludeFlag, type TraceOptions, type TraceResult, checkText, createInit, getReporter as getDefaultReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
|
47
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as parseApplicationFeatureFlags, c as listDictionaries, h as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-
|
|
1
|
+
import { a as parseApplicationFeatureFlags, c as listDictionaries, h as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-Ck3Auwvx.js";
|
|
2
2
|
export * from "@cspell/cspell-types";
|
|
3
3
|
export { IncludeExcludeFlag, checkText, createInit, getReporter as getDefaultReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
|
@@ -398,4 +398,4 @@ interface CSpellConfigFile {
|
|
|
398
398
|
}
|
|
399
399
|
//#endregion
|
|
400
400
|
export { SuggestionOptions as a, LinterCliOptions as i, DictionariesOptions as n, TraceOptions as o, LegacyOptions as r, FinalizedReporter as s, BaseOptions as t };
|
|
401
|
-
//# sourceMappingURL=options-
|
|
401
|
+
//# sourceMappingURL=options-CShRqKvy.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "A Spelling Checker for Code!",
|
|
5
5
|
"funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
|
|
6
6
|
"bin": {
|
|
@@ -86,27 +86,27 @@
|
|
|
86
86
|
},
|
|
87
87
|
"homepage": "https://cspell.org/",
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@cspell/cspell-json-reporter": "10.0.
|
|
90
|
-
"@cspell/cspell-performance-monitor": "10.0.
|
|
91
|
-
"@cspell/cspell-pipe": "10.0.
|
|
92
|
-
"@cspell/cspell-types": "10.0.
|
|
93
|
-
"@cspell/cspell-worker": "10.0.
|
|
94
|
-
"@cspell/dynamic-import": "10.0.
|
|
95
|
-
"@cspell/url": "10.0.
|
|
89
|
+
"@cspell/cspell-json-reporter": "10.0.1",
|
|
90
|
+
"@cspell/cspell-performance-monitor": "10.0.1",
|
|
91
|
+
"@cspell/cspell-pipe": "10.0.1",
|
|
92
|
+
"@cspell/cspell-types": "10.0.1",
|
|
93
|
+
"@cspell/cspell-worker": "10.0.1",
|
|
94
|
+
"@cspell/dynamic-import": "10.0.1",
|
|
95
|
+
"@cspell/url": "10.0.1",
|
|
96
96
|
"ansi-regex": "^6.2.2",
|
|
97
97
|
"chalk": "^5.6.2",
|
|
98
98
|
"chalk-template": "^1.1.2",
|
|
99
99
|
"commander": "^14.0.3",
|
|
100
|
-
"cspell-config-lib": "10.0.
|
|
101
|
-
"cspell-dictionary": "10.0.
|
|
102
|
-
"cspell-gitignore": "10.0.
|
|
103
|
-
"cspell-glob": "10.0.
|
|
104
|
-
"cspell-io": "10.0.
|
|
105
|
-
"cspell-lib": "10.0.
|
|
100
|
+
"cspell-config-lib": "10.0.1",
|
|
101
|
+
"cspell-dictionary": "10.0.1",
|
|
102
|
+
"cspell-gitignore": "10.0.1",
|
|
103
|
+
"cspell-glob": "10.0.1",
|
|
104
|
+
"cspell-io": "10.0.1",
|
|
105
|
+
"cspell-lib": "10.0.1",
|
|
106
106
|
"fast-json-stable-stringify": "^2.1.0",
|
|
107
107
|
"flatted": "^3.4.2",
|
|
108
|
-
"semver": "^7.
|
|
109
|
-
"tinyglobby": "^0.2.
|
|
108
|
+
"semver": "^7.8.1",
|
|
109
|
+
"tinyglobby": "^0.2.16"
|
|
110
110
|
},
|
|
111
111
|
"engines": {
|
|
112
112
|
"node": ">=22.18.0"
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"micromatch": "^4.0.8",
|
|
118
118
|
"minimatch": "^9.0.9"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "0f43abf29e5da0ecbcb08214055cdc1e3267c3ea"
|
|
121
121
|
}
|