cspell-lib 6.19.2 → 6.20.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/Settings/Controller/configLoader/configLoader.d.ts +14 -0
- package/dist/Settings/Controller/configLoader/configLoader.js +14 -0
- package/dist/SpellingDictionary/DictionaryController/index.d.ts +1 -1
- package/dist/textValidation/docValidator.d.ts +7 -0
- package/dist/textValidation/docValidator.js +7 -0
- package/package.json +15 -15
|
@@ -89,7 +89,21 @@ declare class ConfigLoaderInternal extends ConfigLoader {
|
|
|
89
89
|
readonly _readConfig: (fileRef: ImportFileRef) => import("@cspell/cspell-types").CSpellSettingsWithSourceTrace;
|
|
90
90
|
readonly _normalizeSettings: (rawSettings: import("@cspell/cspell-types").CSpellSettingsWithSourceTrace, pathToSettingsFile: string, pnpSettings: OptionalOrUndefined<PnPSettingsStrict>) => import("../../../Models/CSpellSettingsInternalDef").CSpellSettingsInternal;
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @param searchFrom the directory / file to start searching from.
|
|
95
|
+
* @param pnpSettings - related to Using Yarn PNP.
|
|
96
|
+
* @returns the resulting settings
|
|
97
|
+
*/
|
|
92
98
|
export declare function searchForConfig(searchFrom: string | undefined, pnpSettings?: PnPSettings): Promise<CSpellSettingsI | undefined>;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @param searchFrom the directory / file to start searching from.
|
|
102
|
+
* @param pnpSettings - related to Using Yarn PNP.
|
|
103
|
+
* @returns the resulting settings
|
|
104
|
+
* @deprecated
|
|
105
|
+
* @deprecationMessage Use `searchForConfig`. It is very difficult to support Sync files when settings include web requests.
|
|
106
|
+
*/
|
|
93
107
|
export declare function searchForConfigSync(searchFrom: string | undefined, pnpSettings?: PnPSettings): CSpellSettingsI | undefined;
|
|
94
108
|
/**
|
|
95
109
|
* Load a CSpell configuration files.
|
|
@@ -302,10 +302,24 @@ function normalizeSearchForConfigResult(searchPath, searchResult, pnpSettings) {
|
|
|
302
302
|
error,
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
*
|
|
307
|
+
* @param searchFrom the directory / file to start searching from.
|
|
308
|
+
* @param pnpSettings - related to Using Yarn PNP.
|
|
309
|
+
* @returns the resulting settings
|
|
310
|
+
*/
|
|
305
311
|
function searchForConfig(searchFrom, pnpSettings = defaultPnPSettings) {
|
|
306
312
|
return normalizeSearchForConfigResultAsync(searchFrom || process.cwd(), cspellConfigExplorer().search(searchFrom), pnpSettings).then((r) => (r.filepath ? r.config : undefined));
|
|
307
313
|
}
|
|
308
314
|
exports.searchForConfig = searchForConfig;
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
* @param searchFrom the directory / file to start searching from.
|
|
318
|
+
* @param pnpSettings - related to Using Yarn PNP.
|
|
319
|
+
* @returns the resulting settings
|
|
320
|
+
* @deprecated
|
|
321
|
+
* @deprecationMessage Use `searchForConfig`. It is very difficult to support Sync files when settings include web requests.
|
|
322
|
+
*/
|
|
309
323
|
function searchForConfigSync(searchFrom, pnpSettings = defaultPnPSettings) {
|
|
310
324
|
let searchResult;
|
|
311
325
|
try {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type LoadOptions
|
|
1
|
+
export { DictionaryLoader, type LoadOptions } from './DictionaryLoader';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -40,6 +40,13 @@ export declare class DocumentValidator {
|
|
|
40
40
|
*/
|
|
41
41
|
constructor(doc: TextDocument, options: DocumentValidatorOptions, settings: CSpellUserSettings);
|
|
42
42
|
get ready(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Prepare to validate a document.
|
|
45
|
+
* This will load all the necessary configuration and dictionaries.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated
|
|
48
|
+
* @deprecationMessage Use the async `prepare` method.
|
|
49
|
+
*/
|
|
43
50
|
prepareSync(): void;
|
|
44
51
|
prepare(): Promise<void>;
|
|
45
52
|
private _prepareAsync;
|
|
@@ -42,6 +42,13 @@ class DocumentValidator {
|
|
|
42
42
|
get ready() {
|
|
43
43
|
return this._ready;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Prepare to validate a document.
|
|
47
|
+
* This will load all the necessary configuration and dictionaries.
|
|
48
|
+
*
|
|
49
|
+
* @deprecated
|
|
50
|
+
* @deprecationMessage Use the async `prepare` method.
|
|
51
|
+
*/
|
|
45
52
|
prepareSync() {
|
|
46
53
|
// @todo
|
|
47
54
|
// Determine doc settings.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell-lib",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.20.0",
|
|
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,19 +48,19 @@
|
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/streetsidesoftware/cspell#readme",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@cspell/cspell-bundled-dicts": "6.
|
|
52
|
-
"@cspell/cspell-pipe": "6.
|
|
53
|
-
"@cspell/cspell-types": "6.
|
|
54
|
-
"@cspell/strong-weak-map": "6.
|
|
51
|
+
"@cspell/cspell-bundled-dicts": "6.20.0",
|
|
52
|
+
"@cspell/cspell-pipe": "6.20.0",
|
|
53
|
+
"@cspell/cspell-types": "6.20.0",
|
|
54
|
+
"@cspell/strong-weak-map": "6.20.0",
|
|
55
55
|
"clear-module": "^4.1.2",
|
|
56
56
|
"comment-json": "^4.2.3",
|
|
57
57
|
"configstore": "^5.0.1",
|
|
58
58
|
"cosmiconfig": "^8.0.0",
|
|
59
|
-
"cspell-dictionary": "6.
|
|
60
|
-
"cspell-glob": "6.
|
|
61
|
-
"cspell-grammar": "6.
|
|
62
|
-
"cspell-io": "6.
|
|
63
|
-
"cspell-trie-lib": "6.
|
|
59
|
+
"cspell-dictionary": "6.20.0",
|
|
60
|
+
"cspell-glob": "6.20.0",
|
|
61
|
+
"cspell-grammar": "6.20.0",
|
|
62
|
+
"cspell-io": "6.20.0",
|
|
63
|
+
"cspell-trie-lib": "6.20.0",
|
|
64
64
|
"fast-equals": "^4.0.3",
|
|
65
65
|
"find-up": "^5.0.0",
|
|
66
66
|
"gensequence": "^4.0.3",
|
|
@@ -78,19 +78,19 @@
|
|
|
78
78
|
"@cspell/dict-csharp": "^4.0.2",
|
|
79
79
|
"@cspell/dict-css": "^3.0.0",
|
|
80
80
|
"@cspell/dict-fa-ir": "^2.0.0",
|
|
81
|
-
"@cspell/dict-fr-fr": "^2.
|
|
81
|
+
"@cspell/dict-fr-fr": "^2.2.0",
|
|
82
82
|
"@cspell/dict-html": "^4.0.2",
|
|
83
83
|
"@cspell/dict-nl-nl": "^2.2.8",
|
|
84
84
|
"@cspell/dict-python": "^4.0.1",
|
|
85
85
|
"@types/configstore": "^5.0.1",
|
|
86
|
-
"@types/jest": "^29.
|
|
86
|
+
"@types/jest": "^29.4.0",
|
|
87
87
|
"@types/node": "^18.11.18",
|
|
88
88
|
"cspell-dict-nl-nl": "^1.1.2",
|
|
89
|
-
"jest": "^29.
|
|
89
|
+
"jest": "^29.4.1",
|
|
90
90
|
"lorem-ipsum": "^2.0.8",
|
|
91
|
-
"rollup": "^3.
|
|
91
|
+
"rollup": "^3.12.1",
|
|
92
92
|
"rollup-plugin-dts": "^5.1.1",
|
|
93
93
|
"ts-jest": "^29.0.5"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "9de0bdd5b8da54daa72ccd6c328274bd796ada33"
|
|
96
96
|
}
|