cspell 5.12.4 → 5.12.5

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.
@@ -36,10 +36,10 @@ function lint(files, options, emitters) {
36
36
  exports.lint = lint;
37
37
  async function trace(words, options) {
38
38
  const { local } = options;
39
- const { languageId, locale = local } = options;
39
+ const { languageId, locale = local, allowCompoundWords, ignoreCase } = options;
40
40
  const configFile = await (0, fileHelper_1.readConfig)(options.config, undefined);
41
41
  const config = cspell.mergeSettings(cspell.getDefaultSettings(), cspell.getGlobalSettings(), configFile.config);
42
- const results = await (0, cspell_lib_1.traceWords)(words, config, { languageId, locale });
42
+ const results = await (0, cspell_lib_1.traceWords)(words, config, { languageId, locale, ignoreCase, allowCompoundWords });
43
43
  return results;
44
44
  }
45
45
  exports.trace = trace;
@@ -20,6 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.commandTrace = void 0;
23
+ const commander_1 = require("commander");
23
24
  const App = __importStar(require("./application"));
24
25
  const traceEmitter_1 = require("./traceEmitter");
25
26
  const errors_1 = require("./util/errors");
@@ -30,7 +31,12 @@ function commandTrace(prog) {
30
31
  Search for words in the configuration and dictionaries.`)
31
32
  .option('-c, --config <cspell.json>', 'Configuration file to use. By default cspell looks for cspell.json in the current directory.')
32
33
  .option('--locale <locale>', 'Set language locales. i.e. "en,fr" for English and French, or "en-GB" for British English.')
33
- .option('--languageId <language>', 'Force programming language for unknown extensions. i.e. "php" or "scala"')
34
+ .option('--language-id <language>', 'Use programming language. i.e. "php" or "scala"')
35
+ .addOption(new commander_1.Option('--languageId <language>', 'Use programming language. i.e. "php" or "scala"').hideHelp())
36
+ .option('--allow-compound-words', 'Turn on allowCompoundWords')
37
+ .addOption(new commander_1.Option('--allowCompoundWords', 'Turn on allowCompoundWords').hideHelp())
38
+ .option('--no-allow-compound-words', 'Turn off allowCompoundWords')
39
+ .option('--no-ignore-case', 'Do not ignore case and accents when searching for words')
34
40
  .option('--no-color', 'Turn off color.')
35
41
  .option('--color', 'Force color')
36
42
  .arguments('<words...>')
package/dist/options.d.ts CHANGED
@@ -56,7 +56,10 @@ export interface CSpellApplicationOptions extends BaseOptions {
56
56
  */
57
57
  gitignoreRoot?: string | string[];
58
58
  }
59
- export declare type TraceOptions = BaseOptions;
59
+ export interface TraceOptions extends BaseOptions {
60
+ allowCompoundWords?: boolean;
61
+ ignoreCase?: boolean;
62
+ }
60
63
  export interface BaseOptions {
61
64
  config?: string;
62
65
  languageId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell",
3
- "version": "5.12.4",
3
+ "version": "5.12.5",
4
4
  "description": "A Spelling Checker for Code!",
5
5
  "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
6
6
  "main": "dist/index.js",
@@ -72,9 +72,9 @@
72
72
  "chalk": "^4.1.2",
73
73
  "commander": "^8.3.0",
74
74
  "comment-json": "^4.1.1",
75
- "cspell-gitignore": "^5.12.4",
75
+ "cspell-gitignore": "^5.12.5",
76
76
  "cspell-glob": "^5.12.4",
77
- "cspell-lib": "^5.12.4",
77
+ "cspell-lib": "^5.12.5",
78
78
  "fast-json-stable-stringify": "^2.1.0",
79
79
  "file-entry-cache": "^6.0.1",
80
80
  "fs-extra": "^10.0.0",
@@ -88,7 +88,7 @@
88
88
  "node": ">=12.13.0"
89
89
  },
90
90
  "devDependencies": {
91
- "@cspell/cspell-json-reporter": "^5.12.4",
91
+ "@cspell/cspell-json-reporter": "^5.12.5",
92
92
  "@cspell/cspell-types": "^5.12.4",
93
93
  "@types/file-entry-cache": "^5.0.2",
94
94
  "@types/fs-extra": "^9.0.13",
@@ -101,5 +101,5 @@
101
101
  "minimatch": "^3.0.4",
102
102
  "rimraf": "^3.0.2"
103
103
  },
104
- "gitHead": "3e9973c39725f65141683b373ed839562f28bd94"
104
+ "gitHead": "84a21d1f7cbd17cc9633aafdff6dce19d6de35b5"
105
105
  }