@cspell/cspell-tools 6.1.2 → 6.1.3

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.js CHANGED
@@ -98,7 +98,7 @@ function run(program, argv) {
98
98
  }
99
99
  exports.run = run;
100
100
  function parseNumber(s) {
101
- const n = parseInt(s !== null && s !== void 0 ? s : '');
101
+ const n = parseInt(s ?? '');
102
102
  return isNaN(n) ? undefined : n;
103
103
  }
104
104
  async function processAction(src, options) {
@@ -157,12 +157,12 @@ function toFilename(name, ext) {
157
157
  }
158
158
  function toTargetFile(filename, destination, ext) {
159
159
  const outFileName = toFilename(filename, ext);
160
- const dir = destination !== null && destination !== void 0 ? destination : path.dirname(filename);
160
+ const dir = destination ?? path.dirname(filename);
161
161
  return path.join(dir, outFileName);
162
162
  }
163
163
  function toMergeTargetFile(filename, destination, ext) {
164
164
  const outFileName = path.join(path.dirname(filename), toFilename(filename, ext));
165
- return path.resolve(destination !== null && destination !== void 0 ? destination : '.', outFileName);
165
+ return path.resolve(destination ?? '.', outFileName);
166
166
  }
167
167
  async function processFilesIndividually(action, filesToProcess, srcToTarget) {
168
168
  const toProcess = filesToProcess.map(async (pFtp) => {
@@ -43,7 +43,7 @@ const wordListHeader = `
43
43
  const wordListHeaderLines = wordListHeader.split('\n').map((a) => a.trim());
44
44
  let log = defaultLogger;
45
45
  function setLogger(logger) {
46
- log = logger !== null && logger !== void 0 ? logger : defaultLogger;
46
+ log = logger ?? defaultLogger;
47
47
  }
48
48
  exports.setLogger = setLogger;
49
49
  function defaultLogger(message, ...optionalParams) {
@@ -179,9 +179,8 @@ exports.compileTrie = compileTrie;
179
179
  function createTrieTarget(destFilename, options) {
180
180
  const target = createTarget(destFilename);
181
181
  return async (words) => {
182
- var _a;
183
182
  log('Reading Words into Trie');
184
- const base = (_a = options.base) !== null && _a !== void 0 ? _a : 32;
183
+ const base = options.base ?? 32;
185
184
  const version = options.trie3 ? 3 : 1;
186
185
  const root = Trie.buildTrie(words).root;
187
186
  log('Reduce duplicate word endings');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspell/cspell-tools",
3
- "version": "6.1.2",
3
+ "version": "6.1.3",
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.3.0",
49
- "cspell-io": "^6.1.2",
50
- "cspell-trie-lib": "^6.1.2",
49
+ "cspell-io": "^6.1.3",
50
+ "cspell-trie-lib": "^6.1.3",
51
51
  "fs-extra": "^10.1.0",
52
52
  "gensequence": "^3.1.1",
53
53
  "glob": "^8.0.3",
54
- "hunspell-reader": "^6.1.2"
54
+ "hunspell-reader": "^6.1.3"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=14"
@@ -59,15 +59,15 @@
59
59
  "devDependencies": {
60
60
  "@types/fs-extra": "^9.0.13",
61
61
  "@types/glob": "^7.2.0",
62
- "@types/jest": "^28.1.1",
63
- "@types/node": "^17.0.40",
62
+ "@types/jest": "^28.1.3",
63
+ "@types/node": "^18.0.0",
64
64
  "@types/rimraf": "^3.0.2",
65
65
  "@types/shelljs": "^0.8.11",
66
66
  "jest": "^28.1.1",
67
- "lorem-ipsum": "^2.0.4",
67
+ "lorem-ipsum": "^2.0.8",
68
68
  "rimraf": "^3.0.2",
69
69
  "shelljs": "^0.8.5"
70
70
  },
71
71
  "main": "bin.js",
72
- "gitHead": "5ef579108a81bf7206cf53e301374467a3bbde06"
72
+ "gitHead": "e96b313542f2ec0a38ac04d1422d97e724ded3a6"
73
73
  }