cspell 10.4.0-alpha.1 → 10.4.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/dist/esm/app.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { i as LinterCliOptions } from "./options-D5lC3IZu.js";
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
//#region src/util/errors.d.ts
|
|
4
|
-
declare class CheckFailed extends Error {
|
|
4
|
+
export declare class CheckFailed extends Error {
|
|
5
5
|
readonly exitCode: number;
|
|
6
6
|
constructor(message: string, exitCode?: number);
|
|
7
7
|
}
|
|
8
|
-
declare class ApplicationError extends Error {
|
|
8
|
+
export declare class ApplicationError extends Error {
|
|
9
9
|
readonly exitCode: number;
|
|
10
10
|
readonly cause?: Error | undefined;
|
|
11
11
|
constructor(message: string, exitCode?: number, cause?: Error | undefined);
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/app.d.mts
|
|
15
|
-
declare function run(command?: Command, argv?: string[]): Promise<void>;
|
|
15
|
+
export declare function run(command?: Command, argv?: string[]): Promise<void>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export {
|
|
17
|
+
export type { LinterCliOptions as Options };
|
|
18
18
|
//# sourceMappingURL=app.d.ts.map
|
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-IkKZuulS.js";
|
|
2
2
|
import { Link } from "cspell-lib";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import * as iPath from "node:path";
|
|
@@ -468,8 +468,20 @@ function helpIssueTemplate(opts) {
|
|
|
468
468
|
* @returns
|
|
469
469
|
*/
|
|
470
470
|
function augmentCommandHelp(context) {
|
|
471
|
+
return lintHelpAfterOptions(context.command, "Hidden Options:");
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* The extra lint help for `cspell --help`.
|
|
475
|
+
* The program answers `--help` before the lint options are parsed, so parse them from its arguments.
|
|
476
|
+
* @param context - the program's help context.
|
|
477
|
+
* @param lintCommand - the lint command.
|
|
478
|
+
*/
|
|
479
|
+
function lintHelpForProgram(context, lintCommand) {
|
|
480
|
+
lintCommand.parseOptions(context.command.args);
|
|
481
|
+
return lintHelpAfterOptions(lintCommand, `Hidden options for "${lintCommand.name()}":`);
|
|
482
|
+
}
|
|
483
|
+
function lintHelpAfterOptions(command, hiddenOptionsHeading) {
|
|
471
484
|
const output = [];
|
|
472
|
-
const command = context.command;
|
|
473
485
|
const opts = command.opts();
|
|
474
486
|
const showHidden = !!opts.verbose;
|
|
475
487
|
const hiddenHelp = [];
|
|
@@ -478,7 +490,7 @@ function augmentCommandHelp(context) {
|
|
|
478
490
|
const hiddenOptions = command.options.filter((opt) => opt.hidden && showHidden);
|
|
479
491
|
const flagColWidth = Math.max(...command.options.map((opt) => opt.flags.length), 0);
|
|
480
492
|
for (const options of hiddenOptions) {
|
|
481
|
-
if (!hiddenHelp.length) hiddenHelp.push("\
|
|
493
|
+
if (!hiddenHelp.length) hiddenHelp.push("\n" + hiddenOptionsHeading);
|
|
482
494
|
hiddenHelp.push(help.formatItem(options.flags, flagColWidth, options.description, help));
|
|
483
495
|
}
|
|
484
496
|
output.push(...hiddenHelp, advanced);
|
|
@@ -755,7 +767,7 @@ async function run(command, argv) {
|
|
|
755
767
|
prog.version(npmPackage.version).description("Spelling Checker for Code").name("cspell");
|
|
756
768
|
if (!satisfies(process.versions.node, npmPackage.engines.node)) throw new ApplicationError(`Unsupported NodeJS version (${process.versions.node}); ${npmPackage.engines.node} is required`);
|
|
757
769
|
const lintCommand = addGlobalOptionsToAction(commandLint(prog, { isDefault: true }));
|
|
758
|
-
prog.addHelpText("after", (context) => defaultCommandOptionsHelp(context, lintCommand));
|
|
770
|
+
prog.addHelpText("after", (context) => defaultCommandOptionsHelp(context, lintCommand) + lintHelpForProgram(context, lintCommand));
|
|
759
771
|
addGlobalOptionsToAction(commandTrace(prog));
|
|
760
772
|
addGlobalOptionsToAction(commandCheck(prog));
|
|
761
773
|
addGlobalOptionsToAction(commandSuggestion(prog));
|
|
@@ -1234,7 +1234,7 @@ try {
|
|
|
1234
1234
|
const pkgDir = _dirname;
|
|
1235
1235
|
const npmPackage = {
|
|
1236
1236
|
name: "cspell",
|
|
1237
|
-
version: "10.4.0
|
|
1237
|
+
version: "10.4.0",
|
|
1238
1238
|
engines: { node: ">=22.18.0" }
|
|
1239
1239
|
};
|
|
1240
1240
|
//#endregion
|
|
@@ -2935,7 +2935,7 @@ function runResult(init = {}) {
|
|
|
2935
2935
|
};
|
|
2936
2936
|
}
|
|
2937
2937
|
//#endregion
|
|
2938
|
-
//#region \0@oxc-project+runtime@0.
|
|
2938
|
+
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/usingCtx.js
|
|
2939
2939
|
function _usingCtx() {
|
|
2940
2940
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
2941
2941
|
var n = Error();
|
|
@@ -3666,4 +3666,4 @@ function parseApplicationFeatureFlags(flags) {
|
|
|
3666
3666
|
//#endregion
|
|
3667
3667
|
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 };
|
|
3668
3668
|
|
|
3669
|
-
//# sourceMappingURL=application-
|
|
3669
|
+
//# sourceMappingURL=application-IkKZuulS.js.map
|
package/dist/esm/application.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
|
1
|
+
export { t as IncludeExcludeFlag, n as checkText, r as createInit, i as lint, c as listDictionaries, a as parseApplicationFeatureFlags, o as suggestions, s as trace } from "./application-IkKZuulS.js";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export { t as IncludeExcludeFlag, n as checkText, r as createInit, h as getDefaultReporter, i as lint, c as listDictionaries, a as parseApplicationFeatureFlags, o as suggestions, s as trace } from "./application-IkKZuulS.js";
|
|
2
2
|
export * from "@cspell/cspell-types";
|
|
3
|
-
export { IncludeExcludeFlag, checkText, createInit, getReporter as getDefaultReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell",
|
|
3
|
-
"version": "10.4.0
|
|
3
|
+
"version": "10.4.0",
|
|
4
4
|
"description": "A Spelling Checker for Code!",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "tsdown && pnpm build:tsc",
|
|
74
74
|
"build:readme": "pnpm build:readme:help",
|
|
75
|
-
"build:readme:help": "pnpm build:readme:help:lint && pnpm build:readme:help:trace && inject-markdown README.md && prettier -w README.md",
|
|
75
|
+
"build:readme:help": "pnpm build:readme:help:lint && pnpm build:readme:help:trace && inject-markdown --allow-outside-root ../.. README.md && prettier -w README.md",
|
|
76
76
|
"build:readme:help:lint": "COLUMNS=72 ./bin.mjs lint --help > static/help-lint.txt",
|
|
77
77
|
"build:readme:help:trace": "COLUMNS=72 ./bin.mjs trace --help > static/help-trace.txt",
|
|
78
78
|
"build:tsc": "tsc -p .",
|
|
@@ -90,23 +90,23 @@
|
|
|
90
90
|
"watch:tsc": "tsc -p . -w"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@cspell/cspell-json-reporter": "10.4.0
|
|
94
|
-
"@cspell/cspell-performance-monitor": "10.4.0
|
|
95
|
-
"@cspell/cspell-pipe": "10.4.0
|
|
96
|
-
"@cspell/cspell-types": "10.4.0
|
|
97
|
-
"@cspell/cspell-worker": "10.4.0
|
|
98
|
-
"@cspell/dynamic-import": "10.4.0
|
|
99
|
-
"@cspell/url": "10.4.0
|
|
93
|
+
"@cspell/cspell-json-reporter": "10.4.0",
|
|
94
|
+
"@cspell/cspell-performance-monitor": "10.4.0",
|
|
95
|
+
"@cspell/cspell-pipe": "10.4.0",
|
|
96
|
+
"@cspell/cspell-types": "10.4.0",
|
|
97
|
+
"@cspell/cspell-worker": "10.4.0",
|
|
98
|
+
"@cspell/dynamic-import": "10.4.0",
|
|
99
|
+
"@cspell/url": "10.4.0",
|
|
100
100
|
"ansi-regex": "^6.4.0",
|
|
101
101
|
"chalk": "^6.0.1",
|
|
102
102
|
"chalk-template": "^1.1.3",
|
|
103
103
|
"commander": "^15.0.0",
|
|
104
|
-
"cspell-config-lib": "10.4.0
|
|
105
|
-
"cspell-dictionary": "10.4.0
|
|
106
|
-
"cspell-gitignore": "10.4.0
|
|
107
|
-
"cspell-glob": "10.4.0
|
|
108
|
-
"cspell-io": "10.4.0
|
|
109
|
-
"cspell-lib": "10.4.0
|
|
104
|
+
"cspell-config-lib": "10.4.0",
|
|
105
|
+
"cspell-dictionary": "10.4.0",
|
|
106
|
+
"cspell-gitignore": "10.4.0",
|
|
107
|
+
"cspell-glob": "10.4.0",
|
|
108
|
+
"cspell-io": "10.4.0",
|
|
109
|
+
"cspell-lib": "10.4.0",
|
|
110
110
|
"flatted": "^3.4.4",
|
|
111
111
|
"semver": "^7.8.5",
|
|
112
112
|
"tinyglobby": "^0.2.17"
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"engines": {
|
|
121
121
|
"node": ">=22.18.0"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "7e2bbb5e866c827ac5d2cf6b84bf3e1a016d0823"
|
|
124
124
|
}
|