@scrabble-solver/word-definitions 2.15.11 → 2.15.13

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,2 +1,2 @@
1
- import { Locale, WordDefinition } from '@scrabble-solver/types';
1
+ import { type Locale, WordDefinition } from '@scrabble-solver/types';
2
2
  export declare const getWordDefinition: (locale: Locale, word: string, isAllowed: boolean) => Promise<WordDefinition>;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (html: string) => ParsingResult;
@@ -1,3 +1,3 @@
1
- import { ParsingResult } from '../types';
1
+ import type { ParsingResult } from '../types';
2
2
  export declare const crawl: (word: string) => Promise<string>;
3
3
  export declare const parse: (json: string) => ParsingResult;
@@ -1,4 +1,4 @@
1
- import { RequestOptions } from 'http';
1
+ import { type RequestOptions } from 'http';
2
2
  interface Options extends RequestOptions {
3
3
  protocol?: 'http' | 'https';
4
4
  }
package/build/parse.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { Locale } from '@scrabble-solver/types';
2
- import { ParsingResult } from './types';
2
+ import { type ParsingResult } from './types';
3
3
  export declare const parse: (locale: Locale, html: string) => ParsingResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrabble-solver/word-definitions",
3
- "version": "2.15.11",
3
+ "version": "2.15.13",
4
4
  "description": "Scrabble Solver 2 - Word definitions",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "clean": "rimraf build/"
24
24
  },
25
25
  "dependencies": {
26
- "@scrabble-solver/types": "^2.15.11",
27
- "cheerio": "^1.0.0",
26
+ "@scrabble-solver/types": "^2.15.13",
27
+ "cheerio": "^1.1.0",
28
28
  "follow-redirects": "^1.15.9",
29
29
  "striptags": "^3.2.0"
30
30
  },
@@ -32,5 +32,5 @@
32
32
  "@types/follow-redirects": "^1.14.4",
33
33
  "domhandler": "^5.0.3"
34
34
  },
35
- "gitHead": "4fa527098d5e67120adb7964777c044a09378332"
35
+ "gitHead": "fd3e02f7051acdb8cc6dd138a959679bc00f1ed6"
36
36
  }
@@ -1,4 +1,4 @@
1
- import { Locale, WordDefinition } from '@scrabble-solver/types';
1
+ import { type Locale, WordDefinition } from '@scrabble-solver/types';
2
2
 
3
3
  import { crawl } from './crawl';
4
4
  import { parse } from './parse';
@@ -1,7 +1,7 @@
1
1
  import { load } from 'cheerio';
2
2
 
3
3
  import { request } from '../lib';
4
- import { ParsingResult } from '../types';
4
+ import type { ParsingResult } from '../types';
5
5
 
6
6
  const DOES_NOT_EXIST_MESSAGE =
7
7
  // eslint-disable-next-line max-len
@@ -1,7 +1,7 @@
1
1
  import { load } from 'cheerio';
2
2
 
3
3
  import { request } from '../lib';
4
- import { ParsingResult } from '../types';
4
+ import type { ParsingResult } from '../types';
5
5
 
6
6
  export const crawl = (word: string): Promise<string> => {
7
7
  return request({
@@ -1,8 +1,8 @@
1
- import { Cheerio, CheerioAPI, load } from 'cheerio';
1
+ import { type Cheerio, type CheerioAPI, load } from 'cheerio';
2
2
  import type { Element } from 'domhandler';
3
3
 
4
4
  import { request } from '../lib';
5
- import { ParsingResult } from '../types';
5
+ import type { ParsingResult } from '../types';
6
6
 
7
7
  export const crawl = (word: string): Promise<string> => {
8
8
  return request({
@@ -1,7 +1,7 @@
1
1
  import { load } from 'cheerio';
2
2
 
3
3
  import { request } from '../lib';
4
- import { ParsingResult } from '../types';
4
+ import type { ParsingResult } from '../types';
5
5
 
6
6
  const DOES_NOT_EXIST_MESSAGE = '404 Page Not Found';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { load } from 'cheerio';
2
2
 
3
3
  import { request } from '../lib';
4
- import { ParsingResult } from '../types';
4
+ import type { ParsingResult } from '../types';
5
5
 
6
6
  export const crawl = (word: string): Promise<string> => {
7
7
  return request({
@@ -1,7 +1,7 @@
1
1
  import { load } from 'cheerio';
2
2
 
3
3
  import { request } from '../lib';
4
- import { ParsingResult } from '../types';
4
+ import type { ParsingResult } from '../types';
5
5
 
6
6
  export const crawl = (word: string): Promise<string> => {
7
7
  return request({
@@ -1,7 +1,7 @@
1
1
  import { load } from 'cheerio';
2
2
 
3
3
  import { request } from '../lib';
4
- import { ParsingResult } from '../types';
4
+ import type { ParsingResult } from '../types';
5
5
 
6
6
  export const crawl = (word: string): Promise<string> => {
7
7
  return request({
@@ -1,5 +1,5 @@
1
1
  import { request } from '../lib';
2
- import { ParsingResult } from '../types';
2
+ import type { ParsingResult } from '../types';
3
3
 
4
4
  export const crawl = (word: string): Promise<string> => {
5
5
  return request({
@@ -1,6 +1,6 @@
1
1
  import { isError } from '@scrabble-solver/types';
2
2
  import { http, https } from 'follow-redirects';
3
- import { RequestOptions } from 'http';
3
+ import { type RequestOptions } from 'http';
4
4
 
5
5
  interface Options extends RequestOptions {
6
6
  protocol?: 'http' | 'https';
package/src/parse.ts CHANGED
@@ -2,7 +2,7 @@ import { Locale } from '@scrabble-solver/types';
2
2
 
3
3
  import { english, french, german, persian, polish, romanian, spanish, turkish } from './languages';
4
4
  import { normalizeDefinition, unique } from './lib';
5
- import { ParsingResult } from './types';
5
+ import { type ParsingResult } from './types';
6
6
 
7
7
  const parsePerLocale: Record<Locale, (html: string) => ParsingResult> = {
8
8
  [Locale.DE_DE]: german.parse,