@cspell/cspell-tools 6.6.1 → 6.8.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/dist/app.d.ts CHANGED
@@ -10,6 +10,7 @@ interface CompileCommonOptions {
10
10
  keepRawCase?: boolean;
11
11
  trie?: boolean;
12
12
  trie3?: boolean;
13
+ trie4?: boolean;
13
14
  trieBase?: string;
14
15
  useLegacySplitter?: boolean;
15
16
  }
package/dist/app.js CHANGED
@@ -64,7 +64,8 @@ function addCompileOptions(compileCommand) {
64
64
  .option('--use-legacy-splitter', 'Do not use legacy line splitter logic.')
65
65
  .option('--keep-raw-case', 'Do not normalize words before adding them to dictionary.')
66
66
  .option('-x, --experimental <flag>', 'Experimental flags, used for testing new concepts. Flags: compound', collect, [])
67
- .option('--trie3', '[Beta] Use file format trie3', false)
67
+ .option('--trie3', 'Use file format trie3', false)
68
+ .option('--trie4', 'Use file format trie4', false)
68
69
  .option('--trie-base <number>', 'Advanced: Set the trie base number. A value between 10 and 36');
69
70
  }
70
71
  function run(program, argv) {
@@ -102,7 +103,7 @@ function parseNumber(s) {
102
103
  return isNaN(n) ? undefined : n;
103
104
  }
104
105
  async function processAction(src, options) {
105
- const useTrie = options.trie || options.trie3;
106
+ const useTrie = options.trie || options.trie3 || options.trie4 || false;
106
107
  const fileExt = useTrie ? '.trie' : '.txt';
107
108
  console.log('Compile:\n output: %s\n compress: %s\n files:\n %s \n\n', options.output || 'default', options.compress ? 'true' : 'false', src.join('\n '));
108
109
  const experimental = new Set(options.experimental);
@@ -18,6 +18,7 @@ export declare function createWordListTarget(destFilename: string): (seq: Sequen
18
18
  export interface TrieOptions {
19
19
  base?: number;
20
20
  trie3?: boolean;
21
+ trie4?: boolean;
21
22
  }
22
23
  export interface CompileTrieOptions extends CompileOptions, TrieOptions {
23
24
  }
@@ -181,7 +181,7 @@ function createTrieTarget(destFilename, options) {
181
181
  return async (words) => {
182
182
  log('Reading Words into Trie');
183
183
  const base = options.base ?? 32;
184
- const version = options.trie3 ? 3 : 1;
184
+ const version = options.trie4 ? 4 : options.trie3 ? 3 : 1;
185
185
  const root = Trie.buildTrie(words).root;
186
186
  log('Reduce duplicate word endings');
187
187
  const trie = (0, exports.consolidate)(root);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspell/cspell-tools",
3
- "version": "6.6.1",
3
+ "version": "6.8.1",
4
4
  "description": "Tools to assist with the development of cSpell",
5
5
  "typings": "dist/index.d.ts",
6
6
  "publishConfig": {
@@ -46,12 +46,12 @@
46
46
  "homepage": "https://github.com/streetsidesoftware/cspell#readme",
47
47
  "dependencies": {
48
48
  "commander": "^9.4.0",
49
- "cspell-io": "^6.6.1",
50
- "cspell-trie-lib": "^6.6.1",
49
+ "cspell-io": "^6.8.1",
50
+ "cspell-trie-lib": "^6.8.1",
51
51
  "fs-extra": "^10.1.0",
52
52
  "gensequence": "^3.1.1",
53
53
  "glob": "^8.0.3",
54
- "hunspell-reader": "^6.6.1"
54
+ "hunspell-reader": "^6.8.1"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=14"
@@ -59,8 +59,8 @@
59
59
  "devDependencies": {
60
60
  "@types/fs-extra": "^9.0.13",
61
61
  "@types/glob": "^7.2.0",
62
- "@types/jest": "^28.1.6",
63
- "@types/node": "^18.6.5",
62
+ "@types/jest": "^28.1.8",
63
+ "@types/node": "^18.7.13",
64
64
  "@types/rimraf": "^3.0.2",
65
65
  "@types/shelljs": "^0.8.11",
66
66
  "jest": "^28.1.3",
@@ -69,5 +69,5 @@
69
69
  "shelljs": "^0.8.5"
70
70
  },
71
71
  "main": "bin.js",
72
- "gitHead": "3c9c24d1cebd558ac3729d3fbf441e6ed751d8cf"
72
+ "gitHead": "3c5c8c51b6cad9bc728f3383f5fe6ba34d6d559f"
73
73
  }