hunspell-reader 7.3.8 → 8.0.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/IterableHunspellReader.js +2 -0
- package/dist/aff.js +5 -2
- package/dist/converter.js +2 -0
- package/dist/iterableToStream.js +3 -1
- package/package.json +5 -5
package/dist/aff.js
CHANGED
|
@@ -6,9 +6,13 @@ import { filterOrderedList, isDefined } from './util.js';
|
|
|
6
6
|
const log = false;
|
|
7
7
|
const DefaultMaxDepth = 5;
|
|
8
8
|
export class Aff {
|
|
9
|
+
affInfo;
|
|
10
|
+
rules;
|
|
11
|
+
_oConv;
|
|
12
|
+
_iConv;
|
|
13
|
+
_maxSuffixDepth = DefaultMaxDepth;
|
|
9
14
|
constructor(affInfo) {
|
|
10
15
|
this.affInfo = affInfo;
|
|
11
|
-
this._maxSuffixDepth = DefaultMaxDepth;
|
|
12
16
|
this.rules = processRules(affInfo);
|
|
13
17
|
this._iConv = new Converter(affInfo.ICONV || []);
|
|
14
18
|
this._oConv = new Converter(affInfo.OCONV || []);
|
|
@@ -164,7 +168,6 @@ export function processRules(affInfo) {
|
|
|
164
168
|
.map((pfx) => ({ id: pfx.id, type: 'pfx', pfx }));
|
|
165
169
|
const flagRules = GS.sequenceFromObject(affInfo)
|
|
166
170
|
.filter(([key, value]) => !!affFlag[key] && !!value)
|
|
167
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
168
171
|
.map(([key, value]) => ({ id: value, type: 'flag', flags: affFlag[key] }));
|
|
169
172
|
const rules = sfxRules
|
|
170
173
|
.concat(pfxRules)
|
package/dist/converter.js
CHANGED
package/dist/iterableToStream.js
CHANGED
|
@@ -6,10 +6,12 @@ export function iterableToStream(src, options = { encoding: 'utf8' }) {
|
|
|
6
6
|
return new ReadableObservableStream(src, options);
|
|
7
7
|
}
|
|
8
8
|
class ReadableObservableStream extends stream.Readable {
|
|
9
|
+
_source;
|
|
10
|
+
iter;
|
|
11
|
+
done = false;
|
|
9
12
|
constructor(_source, options) {
|
|
10
13
|
super(options);
|
|
11
14
|
this._source = _source;
|
|
12
|
-
this.done = false;
|
|
13
15
|
}
|
|
14
16
|
_read() {
|
|
15
17
|
if (!this.iter) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hunspell-reader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "A library for reading Hunspell Dictionary Files",
|
|
5
5
|
"bin": "bin.js",
|
|
6
6
|
"type": "module",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/hunspell-reader#readme",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@cspell/cspell-pipe": "^
|
|
46
|
-
"@cspell/cspell-types": "^
|
|
45
|
+
"@cspell/cspell-pipe": "^8.0.0",
|
|
46
|
+
"@cspell/cspell-types": "^8.0.0",
|
|
47
47
|
"commander": "^11.1.0",
|
|
48
48
|
"gensequence": "^6.0.0",
|
|
49
49
|
"iconv-lite": "^0.6.3"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
52
|
+
"node": ">=18"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "67c22bf98baed1c17bbc658fba8656262d17e370"
|
|
55
55
|
}
|