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
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
<p>
|
|
21
|
-
You can <a href="#run">run</a> it on your machine: <code>
|
|
21
|
+
You can <a href="#run">run</a> it on your machine: <code>bunx scrabble-solver@latest</code>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p>
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
|
|
42
42
|
<p>
|
|
43
43
|
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/build.yml/badge.svg" alt="Build" />
|
|
44
|
-
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/
|
|
45
|
-
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/
|
|
46
|
-
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/
|
|
47
|
-
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/
|
|
48
|
-
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/
|
|
44
|
+
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/oxlint.yml/badge.svg" alt="Oxlint" />
|
|
45
|
+
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/oxfmt.yml/badge.svg" alt="Oxfmt" />
|
|
46
|
+
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/e2e-tests.yml/badge.svg" alt="E2E tests" />
|
|
47
|
+
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/unit-tests.yml/badge.svg" alt="Unit tests" />
|
|
48
|
+
<img src="https://github.com/kamilmielnik/scrabble-solver/actions/workflows/bunx.yml/badge.svg" alt="bunx" />
|
|
49
49
|
</p>
|
|
50
50
|
|
|
51
51
|
<img alt="Screencast GIF showing user interface when solving for oxyphenbutazone, which is a top-scoring word in English version of Scrabble" src="https://raw.githubusercontent.com/kamilmielnik/scrabble-solver/master/screencast.gif" />
|
|
@@ -70,6 +70,8 @@
|
|
|
70
70
|
|
|
71
71
|
## Dictionaries
|
|
72
72
|
|
|
73
|
+
Some of the word lists below are sourced from the companion repository [kamilmielnik/scrabble-dictionaries](https://github.com/kamilmielnik/scrabble-dictionaries).
|
|
74
|
+
|
|
73
75
|
| Language | Word list | Word definitions | [Highest-scoring word](https://codesandbox.io/s/highest-scoring-words-in-scrabble-vbj1ns?file=/src/index.js) |
|
|
74
76
|
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
75
77
|
| 🇬🇧 English | [💾](https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/refs/heads/master/english/sowpods.txt) [SOWPODS](https://en.wikipedia.org/wiki/Collins_Scrabble_Words) | [Merriam-Webster](https://www.merriam-webster.com/) | oxyphenbutazone (1458) |
|
|
@@ -84,10 +86,10 @@
|
|
|
84
86
|
|
|
85
87
|
## Run
|
|
86
88
|
|
|
87
|
-
You can run Scrabble Solver on your machine - all you need is [
|
|
89
|
+
You can run Scrabble Solver on your machine - all you need is [Bun](https://bun.sh/) 1.3 or later.
|
|
88
90
|
|
|
89
91
|
```Shell
|
|
90
|
-
|
|
92
|
+
bunx scrabble-solver@latest
|
|
91
93
|
```
|
|
92
94
|
|
|
93
95
|
Give it a while to install and download dictionaries. When it's done it will automatically open http://localhost:3333/ in your browser.
|
|
@@ -114,8 +116,8 @@ One-time project setup.
|
|
|
114
116
|
```Shell
|
|
115
117
|
git clone https://github.com/kamilmielnik/scrabble-solver.git
|
|
116
118
|
cd scrabble-solver
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
bun install
|
|
120
|
+
bun run build
|
|
119
121
|
```
|
|
120
122
|
|
|
121
123
|
### Run app dev server
|
|
@@ -123,7 +125,7 @@ npm run build
|
|
|
123
125
|
The following command will serve the app at http://localhost:3000/.
|
|
124
126
|
|
|
125
127
|
```Shell
|
|
126
|
-
|
|
128
|
+
bun run dev
|
|
127
129
|
```
|
|
128
130
|
|
|
129
131
|
Note: hot code reload works only for the [`scrabble-solver`](https://github.com/kamilmielnik/scrabble-solver/tree/master/packages/scrabble-solver) package. If you make changes to any other package, you will need to rebuild it ([see below](#rebuild-a-single-package)).
|
|
@@ -131,7 +133,7 @@ Note: hot code reload works only for the [`scrabble-solver`](https://github.com/
|
|
|
131
133
|
### Rebuild the entire project
|
|
132
134
|
|
|
133
135
|
```Shell
|
|
134
|
-
|
|
136
|
+
bun run build
|
|
135
137
|
```
|
|
136
138
|
|
|
137
139
|
### Rebuild a single package
|
|
@@ -139,15 +141,15 @@ npm run build
|
|
|
139
141
|
For convenience, here's a list of commands to rebuild every package individually.
|
|
140
142
|
|
|
141
143
|
```Shell
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
bun run --filter @scrabble-solver/configs build
|
|
145
|
+
bun run --filter @scrabble-solver/constants build
|
|
146
|
+
bun run --filter @scrabble-solver/dictionaries build
|
|
147
|
+
bun run --filter @scrabble-solver/logger build
|
|
148
|
+
bun run --filter @scrabble-solver/scrabble-solver build
|
|
149
|
+
bun run --filter @scrabble-solver/solver build
|
|
150
|
+
bun run --filter @scrabble-solver/types build
|
|
151
|
+
bun run --filter @scrabble-solver/word-definitions build
|
|
152
|
+
bun run --filter @scrabble-solver/word-lists build
|
|
151
153
|
```
|
|
152
154
|
|
|
153
155
|
### Add a new language
|
|
@@ -159,7 +161,7 @@ npm run build -w @scrabble-solver/word-lists
|
|
|
159
161
|
4. Add IETF language tag for the new locale in [packages/types/src/Locale.ts](https://github.com/kamilmielnik/scrabble-solver/blob/master/packages/types/src/Locale.ts)
|
|
160
162
|
5. Rebuild the types package
|
|
161
163
|
```Shell
|
|
162
|
-
|
|
164
|
+
bun run --filter @scrabble-solver/types build
|
|
163
165
|
```
|
|
164
166
|
6. Add locale configuration in [packages/scrabble-solver/src/i18n/constants.ts](https://github.com/kamilmielnik/scrabble-solver/blob/master/packages/scrabble-solver/src/i18n/constants.ts)
|
|
165
167
|
7. Update locale-detecting code in [packages/scrabble-solver/src/state/settings/lib.ts](https://github.com/kamilmielnik/scrabble-solver/blob/master/packages/scrabble-solver/src/state/settings/lib.ts)
|
|
@@ -177,6 +179,7 @@ npm run build -w @scrabble-solver/word-lists
|
|
|
177
179
|
## Tech stack
|
|
178
180
|
|
|
179
181
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
182
|
+
- [Bun](https://bun.sh/docs)
|
|
180
183
|
- [Node.js](https://nodejs.org/)
|
|
181
184
|
- [Next.js](https://nextjs.org/)
|
|
182
185
|
- [Express](https://expressjs.com/)
|
|
@@ -190,9 +193,8 @@ npm run build -w @scrabble-solver/word-lists
|
|
|
190
193
|
- [include-media](https://eduardoboucas.github.io/include-media/)
|
|
191
194
|
- [Lerna](https://lerna.js.org/)
|
|
192
195
|
- [Cypress](https://www.cypress.io/)
|
|
193
|
-
- [
|
|
194
|
-
- [
|
|
195
|
-
- [oxfmt](https://oxc.rs/docs/guide/usage/formatter)
|
|
196
|
+
- [Oxlint](https://oxc.rs/docs/guide/usage/linter)
|
|
197
|
+
- [Oxfmt](https://oxc.rs/docs/guide/usage/formatter)
|
|
196
198
|
|
|
197
199
|
## Related projects
|
|
198
200
|
|
package/bin/scrabble-solver.js
CHANGED
package/bump-version.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Due to the use of
|
|
2
|
+
* Due to the use of Bun workspaces we need to explicitly specify "@scrabble-solver/scrabble-solver"
|
|
3
3
|
* package in the dependencies of this very "scrabble-solver" package. Otherwise none of
|
|
4
|
-
* the "dependencies" from underlying packages/ would have been installed and any
|
|
5
|
-
* that work on subpackages would not work - specifically:
|
|
4
|
+
* the "dependencies" from underlying packages/ would have been installed and any package scripts
|
|
5
|
+
* that work on subpackages would not work - specifically: bun start.
|
|
6
6
|
*
|
|
7
7
|
* This script exists to ensure that the dependency version is bumped during the release.
|
|
8
8
|
*/
|
|
@@ -24,4 +24,3 @@ const updateDependencyVersion = (filename, dependency, version) => {
|
|
|
24
24
|
|
|
25
25
|
const currentAppVersion = getCurrentAppVersion();
|
|
26
26
|
updateDependencyVersion('package.json', '@scrabble-solver/scrabble-solver', currentAppVersion);
|
|
27
|
-
updateDependencyVersion('package-lock.json', '@scrabble-solver/scrabble-solver', currentAppVersion);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="bun-types/test-globals" />
|