cspell 9.2.2 → 9.3.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 +27 -11
- package/dist/esm/{application-DDngbSV7.d.ts → application-B84gvlDU.d.ts} +2 -2
- package/dist/esm/{application-2V_0BiNj.js → application-D_X0oO_z.js} +2 -2
- package/dist/esm/application.d.ts +2 -2
- package/dist/esm/application.js +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{options-D_a-jMcz.d.ts → options-BeJCICDB.d.ts} +4 -1
- package/package.json +15 -15
package/dist/esm/app.d.ts
CHANGED
package/dist/esm/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseApplicationFeatureFlags, c as listDictionaries, d as npmPackage, h as console, i as lint, l as ReportChoicesAll, m as CheckFailed, n as checkText, o as suggestions, p as ApplicationError, r as createInit, s as trace, t as IncludeExcludeFlag, u as DEFAULT_CACHE_LOCATION } from "./application-
|
|
1
|
+
import { a as parseApplicationFeatureFlags, c as listDictionaries, d as npmPackage, h as console, i as lint, l as ReportChoicesAll, m as CheckFailed, n as checkText, o as suggestions, p as ApplicationError, r as createInit, s as trace, t as IncludeExcludeFlag, u as DEFAULT_CACHE_LOCATION } from "./application-D_X0oO_z.js";
|
|
2
2
|
import { Option, program } from "commander";
|
|
3
3
|
import { satisfies } from "semver";
|
|
4
4
|
import chalk from "chalk";
|
|
@@ -659,8 +659,8 @@ References:
|
|
|
659
659
|
https://cspell.org
|
|
660
660
|
https://github.com/streetsidesoftware/cspell
|
|
661
661
|
`;
|
|
662
|
-
function commandLint(prog) {
|
|
663
|
-
const spellCheckCommand = prog.command("lint",
|
|
662
|
+
function commandLint(prog, opts) {
|
|
663
|
+
const spellCheckCommand = prog.command("lint", opts);
|
|
664
664
|
spellCheckCommand.description("Check spelling").option("-c, --config <cspell.json>", "Configuration file to use. By default cspell looks for cspell.json in the current directory.").addOption(crOpt("--config-search", "Allow searching for configuration files.", void 0).hideHelp()).option("--no-config-search", "Disable automatic searching for additional configuration files in parent directories. Only the specified config file (if any) will be used.").option("--stop-config-search-at <dir>", "Specify a directory at which to stop searching for configuration files when walking up from the files being checked. Useful for limiting config inheritance.", collect).option("-v, --verbose", "Display more information about the files being checked and the configuration.").option("--locale <locale>", "Set language locales. i.e. \"en,fr\" for English and French, or \"en-GB\" for British English.").option("--language-id <file-type>", "Force programming language for unknown extensions. i.e. \"php\" or \"scala\"").addOption(crOpt("--languageId <file-type>", "Alias of \"--language-id\". Force programming language for unknown extensions. i.e. \"php\" or \"scala\"").hideHelp()).option("--words-only", "Only output the words not found in the dictionaries.").addOption(crOpt("--wordsOnly", "Only output the words not found in the dictionaries.").hideHelp()).option("-u, --unique", "Only output the first instance of a word not found in the dictionaries.").option("-e, --exclude <glob>", "Exclude files matching the glob pattern. This option can be used multiple times to add multiple globs. ", collect).option("--file-list <path or stdin>", "Specify a list of files to be spell checked. The list is filtered against the glob file patterns. Note: the format is 1 file path per line.", collect).option("--file [file...]", "Specify files to spell check. They are filtered by the [globs...].", collect).addOption(crOpt("--files [file...]", "Alias of \"--file\". Files to spell check.", collect).hideHelp()).option("--no-issues", "Do not show the spelling errors.").option("--no-progress", "Turn off progress messages").option("--no-summary", "Turn off summary message in console.").option("-s, --silent", "Silent mode, suppress error messages.").option("--no-exit-code", "Do not return an exit code if issues are found.").addOption(crOpt("--quiet", "Only show spelling issues or errors.").implies({
|
|
665
665
|
summary: false,
|
|
666
666
|
progress: false
|
|
@@ -668,7 +668,6 @@ function commandLint(prog) {
|
|
|
668
668
|
const useExitCode = options.exitCode ?? true;
|
|
669
669
|
if (options.skipValidation) options.cache = false;
|
|
670
670
|
options.color ??= canUseColor(options.color);
|
|
671
|
-
parseApplicationFeatureFlags(options.flag);
|
|
672
671
|
const { mustFindFiles, fileList, files, file } = options;
|
|
673
672
|
const result = await lint(fileGlobs, options);
|
|
674
673
|
if (!fileGlobs.length && !result.files && !result.errors && !fileList && !files?.length && !file?.length) {
|
|
@@ -972,6 +971,23 @@ function groupBy(items, key) {
|
|
|
972
971
|
return map;
|
|
973
972
|
}
|
|
974
973
|
|
|
974
|
+
//#endregion
|
|
975
|
+
//#region src/globalOptions.ts
|
|
976
|
+
function addGlobalOptionsToAction(command) {
|
|
977
|
+
command = command.addOption(new Option("-f,--flag <flag:value>", "Declare an execution flag value").hideHelp().argParser(collect));
|
|
978
|
+
return command;
|
|
979
|
+
}
|
|
980
|
+
function addGlobalOptionsAndHooks(command) {
|
|
981
|
+
addGlobalOptionsToAction(command);
|
|
982
|
+
command.hook("preAction", (thisCommand, _actionCommand) => {
|
|
983
|
+
processGlobalOptions(thisCommand.opts());
|
|
984
|
+
});
|
|
985
|
+
return command;
|
|
986
|
+
}
|
|
987
|
+
function processGlobalOptions(options) {
|
|
988
|
+
parseApplicationFeatureFlags(options.flag);
|
|
989
|
+
}
|
|
990
|
+
|
|
975
991
|
//#endregion
|
|
976
992
|
//#region src/app.mts
|
|
977
993
|
async function run(command, argv) {
|
|
@@ -980,14 +996,14 @@ async function run(command, argv) {
|
|
|
980
996
|
prog.exitOverride();
|
|
981
997
|
prog.version(npmPackage.version).description("Spelling Checker for Code").name("cspell");
|
|
982
998
|
if (!satisfies(process.versions.node, npmPackage.engines.node)) throw new ApplicationError(`Unsupported NodeJS version (${process.versions.node}); ${npmPackage.engines.node} is required`);
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
commandInit(prog).addOption(optionFlags);
|
|
999
|
+
addGlobalOptionsToAction(commandLint(prog, { isDefault: true }));
|
|
1000
|
+
addGlobalOptionsToAction(commandTrace(prog));
|
|
1001
|
+
addGlobalOptionsToAction(commandCheck(prog));
|
|
1002
|
+
addGlobalOptionsToAction(commandSuggestion(prog));
|
|
1003
|
+
addGlobalOptionsToAction(commandInit(prog));
|
|
989
1004
|
commandLink(prog);
|
|
990
|
-
commandDictionaries(prog);
|
|
1005
|
+
addGlobalOptionsToAction(commandDictionaries(prog));
|
|
1006
|
+
addGlobalOptionsAndHooks(prog);
|
|
991
1007
|
prog.exitOverride();
|
|
992
1008
|
await prog.parseAsync(args);
|
|
993
1009
|
}
|
|
@@ -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-BeJCICDB.js";
|
|
2
2
|
import { CheckTextInfo, FeatureFlags, IncludeExcludeFlag, SuggestionsForWordResult, TraceResult, TraceWordResult } from "cspell-lib";
|
|
3
3
|
import { CSpellReporter, RunResult } from "@cspell/cspell-types";
|
|
4
4
|
|
|
@@ -113,4 +113,4 @@ declare function createInit(options: InitOptions): Promise<void>;
|
|
|
113
113
|
declare function parseApplicationFeatureFlags(flags: string[] | undefined): FeatureFlags;
|
|
114
114
|
//#endregion
|
|
115
115
|
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 };
|
|
116
|
-
//# sourceMappingURL=application-
|
|
116
|
+
//# sourceMappingURL=application-B84gvlDU.d.ts.map
|
|
@@ -766,7 +766,7 @@ const pkgDir = _dirname;
|
|
|
766
766
|
//#endregion
|
|
767
767
|
//#region src/pkgInfo.ts
|
|
768
768
|
const name = "cspell";
|
|
769
|
-
const version$1 = "9.
|
|
769
|
+
const version$1 = "9.3.1";
|
|
770
770
|
const engines = { node: ">=20" };
|
|
771
771
|
const npmPackage = {
|
|
772
772
|
name,
|
|
@@ -2656,4 +2656,4 @@ function parseApplicationFeatureFlags(flags) {
|
|
|
2656
2656
|
|
|
2657
2657
|
//#endregion
|
|
2658
2658
|
export { parseApplicationFeatureFlags as a, listDictionaries as c, npmPackage as d, getReporter as f, console as h, lint as i, ReportChoicesAll as l, CheckFailed as m, checkText as n, suggestions as o, ApplicationError as p, createInit as r, trace as s, IncludeExcludeFlag as t, DEFAULT_CACHE_LOCATION as u };
|
|
2659
|
-
//# sourceMappingURL=application-
|
|
2659
|
+
//# sourceMappingURL=application-D_X0oO_z.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./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 "./options-BeJCICDB.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-B84gvlDU.js";
|
|
3
3
|
export { AppError, CheckTextResult, IncludeExcludeFlag, TraceResult, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
package/dist/esm/application.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-D_X0oO_z.js";
|
|
2
2
|
|
|
3
3
|
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, 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, t as BaseOptions } from "./options-BeJCICDB.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-B84gvlDU.js";
|
|
3
3
|
import "chalk";
|
|
4
4
|
import { CSpellReporter, CSpellSettings, ReporterConfiguration, RunResult } from "@cspell/cspell-types";
|
|
5
5
|
import { WriteStream } from "node:tty";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseApplicationFeatureFlags, c as listDictionaries, f 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, f as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-D_X0oO_z.js";
|
|
2
2
|
|
|
3
3
|
export * from "@cspell/cspell-types"
|
|
4
4
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import "cspell-lib";
|
|
1
2
|
import { CSpellSettings, CacheFormat, CacheStrategy, ReporterConfiguration } from "@cspell/cspell-types";
|
|
3
|
+
import { GlobMatcher } from "cspell-glob";
|
|
4
|
+
import "cspell-io";
|
|
2
5
|
|
|
3
6
|
//#region src/util/cache/CacheOptions.d.ts
|
|
4
7
|
interface CacheOptions {
|
|
@@ -384,4 +387,4 @@ interface CSpellConfigFile {
|
|
|
384
387
|
}
|
|
385
388
|
//#endregion
|
|
386
389
|
export { SuggestionOptions as a, LinterCliOptions as i, DictionariesOptions as n, TraceOptions as o, LegacyOptions as r, BaseOptions as t };
|
|
387
|
-
//# sourceMappingURL=options-
|
|
390
|
+
//# sourceMappingURL=options-BeJCICDB.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.1",
|
|
4
4
|
"description": "A Spelling Checker for Code!",
|
|
5
5
|
"funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
|
|
6
6
|
"bin": {
|
|
@@ -83,20 +83,20 @@
|
|
|
83
83
|
},
|
|
84
84
|
"homepage": "https://cspell.org/",
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@cspell/cspell-json-reporter": "9.
|
|
87
|
-
"@cspell/cspell-pipe": "9.
|
|
88
|
-
"@cspell/cspell-types": "9.
|
|
89
|
-
"@cspell/dynamic-import": "9.
|
|
90
|
-
"@cspell/url": "9.
|
|
86
|
+
"@cspell/cspell-json-reporter": "9.3.1",
|
|
87
|
+
"@cspell/cspell-pipe": "9.3.1",
|
|
88
|
+
"@cspell/cspell-types": "9.3.1",
|
|
89
|
+
"@cspell/dynamic-import": "9.3.1",
|
|
90
|
+
"@cspell/url": "9.3.1",
|
|
91
91
|
"chalk": "^5.6.2",
|
|
92
92
|
"chalk-template": "^1.1.2",
|
|
93
|
-
"commander": "^14.0.
|
|
94
|
-
"cspell-config-lib": "9.
|
|
95
|
-
"cspell-dictionary": "9.
|
|
96
|
-
"cspell-gitignore": "9.
|
|
97
|
-
"cspell-glob": "9.
|
|
98
|
-
"cspell-io": "9.
|
|
99
|
-
"cspell-lib": "9.
|
|
93
|
+
"commander": "^14.0.2",
|
|
94
|
+
"cspell-config-lib": "9.3.1",
|
|
95
|
+
"cspell-dictionary": "9.3.1",
|
|
96
|
+
"cspell-gitignore": "9.3.1",
|
|
97
|
+
"cspell-glob": "9.3.1",
|
|
98
|
+
"cspell-io": "9.3.1",
|
|
99
|
+
"cspell-lib": "9.3.1",
|
|
100
100
|
"fast-json-stable-stringify": "^2.1.0",
|
|
101
101
|
"flatted": "^3.3.3",
|
|
102
102
|
"semver": "^7.7.3",
|
|
@@ -107,10 +107,10 @@
|
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@types/glob": "^8.1.0",
|
|
110
|
-
"@types/micromatch": "^4.0.
|
|
110
|
+
"@types/micromatch": "^4.0.10",
|
|
111
111
|
"@types/semver": "^7.7.1",
|
|
112
112
|
"micromatch": "^4.0.8",
|
|
113
113
|
"minimatch": "^9.0.5"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "3f8bf5c88cda393b581957b7f8efc696e432f6f1"
|
|
116
116
|
}
|