cspell 9.2.0 → 9.2.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/README.md CHANGED
@@ -13,10 +13,13 @@ A Spell Checker for Code!
13
13
  <!--- @@inject: ../../static/sponsor.md --->
14
14
 
15
15
  - [![GitHub Sponsors](https://img.shields.io/badge/-black?style=social&logo=githubsponsors&label=GitHub%20Sponsor%3A%20Street%20Side%20Software)](https://github.com/sponsors/streetsidesoftware)
16
- - [![Patreon](https://img.shields.io/badge/-black?style=social&logo=patreon&label=Patreon%3A%20Street%20Side%20Software)](https://patreon.com/streetsidesoftware)
17
16
  - [![PayPal](https://img.shields.io/badge/-black?style=social&logo=paypal&label=PayPal%20Donate%3A%20Street%20Side%20Software)](https://www.paypal.com/donate/?hosted_button_id=26LNBP2Q6MKCY)
18
17
  - [![Open Collective](https://img.shields.io/badge/-black?style=social&logo=opencollective&label=Open%20Collective%3A%20CSpell)](https://opencollective.com/cspell)
19
18
 
19
+ <!---
20
+ - [![Patreon](https://img.shields.io/badge/-black?style=social&logo=patreon&label=Patreon%3A%20Street%20Side%20Software)](https://patreon.com/streetsidesoftware)
21
+ --->
22
+
20
23
  <!--- @@inject-end: ../../static/sponsor.md --->
21
24
 
22
25
  ## Features
package/dist/esm/app.d.ts CHANGED
@@ -3,12 +3,12 @@ import { Command } from "commander";
3
3
 
4
4
  //#region src/util/errors.d.ts
5
5
  declare class CheckFailed extends Error {
6
- readonly exitCode: string;
6
+ readonly exitCode: number;
7
7
  constructor(message: string, exitCode?: number);
8
8
  }
9
9
  declare class ApplicationError extends Error {
10
- readonly exitCode: string;
11
- readonly cause?: number;
10
+ readonly exitCode: number;
11
+ readonly cause?: Error | undefined;
12
12
  constructor(message: string, exitCode?: number, cause?: Error | undefined);
13
13
  }
14
14
  //#endregion
package/dist/esm/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ApplicationError, CheckFailed, DEFAULT_CACHE_LOCATION, IncludeExcludeFlag, ReportChoicesAll, checkText, console, createInit, lint, listDictionaries, npmPackage, parseApplicationFeatureFlags, suggestions, trace } from "./application-_MFvh02K.js";
1
+ import { ApplicationError, CheckFailed, DEFAULT_CACHE_LOCATION, IncludeExcludeFlag, ReportChoicesAll, checkText, console, createInit, lint, listDictionaries, npmPackage, parseApplicationFeatureFlags, suggestions, trace } from "./application-BZlf5spr.js";
2
2
  import { Option, program } from "commander";
3
3
  import { satisfies } from "semver";
4
4
  import chalk from "chalk";
@@ -558,7 +558,6 @@ function commandLink(prog) {
558
558
  const imports = await listGlobalImports();
559
559
  const table = listGlobalImportsResultToTable(imports.list);
560
560
  tableToLines(table).forEach((line) => console.log(line));
561
- return;
562
561
  });
563
562
  linkCommand.command("add <dictionaries...>").alias("a").description("Add dictionaries any other settings to the cspell global config.").action(async (dictionaries) => {
564
563
  const r = await addPathsToGlobalImports(dictionaries);
@@ -566,14 +565,12 @@ function commandLink(prog) {
566
565
  console.log("Adding:");
567
566
  tableToLines(table).forEach((line) => console.log(line));
568
567
  if (r.error) throw new CheckFailed(r.error, 1);
569
- return;
570
568
  });
571
569
  linkCommand.command("remove <paths...>").alias("r").description("Remove matching paths / packages from the global config.").action(async (dictionaries) => {
572
570
  const r = await removePathsFromGlobalImports(dictionaries);
573
571
  console.log("Removing:");
574
572
  if (r.error) throw new CheckFailed(r.error, 1);
575
573
  r.removed.map((f) => console.log(f));
576
- return;
577
574
  });
578
575
  return linkCommand;
579
576
  }
@@ -703,7 +700,6 @@ function commandLint(prog) {
703
700
  const exitCode = useExitCode ? 1 : 0;
704
701
  throw new CheckFailed("check failed", exitCode);
705
702
  }
706
- return;
707
703
  });
708
704
  return spellCheckCommand;
709
705
  }
@@ -273,7 +273,6 @@ function getReporter(options, config) {
273
273
  fn(r);
274
274
  };
275
275
  }
276
- const repeatIssues = false;
277
276
  const issuesCollection = void 0;
278
277
  const errorCollection = [];
279
278
  function errorEmitter(message, error) {
@@ -789,7 +788,7 @@ const pkgDir = _dirname;
789
788
  //#endregion
790
789
  //#region src/pkgInfo.ts
791
790
  const name = "cspell";
792
- const version$1 = "9.2.0";
791
+ const version$1 = "9.2.1";
793
792
  const engines = { node: ">=20" };
794
793
  const npmPackage = {
795
794
  name,
@@ -1940,14 +1939,12 @@ function getTimeMeasurer() {
1940
1939
  //#region src/util/writeFile.ts
1941
1940
  async function writeFileOrStream(filename, data) {
1942
1941
  switch (filename) {
1943
- case "stdout": {
1942
+ case "stdout":
1944
1943
  await writeStream(process.stdout, data);
1945
1944
  return;
1946
- }
1947
- case "stderr": {
1945
+ case "stderr":
1948
1946
  await writeStream(process.stderr, data);
1949
1947
  return;
1950
- }
1951
1948
  case "null": return;
1952
1949
  }
1953
1950
  return fs.writeFile(filename, data);
@@ -2476,22 +2473,18 @@ function extractUnknownWordsConfig(options) {
2476
2473
  const config = {};
2477
2474
  if (!options.report) return config;
2478
2475
  switch (options.report) {
2479
- case "all": {
2476
+ case "all":
2480
2477
  config.unknownWords = unknownWordsChoices.ReportAll;
2481
2478
  break;
2482
- }
2483
- case "simple": {
2479
+ case "simple":
2484
2480
  config.unknownWords = unknownWordsChoices.ReportSimple;
2485
2481
  break;
2486
- }
2487
- case "typos": {
2482
+ case "typos":
2488
2483
  config.unknownWords = unknownWordsChoices.ReportCommonTypos;
2489
2484
  break;
2490
- }
2491
- case "flagged": {
2485
+ case "flagged":
2492
2486
  config.unknownWords = unknownWordsChoices.ReportFlagged;
2493
2487
  break;
2494
- }
2495
2488
  }
2496
2489
  return config;
2497
2490
  }
@@ -2758,4 +2751,4 @@ function parseApplicationFeatureFlags(flags) {
2758
2751
 
2759
2752
  //#endregion
2760
2753
  export { ApplicationError, CheckFailed, DEFAULT_CACHE_LOCATION, IncludeExcludeFlag, ReportChoicesAll, checkText, console, createInit, getReporter, lint, listDictionaries, npmPackage, parseApplicationFeatureFlags, suggestions, trace };
2761
- //# sourceMappingURL=application-_MFvh02K.js.map
2754
+ //# sourceMappingURL=application-BZlf5spr.js.map
@@ -1,3 +1,3 @@
1
- import { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace } from "./application-_MFvh02K.js";
1
+ import { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace } from "./application-BZlf5spr.js";
2
2
 
3
3
  export { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { IncludeExcludeFlag, checkText, createInit, getReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace } from "./application-_MFvh02K.js";
1
+ import { IncludeExcludeFlag, checkText, createInit, getReporter, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace } from "./application-BZlf5spr.js";
2
2
 
3
3
  export * from "@cspell/cspell-types"
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell",
3
- "version": "9.2.0",
3
+ "version": "9.2.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.2.0",
87
- "@cspell/cspell-pipe": "9.2.0",
88
- "@cspell/cspell-types": "9.2.0",
89
- "@cspell/dynamic-import": "9.2.0",
90
- "@cspell/url": "9.2.0",
91
- "chalk": "^5.4.1",
86
+ "@cspell/cspell-json-reporter": "9.2.1",
87
+ "@cspell/cspell-pipe": "9.2.1",
88
+ "@cspell/cspell-types": "9.2.1",
89
+ "@cspell/dynamic-import": "9.2.1",
90
+ "@cspell/url": "9.2.1",
91
+ "chalk": "^5.6.0",
92
92
  "chalk-template": "^1.1.0",
93
93
  "commander": "^14.0.0",
94
- "cspell-config-lib": "9.2.0",
95
- "cspell-dictionary": "9.2.0",
96
- "cspell-gitignore": "9.2.0",
97
- "cspell-glob": "9.2.0",
98
- "cspell-io": "9.2.0",
99
- "cspell-lib": "9.2.0",
94
+ "cspell-config-lib": "9.2.1",
95
+ "cspell-dictionary": "9.2.1",
96
+ "cspell-gitignore": "9.2.1",
97
+ "cspell-glob": "9.2.1",
98
+ "cspell-io": "9.2.1",
99
+ "cspell-lib": "9.2.1",
100
100
  "fast-json-stable-stringify": "^2.1.0",
101
101
  "flatted": "^3.3.3",
102
102
  "semver": "^7.7.2",
@@ -112,5 +112,5 @@
112
112
  "micromatch": "^4.0.8",
113
113
  "minimatch": "^9.0.5"
114
114
  },
115
- "gitHead": "6004e6a19e11985bc61e6578846195be07365049"
115
+ "gitHead": "3a165c2afd917f4a923c2316f3768eaf18aa3e4b"
116
116
  }