@scrabble-solver/dictionaries 2.15.11 → 2.15.12

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 { Trie } from '@kamilmielnik/trie';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
2
  import { Locale } from '@scrabble-solver/types';
3
3
  export declare class Dictionaries {
4
4
  private readonly cache;
@@ -1,6 +1,6 @@
1
1
  import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
2
+ import { type Locale } from '@scrabble-solver/types';
3
+ import type { Cache } from '../types';
4
4
  export declare class DiskCache implements Cache<Locale, Trie> {
5
5
  get(locale: Locale): Promise<Trie | undefined>;
6
6
  getLastModifiedTimestamp(locale: Locale): number | undefined;
@@ -1,6 +1,6 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Locale } from '@scrabble-solver/types';
3
+ import type { Cache } from '../types';
4
4
  export declare class LayeredCache implements Cache<Locale, Trie> {
5
5
  private readonly layers;
6
6
  get(locale: Locale): Promise<Trie | undefined>;
@@ -1,6 +1,6 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Locale } from '@scrabble-solver/types';
3
+ import type { Cache } from '../types';
4
4
  export declare class MemoryCache implements Cache<Locale, Trie> {
5
5
  private readonly cache;
6
6
  private readonly cacheTimestamps;
@@ -1,4 +1,4 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
3
- import { Cache } from '../types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Locale } from '@scrabble-solver/types';
3
+ import type { Cache } from '../types';
4
4
  export declare const createCacheTimestampComparator: (locale: Locale) => (a: Cache<Locale, Trie>, b: Cache<Locale, Trie>) => number;
@@ -1,3 +1,3 @@
1
1
  import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
2
+ import { type Locale } from '@scrabble-solver/types';
3
3
  export declare const downloadDictionary: (locale: Locale) => Promise<Trie>;
@@ -1,2 +1,2 @@
1
- import { Locale } from '@scrabble-solver/types';
1
+ import { type Locale } from '@scrabble-solver/types';
2
2
  export declare const getDictionaryFilepath: (locale: Locale) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/dictionaries",
3
- "version": "2.15.11",
3
+ "version": "2.15.12",
4
4
  "description": "Scrabble Solver 2 - Dictionaries",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@kamilmielnik/trie": "^4.0.0",
33
- "@scrabble-solver/logger": "^2.15.11",
34
- "@scrabble-solver/types": "^2.15.11",
35
- "@scrabble-solver/word-lists": "^2.15.11"
33
+ "@scrabble-solver/logger": "^2.15.12",
34
+ "@scrabble-solver/types": "^2.15.12",
35
+ "@scrabble-solver/word-lists": "^2.15.12"
36
36
  },
37
- "gitHead": "4fa527098d5e67120adb7964777c044a09378332"
37
+ "gitHead": "1eeef2b2975e63b195885dd2636c53624d300c6b"
38
38
  }
@@ -1,11 +1,11 @@
1
- import { Trie } from '@kamilmielnik/trie';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
2
  import { logger } from '@scrabble-solver/logger';
3
3
  import { Locale } from '@scrabble-solver/types';
4
4
  import fs from 'fs';
5
5
 
6
6
  import { OUTPUT_DIRECTORY } from './constants';
7
7
  import { createAsyncProxy, downloadDictionary, LayeredCache } from './lib';
8
- import { Cache } from './types';
8
+ import { type Cache } from './types';
9
9
 
10
10
  export class Dictionaries {
11
11
  private readonly cache: Cache<Locale, Trie>;
@@ -1,9 +1,9 @@
1
1
  import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
2
+ import { type Locale } from '@scrabble-solver/types';
3
3
  import fs from 'fs';
4
4
 
5
5
  import { CACHE_STALE_THRESHOLD } from '../constants';
6
- import { Cache } from '../types';
6
+ import type { Cache } from '../types';
7
7
 
8
8
  import { getDictionaryFilepath } from './getDictionaryFilepath';
9
9
 
@@ -1,7 +1,7 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Locale } from '@scrabble-solver/types';
3
3
 
4
- import { Cache } from '../types';
4
+ import type { Cache } from '../types';
5
5
 
6
6
  import { createCacheTimestampComparator } from './createCacheTimestampComparator';
7
7
  import { DiskCache } from './DiskCache';
@@ -1,8 +1,8 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Locale } from '@scrabble-solver/types';
3
3
 
4
4
  import { CACHE_STALE_THRESHOLD } from '../constants';
5
- import { Cache } from '../types';
5
+ import type { Cache } from '../types';
6
6
 
7
7
  export class MemoryCache implements Cache<Locale, Trie> {
8
8
  private readonly cache: Partial<Record<Locale, Trie>> = {};
@@ -1,7 +1,7 @@
1
- import { Trie } from '@kamilmielnik/trie';
2
- import { Locale } from '@scrabble-solver/types';
1
+ import { type Trie } from '@kamilmielnik/trie';
2
+ import { type Locale } from '@scrabble-solver/types';
3
3
 
4
- import { Cache } from '../types';
4
+ import type { Cache } from '../types';
5
5
 
6
6
  export const createCacheTimestampComparator = (locale: Locale) => {
7
7
  return (a: Cache<Locale, Trie>, b: Cache<Locale, Trie>): number => {
@@ -1,6 +1,6 @@
1
1
  import { Trie } from '@kamilmielnik/trie';
2
2
  import { logger } from '@scrabble-solver/logger';
3
- import { Locale } from '@scrabble-solver/types';
3
+ import { type Locale } from '@scrabble-solver/types';
4
4
  import { getWordList } from '@scrabble-solver/word-lists';
5
5
 
6
6
  export const downloadDictionary = async (locale: Locale): Promise<Trie> => {
@@ -1,4 +1,4 @@
1
- import { Locale } from '@scrabble-solver/types';
1
+ import { type Locale } from '@scrabble-solver/types';
2
2
  import path from 'path';
3
3
 
4
4
  import { OUTPUT_DIRECTORY } from '../constants';