cspell-lib 6.2.0-alpha.0 → 6.2.0-alpha.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.
@@ -1,4 +1,4 @@
1
- import { CSpellSettingsWithSourceTrace, DictionaryDefinitionAugmented, DictionaryDefinitionCustom, DictionaryDefinitionPreferred } from '@cspell/cspell-types';
1
+ import { CSpellSettingsWithSourceTrace, DictionaryDefinitionAugmented, DictionaryDefinitionCustom, DictionaryDefinitionPreferred, Parser } from '@cspell/cspell-types';
2
2
  import { WeightMap } from 'cspell-trie-lib';
3
3
  import { OptionalOrUndefined } from '../util/types';
4
4
  export declare const SymbolCSpellSettingsInternal: unique symbol;
@@ -7,6 +7,7 @@ export interface CSpellSettingsInternal extends Omit<CSpellSettingsWithSourceTra
7
7
  dictionaryDefinitions?: DictionaryDefinitionInternal[];
8
8
  }
9
9
  export interface CSpellSettingsInternalFinalized extends CSpellSettingsInternal {
10
+ parserFn: Parser | undefined;
10
11
  finalized: true;
11
12
  ignoreRegExpList: RegExp[];
12
13
  includeRegExpList: RegExp[];
@@ -228,7 +228,7 @@ function _finalizeSettings(settings) {
228
228
  finalized: true,
229
229
  ignoreRegExpList: (0, patterns_1.resolvePatterns)(settings.ignoreRegExpList, settings.patterns),
230
230
  includeRegExpList: (0, patterns_1.resolvePatterns)(settings.includeRegExpList, settings.patterns),
231
- parser: resolveParser(settings),
231
+ parserFn: resolveParser(settings),
232
232
  };
233
233
  finalized.name = 'Finalized ' + (finalized.name || '');
234
234
  finalized.source = { name: settings.name || 'src', sources: [settings] };
@@ -256,7 +256,7 @@ class DocumentValidator {
256
256
  }
257
257
  _parse() {
258
258
  (0, assert_1.default)(this._preparations, ERROR_NOT_PREPARED);
259
- const parser = this._preparations.finalSettings.parser;
259
+ const parser = this._preparations.finalSettings.parserFn;
260
260
  if (typeof parser !== 'object')
261
261
  return this.defaultParser();
262
262
  return parser.parse(this.document.text, this.document.uri.path).parsedTexts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell-lib",
3
- "version": "6.2.0-alpha.0",
3
+ "version": "6.2.0-alpha.1",
4
4
  "description": "A library of useful functions used across various cspell tools.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -48,16 +48,16 @@
48
48
  },
49
49
  "homepage": "https://github.com/streetsidesoftware/cspell#readme",
50
50
  "dependencies": {
51
- "@cspell/cspell-bundled-dicts": "^6.2.0-alpha.0",
52
- "@cspell/cspell-pipe": "^6.1.3",
53
- "@cspell/cspell-types": "^6.1.3",
51
+ "@cspell/cspell-bundled-dicts": "^6.2.0-alpha.1",
52
+ "@cspell/cspell-pipe": "^6.2.0-alpha.1",
53
+ "@cspell/cspell-types": "^6.2.0-alpha.1",
54
54
  "clear-module": "^4.1.2",
55
55
  "comment-json": "^4.2.2",
56
56
  "configstore": "^5.0.1",
57
57
  "cosmiconfig": "^7.0.1",
58
- "cspell-glob": "^6.1.3",
59
- "cspell-io": "^6.2.0-alpha.0",
60
- "cspell-trie-lib": "^6.2.0-alpha.0",
58
+ "cspell-glob": "^6.2.0-alpha.1",
59
+ "cspell-io": "^6.2.0-alpha.1",
60
+ "cspell-trie-lib": "^6.2.0-alpha.1",
61
61
  "fast-equals": "^4.0.1",
62
62
  "find-up": "^5.0.0",
63
63
  "fs-extra": "^10.1.0",
@@ -85,12 +85,12 @@
85
85
  "@types/jest": "^28.1.3",
86
86
  "@types/node": "^18.0.0",
87
87
  "cspell-dict-nl-nl": "^1.1.2",
88
- "jest": "^28.1.1",
88
+ "jest": "^28.1.2",
89
89
  "lorem-ipsum": "^2.0.8",
90
90
  "rimraf": "^3.0.2",
91
91
  "rollup": "^2.75.7",
92
92
  "rollup-plugin-dts": "^4.2.2",
93
93
  "ts-jest": "^28.0.5"
94
94
  },
95
- "gitHead": "9d9bb9af319c331cfbacd1a5aa62aa0d1147e35b"
95
+ "gitHead": "bb1862e9d5116b64451e625eb002f835e2873f9b"
96
96
  }