scrabble-solver 2.15.24 → 2.16.0-alpha.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/.claude/settings.local.json +12 -1
- package/.github/workflows/build.yml +3 -5
- package/.github/workflows/{npx.yml → bunx.yml} +7 -11
- package/.github/workflows/deploy.yml +2 -2
- package/.github/workflows/{cypress.yml → e2e-tests.yml} +7 -7
- package/.github/workflows/oxfmt.yml +4 -6
- package/.github/workflows/{eslint.yml → oxlint.yml} +6 -8
- package/.github/workflows/{jest.yml → unit-tests.yml} +6 -8
- package/.nx/workspace-data/d/server-process.json +5 -0
- package/.nx/workspace-data/file-map.json +614 -602
- package/.nx/workspace-data/lockfile-dependencies.hash +1 -1
- package/.nx/workspace-data/lockfile-nodes.hash +1 -1
- package/.nx/workspace-data/nx_files.nxt +0 -0
- package/.nx/workspace-data/parsed-lock-file.dependencies.json +5297 -11117
- package/.nx/workspace-data/parsed-lock-file.nodes.json +16371 -7676
- package/.nx/workspace-data/project-graph.json +25734 -20117
- package/.nx/workspace-data/source-maps.json +96 -0
- package/.oxlintrc.json +314 -0
- package/CLAUDE.md +120 -0
- package/README.md +27 -25
- package/bin/scrabble-solver.js +1 -1
- package/bump-version.js +3 -4
- package/bun-test-globals.d.ts +1 -0
- package/bun.lock +3984 -0
- package/bun.test.preload.ts +21 -0
- package/bunfig.toml +2 -0
- package/lerna.json +1 -1
- package/package.json +28 -38
- package/packages/configs/build/games/literaki.d.ts +1 -1
- package/packages/configs/package.json +4 -4
- package/packages/constants/package.json +2 -2
- package/packages/dictionaries/package.json +5 -5
- package/packages/logger/package.json +2 -2
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +9 -9
- package/packages/scrabble-solver/.next/cache/.previewinfo +1 -1
- package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
- package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
- package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
- package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
- package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
- package/packages/scrabble-solver/.next/required-server-files.js +2 -1
- package/packages/scrabble-solver/.next/required-server-files.json +2 -1
- package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
- package/packages/scrabble-solver/.next/server/chunks/30.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/712.js +1 -1
- package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/api/visit.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
- package/packages/scrabble-solver/.next/server/pages/not-found.html +1 -1
- package/packages/scrabble-solver/.next/server/webpack-api-runtime.js +1 -1
- package/packages/scrabble-solver/.next/static/{f_g0t0jBAscXxDrNYOuV0 → HFiEUpdZIGYd_XKb5mCLZ}/_buildManifest.js +1 -1
- package/packages/scrabble-solver/.next/static/chunks/{main-ca07941c8a544c9a.js → main-65a5015b46ca9827.js} +1 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/{_app-369e5cb907606ad4.js → _app-9c9aaea7b6881765.js} +4 -4
- package/packages/scrabble-solver/.next/static/chunks/pages/{index-08b3b0a754095919.js → index-e9ea63e97865edcf.js} +1 -1
- package/packages/scrabble-solver/.next/static/css/{500cdc9a24075d91.css → 78726ae7cf7a5497.css} +1 -1
- package/packages/scrabble-solver/.next/trace +21 -21
- package/packages/scrabble-solver/.next/trace-build +1 -1
- package/packages/scrabble-solver/README.md +3 -3
- package/packages/scrabble-solver/next.config.js +1 -0
- package/packages/scrabble-solver/package.json +11 -10
- package/packages/scrabble-solver/public/service-worker.js +1 -1
- package/packages/scrabble-solver/src/@types/scss.d.ts +5 -0
- package/packages/scrabble-solver/src/components/Board/Board.module.scss +2 -2
- package/packages/scrabble-solver/src/components/Board/components/Actions/Actions.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.module.scss +26 -6
- package/packages/scrabble-solver/src/components/Board/components/InputPrompt/InputPrompt.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Button/Button.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Dictionary/Dictionary.module.scss +1 -1
- package/packages/scrabble-solver/src/components/DictionaryInput/DictionaryInput.module.scss +1 -1
- package/packages/scrabble-solver/src/components/IconButton/IconButton.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Loading/Loading.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Modal/Modal.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Modal/Modal.tsx +0 -1
- package/packages/scrabble-solver/src/components/NotFound/NotFound.module.scss +1 -1
- package/packages/scrabble-solver/src/components/PlainTiles/PlainTiles.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Rack/Rack.module.scss +11 -6
- package/packages/scrabble-solver/src/components/Rack/components/InputPrompt/InputPrompt.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Rack/components/RackTile/RackTile.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Radio/Radio.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Results/Results.module.scss +1 -1
- package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Solver/Solver.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Solver/components/InsertButton/InsertButton.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Spinner/Spinner.module.scss +1 -1
- package/packages/scrabble-solver/src/components/Tile/Tile.module.scss +1 -1
- package/packages/scrabble-solver/src/hooks/useLocalStorage.ts +4 -52
- package/packages/scrabble-solver/src/hooks/useMedia.ts +0 -1
- package/packages/scrabble-solver/src/lib/isMac.ts +1 -1
- package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.module.scss +1 -1
- package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/Character.module.scss +1 -1
- package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.module.scss +1 -1
- package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +1 -1
- package/packages/scrabble-solver/src/pages/_app.tsx +0 -1
- package/packages/scrabble-solver/src/parameters/index.ts +48 -47
- package/packages/scrabble-solver/src/sdk/fetchJson.ts +3 -7
- package/packages/scrabble-solver/src/service-worker/index.ts +0 -1
- package/packages/scrabble-solver/src/service-worker/routeSolveRequests.ts +18 -12
- package/packages/scrabble-solver/src/state/board/slice.ts +6 -4
- package/packages/scrabble-solver/src/state/localStorage.ts +42 -52
- package/packages/scrabble-solver/src/state/sagas.ts +1 -2
- package/packages/scrabble-solver/src/state/settings/initialState.ts +7 -7
- package/packages/scrabble-solver/src/styles/_tokens.scss +59 -0
- package/packages/scrabble-solver/src/styles/global.scss +3 -3
- package/packages/scrabble-solver/src/styles/mixins.scss +13 -12
- package/packages/scrabble-solver/src/styles/variables.module.scss +53 -0
- package/packages/scrabble-solver/src/styles/variables.scss +44 -41
- package/packages/scrabble-solver/tsconfig.json +0 -1
- package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -1
- package/packages/solver/build/fillPattern.d.ts +1 -3
- package/packages/solver/package.json +8 -7
- package/packages/types/build/Result.d.ts +1 -1
- package/packages/types/package.json +3 -3
- package/packages/word-definitions/build/languages/english.js +1 -3
- package/packages/word-definitions/package.json +5 -4
- package/packages/word-definitions/src/languages/english.ts +0 -1
- package/packages/word-definitions/src/parse.test.ts +7 -2
- package/packages/word-lists/package.json +3 -3
- package/tsconfig.json +2 -1
- package/eslint.config.mjs +0 -722
- package/jest.config.js +0 -15
- package/jest.setup.js +0 -6
- package/tsconfig.jest.json +0 -11
- /package/packages/scrabble-solver/.next/static/{f_g0t0jBAscXxDrNYOuV0 → HFiEUpdZIGYd_XKb5mCLZ}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type Trie } from '@kamilmielnik/trie';
|
|
2
2
|
import { type Config, type Pattern, type Tile } from '@scrabble-solver/types';
|
|
3
3
|
export declare const fillPattern: (trie: Trie, config: Config, pattern: Pattern, tiles: Tile[]) => Pattern[];
|
|
4
|
-
export declare const fillPatternRecursive: (
|
|
5
|
-
/** gets mutated when this function is called */
|
|
6
|
-
results: Pattern[], trie: Trie, config: Config, pattern: Pattern, word: string, tiles: Tile[]) => void;
|
|
4
|
+
export declare const fillPatternRecursive: (results: Pattern[], trie: Trie, config: Config, pattern: Pattern, word: string, tiles: Tile[]) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/solver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0-alpha.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Solver",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -19,17 +19,18 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://scrabble-solver.org",
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "
|
|
23
|
-
"clean": "rimraf build/"
|
|
22
|
+
"build": "tsgo --project .",
|
|
23
|
+
"clean": "rimraf build/",
|
|
24
|
+
"test": "bun test --timeout 180000 src"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@kamilmielnik/trie": "^4.0.0",
|
|
27
|
-
"@scrabble-solver/types": "^2.
|
|
28
|
+
"@scrabble-solver/types": "^2.16.0-alpha.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@scrabble-solver/configs": "^2.
|
|
31
|
-
"@scrabble-solver/constants": "^2.
|
|
32
|
-
"@scrabble-solver/dictionaries": "^2.
|
|
31
|
+
"@scrabble-solver/configs": "^2.16.0-alpha.0",
|
|
32
|
+
"@scrabble-solver/constants": "^2.16.0-alpha.0",
|
|
33
|
+
"@scrabble-solver/dictionaries": "^2.16.0-alpha.0"
|
|
33
34
|
},
|
|
34
35
|
"gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
|
|
35
36
|
}
|
|
@@ -18,7 +18,7 @@ export declare class Result {
|
|
|
18
18
|
readonly word: string;
|
|
19
19
|
readonly words: string[];
|
|
20
20
|
readonly wordsCount: number;
|
|
21
|
-
constructor({ cells, id, collisions, points
|
|
21
|
+
constructor({ cells, id, collisions, points }: {
|
|
22
22
|
cells: Cell[];
|
|
23
23
|
id: number;
|
|
24
24
|
collisions: Collision[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0-alpha.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Types",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://scrabble-solver.org",
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "
|
|
22
|
+
"build": "tsgo --project .",
|
|
23
23
|
"clean": "rimraf build/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@scrabble-solver/constants": "^2.
|
|
26
|
+
"@scrabble-solver/constants": "^2.16.0-alpha.0"
|
|
27
27
|
},
|
|
28
28
|
"gitHead": "1e2d1ad49a288d4a44196d8e3336740da132c637"
|
|
29
29
|
}
|
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parse = exports.crawl = void 0;
|
|
4
4
|
const cheerio_1 = require("cheerio");
|
|
5
5
|
const lib_1 = require("../lib");
|
|
6
|
-
const DOES_NOT_EXIST_MESSAGE =
|
|
7
|
-
// eslint-disable-next-line max-len
|
|
8
|
-
"The word you've entered isn't in the dictionary. Click on a spelling suggestion below or try again using the search bar above.";
|
|
6
|
+
const DOES_NOT_EXIST_MESSAGE = "The word you've entered isn't in the dictionary. Click on a spelling suggestion below or try again using the search bar above.";
|
|
9
7
|
const crawl = (word) => {
|
|
10
8
|
return (0, lib_1.request)({
|
|
11
9
|
protocol: 'https',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/word-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0-alpha.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Word definitions",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://scrabble-solver.org",
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "
|
|
23
|
-
"clean": "rimraf build/"
|
|
22
|
+
"build": "tsgo --project .",
|
|
23
|
+
"clean": "rimraf build/",
|
|
24
|
+
"test": "bun test --timeout 180000 src"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@scrabble-solver/types": "^2.
|
|
27
|
+
"@scrabble-solver/types": "^2.16.0-alpha.0",
|
|
27
28
|
"cheerio": "^1.2.0",
|
|
28
29
|
"follow-redirects": "^1.16.0",
|
|
29
30
|
"striptags": "^3.2.0"
|
|
@@ -4,7 +4,6 @@ import { request } from '../lib';
|
|
|
4
4
|
import type { ParsingResult } from '../types';
|
|
5
5
|
|
|
6
6
|
const DOES_NOT_EXIST_MESSAGE =
|
|
7
|
-
// eslint-disable-next-line max-len
|
|
8
7
|
"The word you've entered isn't in the dictionary. Click on a spelling suggestion below or try again using the search bar above.";
|
|
9
8
|
|
|
10
9
|
export const crawl = (word: string): Promise<string> => {
|
|
@@ -3,12 +3,17 @@ import fs from 'fs';
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
5
5
|
import { parse } from './parse';
|
|
6
|
+
import { type ParsingResult } from './types';
|
|
6
7
|
|
|
7
8
|
const readTestFile = (filepath: string): string => {
|
|
8
9
|
const absoluteFilepath = path.resolve(__dirname, '__tests__', filepath);
|
|
9
10
|
return fs.readFileSync(absoluteFilepath, 'utf-8');
|
|
10
11
|
};
|
|
11
12
|
|
|
13
|
+
const readExpected = (filepath: string): ParsingResult => {
|
|
14
|
+
return JSON.parse(readTestFile(filepath));
|
|
15
|
+
};
|
|
16
|
+
|
|
12
17
|
const tests = [
|
|
13
18
|
{ locale: Locale.DE_DE, word: 'hm' },
|
|
14
19
|
{ locale: Locale.DE_DE, word: 'ho' },
|
|
@@ -29,7 +34,7 @@ const tests = [
|
|
|
29
34
|
describe('parse', () => {
|
|
30
35
|
it.each(tests)(`[$locale] "$word"`, ({ locale, word }) => {
|
|
31
36
|
const input = readTestFile(`input/${locale}.${word}.html`);
|
|
32
|
-
const expected =
|
|
33
|
-
expect(parse(locale, input)).toEqual(
|
|
37
|
+
const expected = readExpected(`expected/${locale}.${word}.json`);
|
|
38
|
+
expect(parse(locale, input)).toEqual(expected);
|
|
34
39
|
});
|
|
35
40
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrabble-solver/word-lists",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0-alpha.0",
|
|
4
4
|
"description": "Scrabble Solver 2 - Word lists",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://scrabble-solver.org",
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "
|
|
22
|
+
"build": "tsgo --project .",
|
|
23
23
|
"clean": "rimraf build/"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@scrabble-solver/types": "^2.
|
|
26
|
+
"@scrabble-solver/types": "^2.16.0-alpha.0",
|
|
27
27
|
"cheerio": "^1.2.0",
|
|
28
28
|
"follow-redirects": "^1.16.0",
|
|
29
29
|
"transliteration": "^2.6.1",
|
package/tsconfig.json
CHANGED
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"noImplicitReturns": true,
|
|
11
11
|
"noUnusedLocals": true,
|
|
12
12
|
"noUnusedParameters": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
13
14
|
"strict": true,
|
|
14
15
|
"target": "es2021",
|
|
15
|
-
"types": ["
|
|
16
|
+
"types": ["bun"]
|
|
16
17
|
},
|
|
17
18
|
"exclude": ["cypress", "cypress.config.ts", "node_modules"]
|
|
18
19
|
}
|