cspell 10.2.2 → 10.3.0-alpha.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.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-qDg_2kXe.js";
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-Cqza-eQU.js";
2
2
  import { Link } from "cspell-lib";
3
3
  import chalk from "chalk";
4
4
  import * as iPath from "node:path";
@@ -4,6 +4,7 @@ import * as cspell from "cspell-lib";
4
4
  import { ENV_CSPELL_GLOB_ROOT, IncludeExcludeFlag, MessageTypes, SuggestionError, Text, checkTextDocument, combineTextAndLanguageSettings, createDictionaryReferenceCollection, createPerfTimer, extractDependencies, extractImportErrors, fileToDocument, getDefaultSettings, getGlobalSettingsAsync, getSystemFeatureFlags, isBinaryFile, isSpellingDictionaryLoadError, mergeSettings, setLogger, shouldCheckDocument, spellCheckDocument, suggestionsForWords, traceWordsAsync } from "cspell-lib";
5
5
  import assert from "node:assert";
6
6
  import { format, formatWithOptions, stripVTControlCharacters } from "node:util";
7
+ import { enablePerformanceMeasurements, getCounters, measurePerf } from "@cspell/cspell-performance-monitor";
7
8
  import { isUrlLike, toFileDirURL, toFilePathOrHref, toFileURL, urlRelative } from "@cspell/url";
8
9
  import chalk, { Chalk } from "chalk";
9
10
  import { makeTemplate } from "chalk-template";
@@ -14,7 +15,6 @@ import { promises } from "node:fs";
14
15
  import { fileURLToPath } from "node:url";
15
16
  import * as path$1 from "node:path";
16
17
  import path, { isAbsolute, posix, relative, resolve, sep } from "node:path";
17
- import { enablePerformanceMeasurements, measurePerf } from "@cspell/cspell-performance-monitor";
18
18
  import { opMap as opMap$1, pipe } from "@cspell/cspell-pipe/sync";
19
19
  import { IssueType, MessageTypes as MessageTypes$1, unknownWordsChoices } from "@cspell/cspell-types";
20
20
  import { dictionaryCacheEnableLogging, dictionaryCacheGetLog } from "cspell-dictionary";
