cspell 8.17.0 → 8.17.2

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
@@ -145,8 +145,8 @@ Options:
145
145
  -u, --unique Only output the first instance of a word not
146
146
  found in the dictionaries.
147
147
  -e, --exclude <glob> Exclude files matching the glob pattern. This
148
- option can be used multiple times to add
149
- multiple globs.
148
+ option can be used multiple times to add multiple
149
+ globs.
150
150
  --file-list <path or stdin> Specify a list of files to be spell checked. The
151
151
  list is filtered against the glob file patterns.
152
152
  Note: the format is 1 file path per line.
@@ -179,8 +179,7 @@ Options:
179
179
  --gitignore Ignore files matching glob patterns found in
180
180
  .gitignore files.
181
181
  --no-gitignore Do NOT use .gitignore files.
182
- --gitignore-root <path> Prevent searching for .gitignore files past
183
- root.
182
+ --gitignore-root <path> Prevent searching for .gitignore files past root.
184
183
  --validate-directives Validate in-document CSpell directives.
185
184
  --color Force color.
186
185
  --no-color Turn off color.
@@ -259,8 +258,8 @@ Trace words -- Search for words in the configuration and dictionaries.
259
258
  Options:
260
259
  -c, --config <cspell.json> Configuration file to use. By default cspell
261
260
  looks for cspell.json in the current directory.
262
- --locale <locale> Set language locales. i.e. "en,fr" for English
263
- and French, or "en-GB" for British English.
261
+ --locale <locale> Set language locales. i.e. "en,fr" for English and
262
+ French, or "en-GB" for British English.
264
263
  --language-id <language> Use programming language. i.e. "php" or "scala".
265
264
  --allow-compound-words Turn on allowCompoundWords
266
265
  --no-allow-compound-words Turn off allowCompoundWords
package/bin.mjs CHANGED
@@ -3,16 +3,17 @@ import { format } from 'node:util';
3
3
 
4
4
  import { CommanderError, program } from 'commander';
5
5
 
6
- import * as app from './dist/esm/app.mjs';
6
+ import { ApplicationError, CheckFailed, run } from './dist/esm/app.mjs';
7
7
 
8
- app.run(program, process.argv).catch((e) => {
9
- if (!(e instanceof CommanderError) && !(e instanceof app.CheckFailed)) {
10
- const msg = e instanceof app.ApplicationError ? e.message : format(e);
8
+ run(program, process.argv).catch((e) => {
9
+ if (!(e instanceof CommanderError) && !(e instanceof CheckFailed)) {
10
+ const verbose = process.argv.includes('--verbose') || process.argv.includes('-v');
11
+ const msg = !verbose && e instanceof ApplicationError ? e.message : format(e);
11
12
  process.stdout.write(msg + '\n');
12
13
  // It is possible an explicit exit code was set, use it if it was.
13
14
  process.exitCode = process.exitCode || 1;
14
15
  }
15
- if (e instanceof app.CheckFailed) {
16
+ if (e instanceof CheckFailed) {
16
17
  process.exitCode = e.exitCode;
17
18
  }
18
19
  });
@@ -205,14 +205,15 @@ function augmentCommandHelp(context) {
205
205
  const showHidden = !!opts.verbose;
206
206
  const hiddenHelp = [];
207
207
  const help = command.createHelp();
208
+ help.helpWidth = process.stdout.columns || 80;
208
209
  const hiddenOptions = command.options.filter((opt) => opt.hidden && showHidden);
209
210
  const flagColWidth = Math.max(...command.options.map((opt) => opt.flags.length), 0);
210
- const indent = flagColWidth + 4;
211
+ // const indent = flagColWidth + 4;
211
212
  for (const options of hiddenOptions) {
212
213
  if (!hiddenHelp.length) {
213
214
  hiddenHelp.push('\nHidden Options:');
214
215
  }
215
- hiddenHelp.push(help.wrap(` ${options.flags.padEnd(flagColWidth)} ${options.description}`, process.stdout.columns || 80, indent));
216
+ hiddenHelp.push(help.formatItem(options.flags, flagColWidth, options.description, help));
216
217
  }
217
218
  output.push(...hiddenHelp, advanced);
218
219
  return helpIssueTemplate(opts) + output.join('\n');
@@ -1,6 +1,6 @@
1
1
  export { pkgDir } from './dirname.js';
2
2
  export declare const name = "cspell";
3
- export declare const version = "8.17.0";
3
+ export declare const version = "8.17.2";
4
4
  export declare const engines: {
5
5
  node: string;
6
6
  };
@@ -1,7 +1,7 @@
1
1
  // This file is generated by tools/patch-version.mjs
2
2
  export { pkgDir } from './dirname.js';
3
3
  export const name = 'cspell';
4
- export const version = '8.17.0';
4
+ export const version = '8.17.2';
5
5
  export const engines = { node: '>=18' };
6
6
  export const npmPackage = { name, version, engines };
7
7
  //# sourceMappingURL=pkgInfo.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell",
3
- "version": "8.17.0",
3
+ "version": "8.17.2",
4
4
  "description": "A Spelling Checker for Code!",
5
5
  "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
6
6
  "bin": {
@@ -81,19 +81,19 @@
81
81
  },
82
82
  "homepage": "https://cspell.org/",
83
83
  "dependencies": {
84
- "@cspell/cspell-json-reporter": "8.17.0",
85
- "@cspell/cspell-pipe": "8.17.0",
86
- "@cspell/cspell-types": "8.17.0",
87
- "@cspell/dynamic-import": "8.17.0",
88
- "@cspell/url": "8.17.0",
89
- "chalk": "^5.3.0",
84
+ "@cspell/cspell-json-reporter": "8.17.2",
85
+ "@cspell/cspell-pipe": "8.17.2",
86
+ "@cspell/cspell-types": "8.17.2",
87
+ "@cspell/dynamic-import": "8.17.2",
88
+ "@cspell/url": "8.17.2",
89
+ "chalk": "^5.4.1",
90
90
  "chalk-template": "^1.1.0",
91
- "commander": "^12.1.0",
92
- "cspell-dictionary": "8.17.0",
93
- "cspell-gitignore": "8.17.0",
94
- "cspell-glob": "8.17.0",
95
- "cspell-io": "8.17.0",
96
- "cspell-lib": "8.17.0",
91
+ "commander": "^13.0.0",
92
+ "cspell-dictionary": "8.17.2",
93
+ "cspell-gitignore": "8.17.2",
94
+ "cspell-glob": "8.17.2",
95
+ "cspell-io": "8.17.2",
96
+ "cspell-lib": "8.17.2",
97
97
  "fast-json-stable-stringify": "^2.1.0",
98
98
  "file-entry-cache": "^9.1.0",
99
99
  "get-stdin": "^9.0.0",
@@ -111,5 +111,5 @@
111
111
  "micromatch": "^4.0.8",
112
112
  "minimatch": "^9.0.5"
113
113
  },
114
- "gitHead": "cac17fe7b993db5965aa441648b1c22cb5486929"
114
+ "gitHead": "160c982e8d1e3b4951acb6fc003d013f3b0597e0"
115
115
  }