cspell-dictionary
Advanced tools
Comparing version 8.0.0 to 8.1.0
@@ -22,3 +22,3 @@ import type { IterableLike } from '../util/IterableLike.js'; | ||
} | ||
export declare function createFailedToLoadDictionary(name: string, source: string, error: Error, options?: SpellingDictionaryOptions | undefined): SpellingDictionary; | ||
export declare function createFailedToLoadDictionary(name: string, sourceUrl: URL | string, error: Error, options?: SpellingDictionaryOptions | undefined): SpellingDictionary; | ||
//# sourceMappingURL=createSpellingDictionary.d.ts.map |
@@ -0,1 +1,2 @@ | ||
import { fileURLToPath } from 'node:url'; | ||
import { buildITrieFromWords, parseDictionaryLines } from 'cspell-trie-lib'; | ||
@@ -19,3 +20,3 @@ import { deepEqual } from 'fast-equals'; | ||
export function createSpellingDictionary(wordList, name, source, options) { | ||
const params = [wordList, name, source, options]; | ||
const params = [wordList, name, source.toString(), options]; | ||
if (!Array.isArray(wordList)) { | ||
@@ -48,3 +49,5 @@ return _createSpellingDictionary(params); | ||
} | ||
export function createFailedToLoadDictionary(name, source, error, options) { | ||
export function createFailedToLoadDictionary(name, sourceUrl, error, options) { | ||
const sourceHref = typeof sourceUrl === 'string' ? sourceUrl : sourceUrl.href; | ||
const source = sourceHref.startsWith('file:') ? fileURLToPath(sourceUrl) : sourceHref; | ||
options = options || {}; | ||
@@ -51,0 +54,0 @@ return { |
{ | ||
"name": "cspell-dictionary", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"description": "A spelling dictionary library useful for checking words and getting suggestions.", | ||
@@ -48,9 +48,9 @@ "type": "module", | ||
"dependencies": { | ||
"@cspell/cspell-pipe": "8.0.0", | ||
"@cspell/cspell-types": "8.0.0", | ||
"cspell-trie-lib": "8.0.0", | ||
"fast-equals": "^4.0.3", | ||
"@cspell/cspell-pipe": "8.1.0", | ||
"@cspell/cspell-types": "8.1.0", | ||
"cspell-trie-lib": "8.1.0", | ||
"fast-equals": "^5.0.1", | ||
"gensequence": "^6.0.0" | ||
}, | ||
"gitHead": "67c22bf98baed1c17bbc658fba8656262d17e370" | ||
"gitHead": "28568808deaf39b9ffa71fd0f722441ff1b8c794" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92783
2400
+ Added@cspell/cspell-pipe@8.1.0(transitive)
+ Added@cspell/cspell-types@8.1.0(transitive)
+ Addedcspell-trie-lib@8.1.0(transitive)
+ Addedfast-equals@5.0.1(transitive)
- Removed@cspell/cspell-pipe@8.0.0(transitive)
- Removed@cspell/cspell-types@8.0.0(transitive)
- Removedcspell-trie-lib@8.0.0(transitive)
- Removedfast-equals@4.0.3(transitive)
Updated@cspell/cspell-pipe@8.1.0
Updated@cspell/cspell-types@8.1.0
Updatedcspell-trie-lib@8.1.0
Updatedfast-equals@^5.0.1