hunspell-reader 7.3.9 → 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.
@@ -6,6 +6,8 @@ import { filterOrderedList } from './util.js';
6
6
  const { decode } = pkgIconvLite;
7
7
  const defaultEncoding = 'UTF-8';
8
8
  export class IterableHunspellReader {
9
+ src;
10
+ aff;
9
11
  constructor(src) {
10
12
  this.src = src;
11
13
  this.aff = src.aff;
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
@@ -1,5 +1,7 @@
1
1
  const regexSpecialCharacters = /[|\\{}()[\]^$+*?.]/g;
2
2
  export class Converter {
3
+ _match;
4
+ _map;
3
5
  constructor(convList) {
4
6
  const match = convList.map(({ from }) => from.replace(regexSpecialCharacters, '\\$&')).join('|');
5
7
  this._match = new RegExp(match, 'g');
@@ -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": "7.3.9",
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": "^7.3.9",
46
- "@cspell/cspell-types": "^7.3.9",
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": ">=16"
52
+ "node": ">=18"
53
53
  },
54
- "gitHead": "77c7fb3ffd80a626ec07d704cefcaa21d62fd460"
54
+ "gitHead": "67c22bf98baed1c17bbc658fba8656262d17e370"
55
55
  }