@cspell/cspell-tools 6.1.2 → 6.1.3-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/app.js +3 -3
- package/dist/compiler/wordListCompiler.js +2 -3
- package/package.json +7 -7
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
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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.
|
|
3
|
+
"version": "6.1.3-alpha.0",
|
|
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.
|
|
50
|
-
"cspell-trie-lib": "^6.1.
|
|
49
|
+
"cspell-io": "^6.1.3-alpha.0",
|
|
50
|
+
"cspell-trie-lib": "^6.1.3-alpha.0",
|
|
51
51
|
"fs-extra": "^10.1.0",
|
|
52
52
|
"gensequence": "^3.1.1",
|
|
53
53
|
"glob": "^8.0.3",
|
|
54
|
-
"hunspell-reader": "^6.1.
|
|
54
|
+
"hunspell-reader": "^6.1.3-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=14"
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"@types/fs-extra": "^9.0.13",
|
|
61
61
|
"@types/glob": "^7.2.0",
|
|
62
62
|
"@types/jest": "^28.1.1",
|
|
63
|
-
"@types/node": "^17.0.
|
|
63
|
+
"@types/node": "^17.0.43",
|
|
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.
|
|
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": "
|
|
72
|
+
"gitHead": "b3cde7e463fd8a6f2c03f990adc70b913239baeb"
|
|
73
73
|
}
|