cspell 7.3.5 → 7.3.7
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 +1 -0
- package/dist/esm/commandCheck.js +4 -1
- package/dist/esm/commandCheck.mjs +4 -1
- package/dist/esm/commandLint.js +7 -1
- package/dist/esm/commandLint.mjs +7 -1
- package/dist/esm/options.d.mts +5 -0
- package/dist/esm/options.d.ts +5 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -154,6 +154,7 @@ Options:
|
|
|
154
154
|
--no-progress Turn off progress messages
|
|
155
155
|
--no-summary Turn off summary message in console.
|
|
156
156
|
-s, --silent Silent mode, suppress error messages.
|
|
157
|
+
--no-exit-code Do not return an exit code if issues are found.
|
|
157
158
|
--quiet Only show spelling issues or errors.
|
|
158
159
|
--fail-fast Exit after first file with an issue or error.
|
|
159
160
|
-r, --root <root folder> Root directory, defaults to current directory.
|
package/dist/esm/commandCheck.js
CHANGED
|
@@ -12,9 +12,11 @@ export function commandCheck(prog) {
|
|
|
12
12
|
.option('--no-validate-directives', 'Do not validate in-document CSpell directives.')
|
|
13
13
|
.option('--no-color', 'Turn off color.')
|
|
14
14
|
.option('--color', 'Force color')
|
|
15
|
+
.option('--no-exit-code', 'Do not return an exit code if issues are found.')
|
|
15
16
|
.addOption(new CommanderOption('--default-configuration', 'Load the default configuration and dictionaries.').hideHelp())
|
|
16
17
|
.addOption(new CommanderOption('--no-default-configuration', 'Do not load the default configuration and dictionaries.'))
|
|
17
18
|
.action(async (files, options) => {
|
|
19
|
+
const useExitCode = options.exitCode ?? true;
|
|
18
20
|
App.parseApplicationFeatureFlags(options.flag);
|
|
19
21
|
let issueCount = 0;
|
|
20
22
|
for (const filename of files) {
|
|
@@ -41,7 +43,8 @@ export function commandCheck(prog) {
|
|
|
41
43
|
console.log();
|
|
42
44
|
}
|
|
43
45
|
if (issueCount) {
|
|
44
|
-
|
|
46
|
+
const exitCode = useExitCode ?? true ? 1 : 0;
|
|
47
|
+
throw new CheckFailed('Issues found', exitCode);
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
}
|
|
@@ -12,9 +12,11 @@ export function commandCheck(prog) {
|
|
|
12
12
|
.option('--no-validate-directives', 'Do not validate in-document CSpell directives.')
|
|
13
13
|
.option('--no-color', 'Turn off color.')
|
|
14
14
|
.option('--color', 'Force color')
|
|
15
|
+
.option('--no-exit-code', 'Do not return an exit code if issues are found.')
|
|
15
16
|
.addOption(new CommanderOption('--default-configuration', 'Load the default configuration and dictionaries.').hideHelp())
|
|
16
17
|
.addOption(new CommanderOption('--no-default-configuration', 'Do not load the default configuration and dictionaries.'))
|
|
17
18
|
.action(async (files, options) => {
|
|
19
|
+
const useExitCode = options.exitCode ?? true;
|
|
18
20
|
App.parseApplicationFeatureFlags(options.flag);
|
|
19
21
|
let issueCount = 0;
|
|
20
22
|
for (const filename of files) {
|
|
@@ -41,7 +43,8 @@ export function commandCheck(prog) {
|
|
|
41
43
|
console.log();
|
|
42
44
|
}
|
|
43
45
|
if (issueCount) {
|
|
44
|
-
|
|
46
|
+
const exitCode = useExitCode ?? true ? 1 : 0;
|
|
47
|
+
throw new CheckFailed('Issues found', exitCode);
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
}
|
package/dist/esm/commandLint.js
CHANGED
|
@@ -67,6 +67,7 @@ export function commandLint(prog) {
|
|
|
67
67
|
.option('--no-progress', 'Turn off progress messages')
|
|
68
68
|
.option('--no-summary', 'Turn off summary message in console.')
|
|
69
69
|
.option('-s, --silent', 'Silent mode, suppress error messages.')
|
|
70
|
+
.option('--no-exit-code', 'Do not return an exit code if issues are found.')
|
|
70
71
|
.addOption(new CommanderOption('--quiet', 'Only show spelling issues or errors.').implies({
|
|
71
72
|
summary: false,
|
|
72
73
|
progress: false,
|
|
@@ -110,6 +111,7 @@ export function commandLint(prog) {
|
|
|
110
111
|
.addHelpText('after', advanced)
|
|
111
112
|
.arguments('[globs...]')
|
|
112
113
|
.action((fileGlobs, options) => {
|
|
114
|
+
const useExitCode = options.exitCode ?? true;
|
|
113
115
|
App.parseApplicationFeatureFlags(options.flag);
|
|
114
116
|
const { mustFindFiles, fileList } = options;
|
|
115
117
|
return App.lint(fileGlobs, options).then((result) => {
|
|
@@ -117,9 +119,13 @@ export function commandLint(prog) {
|
|
|
117
119
|
spellCheckCommand.outputHelp();
|
|
118
120
|
throw new CheckFailed('outputHelp', 1);
|
|
119
121
|
}
|
|
120
|
-
if (result.
|
|
122
|
+
if (result.errors || (mustFindFiles && !result.files)) {
|
|
121
123
|
throw new CheckFailed('check failed', 1);
|
|
122
124
|
}
|
|
125
|
+
if (result.issues) {
|
|
126
|
+
const exitCode = useExitCode ? 1 : 0;
|
|
127
|
+
throw new CheckFailed('check failed', exitCode);
|
|
128
|
+
}
|
|
123
129
|
return;
|
|
124
130
|
});
|
|
125
131
|
});
|
package/dist/esm/commandLint.mjs
CHANGED
|
@@ -67,6 +67,7 @@ export function commandLint(prog) {
|
|
|
67
67
|
.option('--no-progress', 'Turn off progress messages')
|
|
68
68
|
.option('--no-summary', 'Turn off summary message in console.')
|
|
69
69
|
.option('-s, --silent', 'Silent mode, suppress error messages.')
|
|
70
|
+
.option('--no-exit-code', 'Do not return an exit code if issues are found.')
|
|
70
71
|
.addOption(new CommanderOption('--quiet', 'Only show spelling issues or errors.').implies({
|
|
71
72
|
summary: false,
|
|
72
73
|
progress: false,
|
|
@@ -110,6 +111,7 @@ export function commandLint(prog) {
|
|
|
110
111
|
.addHelpText('after', advanced)
|
|
111
112
|
.arguments('[globs...]')
|
|
112
113
|
.action((fileGlobs, options) => {
|
|
114
|
+
const useExitCode = options.exitCode ?? true;
|
|
113
115
|
App.parseApplicationFeatureFlags(options.flag);
|
|
114
116
|
const { mustFindFiles, fileList } = options;
|
|
115
117
|
return App.lint(fileGlobs, options).then((result) => {
|
|
@@ -117,9 +119,13 @@ export function commandLint(prog) {
|
|
|
117
119
|
spellCheckCommand.outputHelp();
|
|
118
120
|
throw new CheckFailed('outputHelp', 1);
|
|
119
121
|
}
|
|
120
|
-
if (result.
|
|
122
|
+
if (result.errors || (mustFindFiles && !result.files)) {
|
|
121
123
|
throw new CheckFailed('check failed', 1);
|
|
122
124
|
}
|
|
125
|
+
if (result.issues) {
|
|
126
|
+
const exitCode = useExitCode ? 1 : 0;
|
|
127
|
+
throw new CheckFailed('check failed', exitCode);
|
|
128
|
+
}
|
|
123
129
|
return;
|
|
124
130
|
});
|
|
125
131
|
});
|
package/dist/esm/options.d.mts
CHANGED
|
@@ -136,6 +136,11 @@ export interface BaseOptions {
|
|
|
136
136
|
* Check In-Document CSpell directives for correctness.
|
|
137
137
|
*/
|
|
138
138
|
validateDirectives?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Return an exit code if there are issues found.
|
|
141
|
+
* @default true
|
|
142
|
+
*/
|
|
143
|
+
exitCode?: boolean;
|
|
139
144
|
/**
|
|
140
145
|
* Execution flags.
|
|
141
146
|
* Used primarily for releasing experimental features.
|
package/dist/esm/options.d.ts
CHANGED
|
@@ -136,6 +136,11 @@ export interface BaseOptions {
|
|
|
136
136
|
* Check In-Document CSpell directives for correctness.
|
|
137
137
|
*/
|
|
138
138
|
validateDirectives?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Return an exit code if there are issues found.
|
|
141
|
+
* @default true
|
|
142
|
+
*/
|
|
143
|
+
exitCode?: boolean;
|
|
139
144
|
/**
|
|
140
145
|
* Execution flags.
|
|
141
146
|
* Used primarily for releasing experimental features.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.7",
|
|
4
4
|
"description": "A Spelling Checker for Code!",
|
|
5
5
|
"funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
|
|
6
6
|
"bin": {
|
|
@@ -80,20 +80,20 @@
|
|
|
80
80
|
},
|
|
81
81
|
"homepage": "https://streetsidesoftware.github.io/cspell/",
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@cspell/cspell-json-reporter": "7.3.
|
|
84
|
-
"@cspell/cspell-pipe": "7.3.
|
|
85
|
-
"@cspell/cspell-types": "7.3.
|
|
86
|
-
"@cspell/dynamic-import": "7.3.
|
|
83
|
+
"@cspell/cspell-json-reporter": "7.3.7",
|
|
84
|
+
"@cspell/cspell-pipe": "7.3.7",
|
|
85
|
+
"@cspell/cspell-types": "7.3.7",
|
|
86
|
+
"@cspell/dynamic-import": "7.3.7",
|
|
87
87
|
"chalk": "^5.3.0",
|
|
88
88
|
"chalk-template": "^1.1.0",
|
|
89
89
|
"commander": "^11.0.0",
|
|
90
|
-
"cspell-gitignore": "7.3.
|
|
91
|
-
"cspell-glob": "7.3.
|
|
92
|
-
"cspell-io": "7.3.
|
|
93
|
-
"cspell-lib": "7.3.
|
|
90
|
+
"cspell-gitignore": "7.3.7",
|
|
91
|
+
"cspell-glob": "7.3.7",
|
|
92
|
+
"cspell-io": "7.3.7",
|
|
93
|
+
"cspell-lib": "7.3.7",
|
|
94
94
|
"fast-glob": "^3.3.1",
|
|
95
95
|
"fast-json-stable-stringify": "^2.1.0",
|
|
96
|
-
"file-entry-cache": "^
|
|
96
|
+
"file-entry-cache": "^7.0.0",
|
|
97
97
|
"get-stdin": "^9.0.0",
|
|
98
98
|
"semver": "^7.5.4",
|
|
99
99
|
"strip-ansi": "^7.1.0",
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@types/file-entry-cache": "^5.0.2",
|
|
107
107
|
"@types/glob": "^8.1.0",
|
|
108
|
-
"@types/micromatch": "^4.0.
|
|
109
|
-
"@types/semver": "^7.5.
|
|
108
|
+
"@types/micromatch": "^4.0.3",
|
|
109
|
+
"@types/semver": "^7.5.3",
|
|
110
110
|
"micromatch": "^4.0.5",
|
|
111
111
|
"minimatch": "^9.0.3"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "22246a7924b9ae27ae39f0d0217890a1c2736f68"
|
|
114
114
|
}
|