cspell-trie-lib 10.2.2 → 10.3.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -5
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -297,8 +297,8 @@ function findCompoundNode$1(root, word, compoundCharacter, ignoreCasePrefix, com
297
297
  function determineRoot(s) {
298
298
  const prefix = s.compoundPrefix;
299
299
  let r = root;
300
- let i;
301
- for (i = 0; i < prefix.length && r; ++i) r = r.get(prefix[i]);
300
+ let i = 0;
301
+ for (; i < prefix.length && r; ++i) r = r.get(prefix[i]);
302
302
  const caseMatched = s.caseMatched && prefix[0] !== ignoreCasePrefix;
303
303
  return {
304
304
  n: s.n,
@@ -3108,6 +3108,9 @@ var GTrie = class GTrie {
3108
3108
  //#region ../cspell-performance-monitor/dist/index.js
3109
3109
  const symbolCSpell = Symbol.for("cspell");
3110
3110
  const globalThisCSpell = globalThis;
3111
+ function getGlobalCSpellSettings() {
3112
+ return globalThisCSpell[symbolCSpell] ??= {};
3113
+ }
3111
3114
  function _measurePerfStart(name, enabled) {
3112
3115
  if (!enabled) return;
3113
3116
  performance.mark(name + "-start");
@@ -3136,7 +3139,7 @@ function makeDisposableFunction(fn) {
3136
3139
  return disposableFn;
3137
3140
  }
3138
3141
  function isEnabledPerformanceMeasurements() {
3139
- return !!globalThisCSpell[symbolCSpell]?.enablePerformanceMeasurements;
3142
+ return !!getGlobalCSpellSettings().enablePerformanceMeasurements;
3140
3143
  }
3141
3144
  //#endregion
3142
3145
  //#region src/lib/StringTable/StringTable.ts
@@ -5881,8 +5884,8 @@ function findCompoundNode(root, word, compoundCharacter, ignoreCasePrefix, compo
5881
5884
  function determineRoot(s) {
5882
5885
  const prefix = s.compoundPrefix;
5883
5886
  let r = root;
5884
- let i;
5885
- for (i = 0; i < prefix.length && r; ++i) r = r.c?.[prefix[i]];
5887
+ let i = 0;
5888
+ for (; i < prefix.length && r; ++i) r = r.c?.[prefix[i]];
5886
5889
  const caseMatched = s.caseMatched && prefix[0] !== ignoreCasePrefix;
5887
5890
  return {
5888
5891
  n: s.n,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "provenance": true
6
6
  },
7
- "version": "10.2.2",
7
+ "version": "10.3.0",
8
8
  "description": "Trie Data Structure to support cspell.",
9
9
  "type": "module",
10
10
  "sideEffects": false,
@@ -62,16 +62,16 @@
62
62
  "node": ">=22.18.0"
63
63
  },
64
64
  "peerDependencies": {
65
- "@cspell/cspell-types": "10.2.2"
65
+ "@cspell/cspell-types": "10.3.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@cspell/cspell-performance-monitor": "10.2.2",
69
- "@cspell/cspell-pipe": "10.2.2",
68
+ "@cspell/cspell-performance-monitor": "10.3.0",
69
+ "@cspell/cspell-pipe": "10.3.0",
70
70
  "@cspell/dict-cpp": "^7.1.0",
71
71
  "@cspell/dict-en_us": "^4.4.37",
72
72
  "@cspell/dict-es-es": "^3.0.8",
73
73
  "@cspell/dict-nl-nl": "^2.4.2",
74
74
  "gensequence": "^8.0.8"
75
75
  },
76
- "gitHead": "22fae7ac63d4330c52fe97eebee743e3541f2e36"
76
+ "gitHead": "d8abd59fa15da6da47955eb6fcca180e8b5cbdbf"
77
77
  }