scrabble-solver 2.15.25 → 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/.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 +3 -5
- package/.github/workflows/oxlint.yml +4 -6
- 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 +1321 -1309
- 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 +5301 -11011
- package/.nx/workspace-data/parsed-lock-file.nodes.json +16259 -7681
- package/.nx/workspace-data/project-graph.json +25619 -19944
- package/.nx/workspace-data/source-maps.json +96 -0
- package/.oxlintrc.json +0 -2
- package/CLAUDE.md +120 -0
- package/README.md +21 -21
- 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 +18 -20
- package/packages/configs/package.json +3 -3
- package/packages/constants/package.json +1 -1
- package/packages/dictionaries/package.json +4 -4
- package/packages/logger/package.json +1 -1
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +5 -5
- 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/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/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/{FDUqldlsD7FXe6iWhIJmu → HFiEUpdZIGYd_XKb5mCLZ}/_buildManifest.js +1 -1
- package/packages/scrabble-solver/.next/static/chunks/pages/{_app-c0932b8ca24945cb.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 +9 -8
- 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/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/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/parameters/index.ts +45 -44
- package/packages/scrabble-solver/src/state/localStorage.ts +42 -52
- 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.tsbuildinfo +1 -1
- package/packages/solver/package.json +7 -6
- package/packages/types/package.json +2 -2
- package/packages/word-definitions/package.json +4 -3
- package/packages/word-definitions/src/parse.test.ts +7 -2
- package/packages/word-lists/package.json +2 -2
- package/tsconfig.json +1 -1
- package/jest.config.js +0 -15
- package/jest.setup.js +0 -6
- package/tsconfig.jest.json +0 -10
- /package/packages/scrabble-solver/.next/static/{FDUqldlsD7FXe6iWhIJmu → HFiEUpdZIGYd_XKb5mCLZ}/_ssgManifest.js +0 -0
|
@@ -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",
|
|
@@ -20,16 +20,17 @@
|
|
|
20
20
|
"homepage": "https://scrabble-solver.org",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsgo --project .",
|
|
23
|
-
"clean": "rimraf build/"
|
|
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
|
}
|
|
@@ -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",
|
|
@@ -23,7 +23,7 @@
|
|
|
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
|
}
|
|
@@ -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",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
"homepage": "https://scrabble-solver.org",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsgo --project .",
|
|
23
|
-
"clean": "rimraf build/"
|
|
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"
|
|
@@ -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",
|
|
@@ -23,7 +23,7 @@
|
|
|
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
package/jest.config.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const { pathsToModuleNameMapper } = require('ts-jest');
|
|
2
|
-
|
|
3
|
-
const { compilerOptions } = require('./tsconfig.jest.json');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
coveragePathIgnorePatterns: ['/node_modules/', '/build/'],
|
|
7
|
-
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
|
|
8
|
-
preset: 'ts-jest',
|
|
9
|
-
setupFilesAfterEnv: ['./jest.setup.js'],
|
|
10
|
-
testEnvironment: 'node',
|
|
11
|
-
testPathIgnorePatterns: ['/node_modules/', '/cypress/'],
|
|
12
|
-
transform: {
|
|
13
|
-
'^.+.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.jest.json' }],
|
|
14
|
-
},
|
|
15
|
-
};
|
package/jest.setup.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const POLISH_DICTIONARY_AVERAGE_DOWNLOAD_DURATION = 90_000;
|
|
2
|
-
|
|
3
|
-
// Dictionaries used in tests are downloaded on demand (if not cached)
|
|
4
|
-
// and on average it takes 90 seconds to get the Polish dictionary downloaded.
|
|
5
|
-
// Doubling that amount should be safe enough.
|
|
6
|
-
jest.setTimeout(2 * POLISH_DICTIONARY_AVERAGE_DOWNLOAD_DURATION);
|
package/tsconfig.jest.json
DELETED
|
File without changes
|