@@ -660,6 +660,10 @@ function getReporter(options, config) {
660
660
  function verbosePerfReport() {
661
661
  const perfMeasurements = getPerfMeasurements();
662
662
  if (!perfMeasurements.length) return;
663
+ dispVerbosePerfReport(perfMeasurements);
664
+ counterReport();
665
+ }
666
+ function dispVerbosePerfReport(perfMeasurements) {
663
667
  const notable = extractNotableBySelfTimeInGroup(perfMeasurements);
664
668
  const chalk = stderr.chalk;
665
669
  const maxDepth = Math.max(...perfMeasurements.map((m) => m.depth));
@@ -703,6 +707,25 @@ function getReporter(options, config) {
703
707
  consoleError("\n-------------------------------------------\n");
704
708
  for (const line of table) consoleError(line);
705
709
  }
710
+ function counterReport() {
711
+ const counters = [...getCounters()];
712
+ if (!counters.length) return;
713
+ counters.sort((a, b) => a.count - b.count);
714
+ const chalk = stderr.chalk;
715
+ const rows = counters.map((m) => ({
716
+ Name: m.name,
717
+ Count: m.count.toString()
718
+ }));
719
+ const table = tableToLines({
720
+ title: chalk.bold("Counter Measurements:"),
721
+ header: ["Name", "Count"],
722
+ rows,
723
+ columnAlignments: ["L", "R"],
724
+ indent: 2
725
+ });
726
+ consoleError("\n-------------------------------------------\n");
727
+ for (const line of table) consoleError(line);
728
+ }
706
729
  function colorByDepth(chalk, depth, text) {
707
730
  const colors = [
708
731
  chalk.green,
@@ -1190,7 +1213,7 @@ try {
1190
1213
  const pkgDir = _dirname;
1191
1214
  const npmPackage = {
1192
1215
  name: "cspell",
1193
- version: "10.2.2",
1216
+ version: "10.3.0-alpha.0",
1194
1217
  engines: { node: ">=22.18.0" }
1195
1218
  };
1196
1219
  //#endregion
@@ -2801,7 +2824,7 @@ function runResult(init = {}) {
2801
2824
  };
2802
2825
  }
2803
2826
  //#endregion
2804
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/usingCtx.js
2827
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/usingCtx.js
2805
2828
  function _usingCtx() {
2806
2829
  var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
2807
2830
  var n = Error();
@@ -3509,4 +3532,4 @@ function parseApplicationFeatureFlags(flags) {
3509
3532
  //#endregion
3510
3533
  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 };
3511
3534
 
3512
- //# sourceMappingURL=application-qDg_2kXe.js.map
3535
+ //# sourceMappingURL=application-Cqza-eQU.js.map
@@ -1,2 +1,2 @@
1
- import { a as parseApplicationFeatureFlags, c as listDictionaries, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-qDg_2kXe.js";
1
+ import { a as parseApplicationFeatureFlags, c as listDictionaries, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-Cqza-eQU.js";
2
2
  export { IncludeExcludeFlag, checkText, createInit, lint, listDictionaries, parseApplicationFeatureFlags, suggestions, trace };
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as parseApplicationFeatureFlags, c as listDictionaries, h as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-qDg_2kXe.js";
1
+ import { a as parseApplicationFeatureFlags, c as listDictionaries, h as getReporter, i as lint, n as checkText, o as suggestions, r as createInit, s as trace, t as IncludeExcludeFlag } from "./application-Cqza-eQU.js";
2
2
  export * from "@cspell/cspell-types";
3
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.2.2",
3
+ "version": "10.3.0-alpha.0",
4
4
  "description": "A Spelling Checker for Code!",
5
5
  "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1",
6
6
  "bin": {
@@ -90,23 +90,23 @@
90
90
  },
91
91
  "homepage": "https://cspell.org/",
92
92
  "dependencies": {
93
- "@cspell/cspell-json-reporter": "10.2.2",
94
- "@cspell/cspell-performance-monitor": "10.2.2",
95
- "@cspell/cspell-pipe": "10.2.2",
96
- "@cspell/cspell-types": "10.2.2",
97
- "@cspell/cspell-worker": "10.2.2",
98
- "@cspell/dynamic-import": "10.2.2",
99
- "@cspell/url": "10.2.2",
93
+ "@cspell/cspell-json-reporter": "10.3.0-alpha.0",
94
+ "@cspell/cspell-performance-monitor": "10.3.0-alpha.0",
95
+ "@cspell/cspell-pipe": "10.3.0-alpha.0",
96
+ "@cspell/cspell-types": "10.3.0-alpha.0",
97
+ "@cspell/cspell-worker": "10.3.0-alpha.0",
98
+ "@cspell/dynamic-import": "10.3.0-alpha.0",
99
+ "@cspell/url": "10.3.0-alpha.0",
100
100
  "ansi-regex": "^6.3.0",
101
101
  "chalk": "^6.0.0",
102
102
  "chalk-template": "^1.1.2",
103
103
  "commander": "^15.0.0",
104
- "cspell-config-lib": "10.2.2",
105
- "cspell-dictionary": "10.2.2",
106
- "cspell-gitignore": "10.2.2",
107
- "cspell-glob": "10.2.2",
108
- "cspell-io": "10.2.2",
109
- "cspell-lib": "10.2.2",
104
+ "cspell-config-lib": "10.3.0-alpha.0",
105
+ "cspell-dictionary": "10.3.0-alpha.0",
106
+ "cspell-gitignore": "10.3.0-alpha.0",
107
+ "cspell-glob": "10.3.0-alpha.0",
108
+ "cspell-io": "10.3.0-alpha.0",
109
+ "cspell-lib": "10.3.0-alpha.0",
110
110
  "fast-json-stable-stringify": "^2.1.0",
111
111
  "flatted": "^3.4.4",
112
112
  "semver": "^7.8.5",
@@ -121,5 +121,5 @@
121
121
  "micromatch": "^4.0.8",
122
122
  "minimatch": "^9.0.9"
123
123
  },
124
- "gitHead": "22fae7ac63d4330c52fe97eebee743e3541f2e36"
124
+ "gitHead": "39297075c7a4946feb1a4f0a509e329cfb0b4f11"
125
125
  }