cspell-dictionary 6.18.0 → 6.19.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.
@@ -1,6 +1,6 @@
1
- import { CacheStats } from '../util/AutoCache';
2
- import { SearchOptions, SpellingDictionary } from './SpellingDictionary';
3
- import { SpellingDictionaryCollection } from './SpellingDictionaryCollection';
1
+ import type { CacheStats } from '../util/AutoCache';
2
+ import type { SearchOptions, SpellingDictionary } from './SpellingDictionary';
3
+ import type { SpellingDictionaryCollection } from './SpellingDictionaryCollection';
4
4
  interface CallStats {
5
5
  name: string;
6
6
  id: number;
@@ -1,4 +1,4 @@
1
- import { SpellingDictionary } from './SpellingDictionary';
1
+ import type { SpellingDictionary } from './SpellingDictionary';
2
2
  /**
3
3
  * Create a dictionary where all words are to be forbidden.
4
4
  * @param wordList - list of words
@@ -1,4 +1,4 @@
1
- import { SpellingDictionary } from './SpellingDictionary';
1
+ import type { SpellingDictionary } from './SpellingDictionary';
2
2
  /**
3
3
  * Create a dictionary where all words are to be ignored.
4
4
  * Ignored words override forbidden words.
@@ -26,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createIgnoreWordsDictionary = void 0;
27
27
  const sync_1 = require("@cspell/cspell-pipe/sync");
28
28
  const cspell_trie_lib_1 = require("cspell-trie-lib");
29
- const Defaults = __importStar(require("./defaults"));
30
29
  const createSpellingDictionary_1 = require("./createSpellingDictionary");
30
+ const Defaults = __importStar(require("./defaults"));
31
31
  const NormalizeForm = 'NFC';
32
32
  class IgnoreWordsDictionary {
33
33
  constructor(name, source, words) {
@@ -1,4 +1,4 @@
1
- import type { ReplaceMap, DictionaryInformation } from '@cspell/cspell-types';
1
+ import type { DictionaryInformation, ReplaceMap } from '@cspell/cspell-types';
2
2
  import type { CompoundWordsMethod, SuggestionCollector, SuggestionResult, WeightMap } from 'cspell-trie-lib';
3
3
  export { CompoundWordsMethod, SuggestionCollector, SuggestionResult } from 'cspell-trie-lib';
4
4
  export interface SearchOptions {
@@ -1,4 +1,4 @@
1
- import { SearchOptions, SpellingDictionary } from './SpellingDictionary';
1
+ import type { SearchOptions, SpellingDictionary } from './SpellingDictionary';
2
2
  export interface SpellingDictionaryCollection extends SpellingDictionary {
3
3
  readonly type: 'SpellingDictionaryCollection';
4
4
  readonly dictionaries: SpellingDictionary[];
@@ -1,6 +1,6 @@
1
1
  import type { SuggestionCollector, SuggestionResult } from 'cspell-trie-lib';
2
2
  import { CompoundWordsMethod, Trie } from 'cspell-trie-lib';
3
- import { FindResult, HasOptions, SpellingDictionary, SpellingDictionaryOptions, SuggestOptions } from './SpellingDictionary';
3
+ import type { FindResult, HasOptions, SpellingDictionary, SpellingDictionaryOptions, SuggestOptions } from './SpellingDictionary';
4
4
  export declare class SpellingDictionaryFromTrie implements SpellingDictionary {
5
5
  readonly trie: Trie;
6
6
  readonly name: string;
@@ -1,6 +1,6 @@
1
- import { DictionaryInformation } from '@cspell/cspell-types';
2
- import { SuggestionResult, WeightMap } from 'cspell-trie-lib';
3
- import { HasOptions, SearchOptions, SuggestArgs, SuggestOptions } from './SpellingDictionary';
1
+ import type { DictionaryInformation } from '@cspell/cspell-types';
2
+ import type { SuggestionResult, WeightMap } from 'cspell-trie-lib';
3
+ import type { HasOptions, SearchOptions, SuggestArgs, SuggestOptions } from './SpellingDictionary';
4
4
  export { impersonateCollector, suggestionCollector } from 'cspell-trie-lib';
5
5
  export type FilterSuggestionsPredicate = (word: SuggestionResult) => boolean;
6
6
  export declare const defaultNumSuggestions = 10;
@@ -1,4 +1,4 @@
1
- import { TypoEntry, TyposDef } from './typos';
1
+ import type { TypoEntry, TyposDef } from './typos';
2
2
  export declare function createTyposDefFromEntries(entries: Iterable<TypoEntry>): TyposDef;
3
3
  export declare function sanitizeIntoTypoDef(dirtyDef: TyposDef | Record<string, unknown> | unknown): TyposDef | undefined;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { TypoEntry, TyposDef, TyposDefKey, TyposDefValue } from './typos';
1
+ import type { TypoEntry, TyposDef, TyposDefKey, TyposDefValue } from './typos';
2
2
  /**
3
3
  * Append an entry to a TyposDef.
4
4
  * @param def - modified in place
@@ -1,4 +1,4 @@
1
- import { IgnoreCaseOption, SpellingDictionary } from './SpellingDictionary';
1
+ import type { IgnoreCaseOption, SpellingDictionary } from './SpellingDictionary';
2
2
  import { type TypoEntry, type TyposDef } from './Typos';
3
3
  export interface TyposDictionary extends SpellingDictionary {
4
4
  isForbidden(word: string, ignoreCaseAndAccents?: IgnoreCaseOption): boolean;
@@ -1,4 +1,4 @@
1
- import { IterableLike } from '../util/IterableLike';
1
+ import type { IterableLike } from '../util/IterableLike';
2
2
  import type { DictionaryInfo, SpellingDictionary, SpellingDictionaryOptions } from './SpellingDictionary';
3
3
  export declare const defaultOptions: SpellingDictionaryOptions;
4
4
  /**
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, } from './SpellingDictionary';
2
1
  export type { CachingDictionary, FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryCollection, SpellingDictionaryOptions, SuggestionCollector, SuggestionResult, SuggestOptions, } from './SpellingDictionary';
2
+ export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, } from './SpellingDictionary';
3
3
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell-dictionary",
3
- "version": "6.18.0",
3
+ "version": "6.19.0",
4
4
  "description": "A spelling dictionary library useful for checking words and getting suggestions.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "build": "tsc -p .",
16
16
  "build-dev": "tsc -p tsconfig.dev.json",
17
17
  "watch": "tsc -p . -w",
18
- "clean": "rimraf dist temp coverage .tsbuildinfo",
18
+ "clean": "shx rm -rf dist temp coverage .tsbuildinfo",
19
19
  "clean-build": "pnpm run clean && pnpm run build",
20
20
  "coverage": "jest --coverage",
21
21
  "test-watch": "jest --watch",
@@ -38,16 +38,16 @@
38
38
  "node": ">=14"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/jest": "^29.2.4",
41
+ "@types/jest": "^29.2.5",
42
42
  "jest": "^29.3.1",
43
- "ts-jest": "^29.0.3"
43
+ "ts-jest": "^29.0.5"
44
44
  },
45
45
  "dependencies": {
46
- "@cspell/cspell-pipe": "6.18.0",
47
- "@cspell/cspell-types": "6.18.0",
48
- "cspell-trie-lib": "6.18.0",
46
+ "@cspell/cspell-pipe": "6.19.0",
47
+ "@cspell/cspell-types": "6.19.0",
48
+ "cspell-trie-lib": "6.19.0",
49
49
  "fast-equals": "^4.0.3",
50
50
  "gensequence": "^4.0.3"
51
51
  },
52
- "gitHead": "6785657a445643ec1c9a17152e3c3733eb0e2a74"
52
+ "gitHead": "f643f0cd6384905618dbca950bd65a39a77dc028"
53
53
  }