scrabble-solver 2.16.5 → 2.16.7
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/bunx.yml +26 -2
- package/.github/workflows/deploy.yml +1 -1
- package/.github/workflows/npx.yml +26 -2
- package/.nx/workspace-data/d/server-process.json +3 -3
- package/.nx/workspace-data/file-map.json +624 -618
- 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 +2643 -2158
- package/.nx/workspace-data/parsed-lock-file.nodes.json +3789 -5328
- package/.nx/workspace-data/project-graph.json +6770 -7839
- package/.nx/workspace-data/source-maps.json +267 -267
- package/CLAUDE.md +5 -5
- package/README.md +2 -2
- package/bun.lock +1063 -2896
- package/bunfig.toml +6 -0
- package/cypress.config.ts +7 -0
- package/lerna.json +1 -1
- package/nx.json +3 -1
- package/package.json +16 -17
- package/packages/configs/package.json +4 -4
- package/packages/constants/package.json +2 -2
- package/packages/dictionaries/package.json +6 -6
- package/packages/logger/package.json +2 -2
- package/packages/scrabble-solver/.next/BUILD_ID +1 -1
- package/packages/scrabble-solver/.next/build-manifest.json +12 -12
- 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/next-minimal-server.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
- package/packages/scrabble-solver/.next/prerender-manifest.json +7 -4
- package/packages/scrabble-solver/.next/required-server-files.js +26 -8
- package/packages/scrabble-solver/.next/required-server-files.json +26 -8
- package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
- package/packages/scrabble-solver/.next/server/chunks/30.js +2 -2
- package/packages/scrabble-solver/.next/server/chunks/318.js +3 -3
- package/packages/scrabble-solver/.next/server/chunks/671.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/712.js +1 -1
- package/packages/scrabble-solver/.next/server/chunks/791.js +3 -3
- 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/_document.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 +2 -2
- 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 +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 +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 +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/pages-manifest.json +1 -1
- package/packages/scrabble-solver/.next/static/chunks/framework-3cf15b8041c59dd3.js +1 -0
- package/packages/scrabble-solver/.next/static/chunks/main-852475ca502b4e49.js +5 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/_app-a5bbe02710f13d05.js +7 -0
- package/packages/scrabble-solver/.next/static/chunks/pages/{index-1d609730ebea97fd.js → index-ec0f6aeeaf7be227.js} +1 -1
- package/packages/scrabble-solver/.next/static/{QzOFuqqrEDsCEV0MLUrPP → vYpMmuC_yEurZGcyGVnLf}/_buildManifest.js +1 -1
- package/packages/scrabble-solver/.next/trace +21 -21
- package/packages/scrabble-solver/.next/trace-build +1 -1
- package/packages/scrabble-solver/.next/types/cache-life.d.ts +1 -0
- package/packages/scrabble-solver/.next/types/root-params.d.ts +3 -0
- package/packages/scrabble-solver/next-env.d.ts +1 -0
- package/packages/scrabble-solver/next.config.js +5 -0
- package/packages/scrabble-solver/package.json +19 -21
- package/packages/scrabble-solver/public/service-worker.js +1 -1
- package/packages/scrabble-solver/public/service-worker.js.map +1 -1
- package/packages/scrabble-solver/src/components/Tooltip/Tooltip.tsx +4 -1
- package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -1
- package/packages/solver/build/fillPattern.d.ts +3 -1
- package/packages/solver/package.json +7 -7
- package/packages/types/package.json +3 -3
- package/packages/word-definitions/build/languages/english.d.ts +1 -1
- package/packages/word-definitions/build/languages/english.js +23 -11
- package/packages/word-definitions/package.json +3 -3
- package/packages/word-definitions/src/__tests__/expected/en-US.awe.json +7 -4
- package/packages/word-definitions/src/__tests__/expected/en-US.oe.json +2 -2
- package/packages/word-definitions/src/__tests__/expected/en-US.pawn.json +11 -8
- package/packages/word-definitions/src/__tests__/expected/en-US.pawnee.json +3 -1
- package/packages/word-definitions/src/__tests__/expected/en-US.pean.json +4 -4
- package/packages/word-definitions/src/__tests__/expected/en-US.wiz.json +7 -1
- package/packages/word-definitions/src/__tests__/expected/en-US.zzzzqq.json +4 -0
- package/packages/word-definitions/src/__tests__/input/en-US.awe.json +1 -0
- package/packages/word-definitions/src/__tests__/input/en-US.oe.json +1 -0
- package/packages/word-definitions/src/__tests__/input/en-US.pawn.json +1 -0
- package/packages/word-definitions/src/__tests__/input/en-US.pawnee.json +1 -0
- package/packages/word-definitions/src/__tests__/input/en-US.pean.json +1 -0
- package/packages/word-definitions/src/__tests__/input/en-US.wiz.json +1 -0
- package/packages/word-definitions/src/__tests__/input/en-US.zzzzqq.json +1 -0
- package/packages/word-definitions/src/languages/english.ts +36 -12
- package/packages/word-definitions/src/parse.test.ts +9 -8
- package/packages/word-lists/package.json +4 -4
- package/packages/scrabble-solver/.next/static/chunks/framework-a23f7f643b59a2ca.js +0 -1
- package/packages/scrabble-solver/.next/static/chunks/main-00489babb6f51cdf.js +0 -5
- package/packages/scrabble-solver/.next/static/chunks/pages/_app-9b8d13beabe62d43.js +0 -7
- package/packages/word-definitions/src/__tests__/input/en-US.awe.html +0 -2235
- package/packages/word-definitions/src/__tests__/input/en-US.oe.html +0 -1337
- package/packages/word-definitions/src/__tests__/input/en-US.pawn.html +0 -2435
- package/packages/word-definitions/src/__tests__/input/en-US.pawnee.html +0 -1356
- package/packages/word-definitions/src/__tests__/input/en-US.pean.html +0 -1512
- package/packages/word-definitions/src/__tests__/input/en-US.wiz.html +0 -1556
- /package/packages/scrabble-solver/.next/static/{QzOFuqqrEDsCEV0MLUrPP → vYpMmuC_yEurZGcyGVnLf}/_ssgManifest.js +0 -0
package/CLAUDE.md
CHANGED
|
@@ -19,7 +19,7 @@ logger (independent, used by app + dictionaries)
|
|
|
19
19
|
- `solver` — pure word-finding engine. Given a `Trie`, `Config`, `Board`, and `Tile[]`, returns scored `Result`s. Has no I/O. Pipeline is `generatePatterns → fillPattern (per pattern) → areDigraphsValid (only when `config.twoCharacterTiles` is non-empty) → getUniquePatterns → getPatternScore`. New solving rules belong in this pipeline; `solve.ts` itself is just orchestration.
|
|
20
20
|
- `dictionaries` — downloads/caches per-locale word lists to `$HOME/.scrabble-solver/dictionaries` and exposes them as `Trie`s. The `Dictionaries` class layers a `MemoryCache` over a `DiskCache` (`LayeredCache`) and uses a per-locale `createAsyncProxy` to coalesce concurrent downloads. Cache entries older than `CACHE_STALE_THRESHOLD` (1 day) are refreshed on access. Only this package and `logger` perform filesystem I/O — keep other packages pure so they can run in Edge / browser contexts.
|
|
21
21
|
- `word-lists` — pulls raw word lists from upstream sources (one fetcher per locale in `src/languages/`). Used by `dictionaries` during downloads.
|
|
22
|
-
- `word-definitions` — per-locale `crawl(word) → string` and a parser for each source (
|
|
22
|
+
- `word-definitions` — per-locale `crawl(word) → string` and a parser for each source (Wiktionary, CNRTL, DWDS, SJP, dexonline, vajehyab, etc.). Add a new locale by adding a `crawl` and a `parse` function in `src/languages/` and wiring them into `crawl.ts` / `parse.ts`. `parse.test.ts` is where you add fixture-based parser tests.
|
|
23
23
|
- `types` — domain model classes (`Board`, `Cell`, `Tile`, `Pattern`, `Result`, `Config`, `Locale`, …) plus `*Json` shapes. Most of these have a `fromJson` / `toJson` round-trip — use them at the wire boundary instead of hand-rolled serialization.
|
|
24
24
|
- `configs` — split into **games** (`scrabble`, `superScrabble`, `scrabbleDuel`, `letterLeague`, `crossplay`, `literaki`, `kelimelik` — each defines board size, bonuses, rack size, blanks count, bingo bonus) and **languages** (`english`, `french`, …, each spreads a base game config and overrides `locale` + `tiles`). A locale config is one game × one language; e.g. `polishScrabble` = `scrabble` ⊕ Polish tiles + digraphs. Adding a language means a new config here **and** the 15-step checklist under "Add a new language" in `README.md`.
|
|
25
25
|
- `logger` — Winston logger writing JSON to `$HOME/.scrabble-solver/logs/{all,error}.log`. Only `error` goes to console. Used server-side by the app + dictionaries; do **not** import from browser code.
|
|
@@ -51,7 +51,7 @@ All commands run from the repo root unless noted.
|
|
|
51
51
|
| Production server (port 3333) | `bun start` |
|
|
52
52
|
| Lint | `bun run lint` (oxlint) / `bun run lint:fix` |
|
|
53
53
|
| Format check / fix | `bun run format` / `bun run format:fix` (oxfmt) |
|
|
54
|
-
| Type-check the app | `bun run --filter @scrabble-solver/scrabble-solver type-check` (uses `
|
|
54
|
+
| Type-check the app | `bun run --filter @scrabble-solver/scrabble-solver type-check` (uses `tsc` from stable TypeScript 7, the native Go compiler) |
|
|
55
55
|
| Unit tests (all workspaces) | `bun run test-unit` |
|
|
56
56
|
| Unit tests (one package) | `bun run --filter @scrabble-solver/solver test` |
|
|
57
57
|
| One unit test file | `cd packages/solver && bun test src/solve.test.ts` |
|
|
@@ -68,13 +68,13 @@ Hot reload only works for the `scrabble-solver` package. Edits to any other pack
|
|
|
68
68
|
- Only `solver`, `word-definitions`, and `scrabble-solver` have a `test` script. Tests are auto-discovered under `src/` matching `*.test.ts(x)`. The 180s timeout is needed because some solver tests build a real `Trie` from a downloaded dictionary.
|
|
69
69
|
- `bunfig.toml` + `bun.test.preload.ts` register a SCSS loader stub (returns a `Proxy` whose keys are their own names) so component tests can import `*.scss` modules without a real compiler. If you add other non-JS imports to test-touched code (images, etc.), extend the preload.
|
|
70
70
|
- Each package's `tsconfig.json` excludes `**/*.test.ts` from the build output. Tests are not part of published packages.
|
|
71
|
-
- Cypress: tests in `cypress/e2e/`. Custom command setup in `cypress/support/commands.ts` (registers `@testing-library/cypress` and `cypress-real-events`). Two base URLs are in play: `cypress.config.ts` defaults to `http://localhost:3000` (matches `bun run dev`); `test-cypress:run` and CI override to `:3333` (matches `bun start`). Pick the script that matches the server you're actually running.
|
|
71
|
+
- Cypress: tests in `cypress/e2e/`. Custom command setup in `cypress/support/commands.ts` (registers `@testing-library/cypress` and `cypress-real-events`). Two base URLs are in play: `cypress.config.ts` defaults to `http://localhost:3000` (matches `bun run dev`); `test-cypress:run` and CI override to `:3333` (matches `bun start`). Pick the script that matches the server you're actually running. `cypress.config.ts` registers `@cypress/webpack-batteries-included-preprocessor` from npm as the `file:preprocessor` — the copy bundled inside Cypress 15.19.0 crashes on TypeScript 7 projects (its `@babel/preset-typescript` ships without a `package.json`); drop the override once a fixed Cypress release lands.
|
|
72
72
|
|
|
73
73
|
## Tooling specifics
|
|
74
74
|
|
|
75
75
|
- **Linting**: `oxlint` (Rust-based ESLint replacement) configured in `.oxlintrc.json`. Type-aware rules require `oxlint-tsgolint`. Adding a new top-level JS config file usually means adding it to `ignorePatterns`. The oxlint config still loads the `jest` plugin and `jest` global because Bun's test runner mirrors the Jest API; do not remove them.
|
|
76
76
|
- **Formatting**: `oxfmt` covers `*.{js,ts,tsx,scss}`.
|
|
77
|
-
- **TypeScript**:
|
|
77
|
+
- **TypeScript**: stable TypeScript 7 (`typescript@^7.0.2`), whose `tsc` is the native Go compiler. It runs every package `build`, the app's `type-check`, and `next build` — the latter via `experimental.useTypeScriptCli` in `next.config.js`, required because TS7 has no JS compiler API (which also forces Next onto the 16.3 preview line until 16.3 is stable). The interim `@typescript/native-preview` (`tsgo`) setup from PR #422 was removed (Aug 2026). Root `tsconfig.json` sets `types: ["bun"]` for global test-runner types and excludes `cypress` and `cypress.config.ts`; library packages extend it and additionally exclude `**/*.test.ts` from emitted output.
|
|
78
78
|
- **Next.js**: built with `--webpack` flag explicitly (the default Turbopack is intentionally not used). `next.config.js` registers `@svgr/webpack` for SVG-as-component imports and the Workbox `InjectManifest` plugin for the service worker. SCSS load paths are extended to `./src` and `node_modules/include-media/dist`.
|
|
79
79
|
- **Nx**: `nx.json` only defines a `build` target with `dependsOn: ["^build"]` and `cache: true`. It is used purely for dependency-aware build ordering and caching — there are no Nx generators or executors.
|
|
80
80
|
|
|
@@ -113,7 +113,7 @@ The `bunx scrabble-solver@latest` entry point (`bin/scrabble-solver.js`) just `c
|
|
|
113
113
|
Look here when something seems set up oddly — the reason is usually one of these recent changes. Reference issue numbers, not dates, when grepping git log.
|
|
114
114
|
|
|
115
115
|
- **#421 — Bun migration** (Apr 2026). npm/Jest → Bun. Top-level scripts now use `bun run --filter`, lockfile is `bun.lock`, unit tests run on `bun test`, the published binary's launcher (`bin/scrabble-solver.js`) shells out to `bun start`, and the old `npx.yml` workflow was renamed to `bunx.yml` (now installs the published package via `bun add --global`). All workflows use `oven-sh/setup-bun@v2`; `e2e-tests.yml` is the only one that also uses `setup-node` (Cypress action).
|
|
116
|
-
- **#422 — TypeScript 7** (Apr 2026).
|
|
116
|
+
- **#422 — TypeScript 7** (Apr 2026). Moved build/type-check to `tsgo` (native preview). Superseded in Aug 2026 by stable `typescript@7`, where the native compiler ships as plain `tsc` — scripts call `tsc` again and `@typescript/native-preview` is gone.
|
|
117
117
|
- **#420 — ESLint → Oxlint**. The `eslint-plugin-*` packages still appear in devDeps because oxlint loads them as JS plugins (`jsPlugins` in `.oxlintrc.json`). Don't strip them.
|
|
118
118
|
- **#321 — Auto-persisted settings** (Apr 2026). Settings, board, and rack are written through a single `useLocalStorage` effect. Don't dispatch save actions manually.
|
|
119
119
|
- **#228 — CSS variables in JS** (Apr 2026). JS constants for colors/sizes flow from `_tokens.scss` → `variables.module.scss` `:export` → `parameters/index.ts`. Don't hard-code the same values in TS.
|
package/README.md
CHANGED
|
@@ -76,8 +76,8 @@ Some of the word lists below are sourced from the companion repository [kamilmie
|
|
|
76
76
|
|
|
77
77
|
| Language | Word list | Word definitions | [Highest-scoring word](https://codesandbox.io/s/highest-scoring-words-in-scrabble-vbj1ns?file=/src/index.js) |
|
|
78
78
|
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
79
|
-
| 🇬🇧 English | [💾](https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/refs/heads/master/english/sowpods.txt) [SOWPODS](https://en.wikipedia.org/wiki/Collins_Scrabble_Words) | [
|
|
80
|
-
| 🇺🇸 English | [💾](https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/refs/heads/master/english/twl06.txt) [TWL06](https://en.wikipedia.org/wiki/NASPA_Word_List) | [
|
|
79
|
+
| 🇬🇧 English | [💾](https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/refs/heads/master/english/sowpods.txt) [SOWPODS](https://en.wikipedia.org/wiki/Collins_Scrabble_Words) | [Wiktionary](https://en.wiktionary.org/) | oxyphenbutazone (1458) |
|
|
80
|
+
| 🇺🇸 English | [💾](https://raw.githubusercontent.com/kamilmielnik/scrabble-dictionaries/refs/heads/master/english/twl06.txt) [TWL06](https://en.wikipedia.org/wiki/NASPA_Word_List) | [Wiktionary](https://en.wiktionary.org/) | oxyphenbutazone (1458) |
|
|
81
81
|
| 🇫🇷 French | [💾](https://raw.githubusercontent.com/Thecoolsim/French-Scrabble-ODS8/main/French%20ODS%20dictionary.txt) [ODS8](https://github.com/Thecoolsim/French-Scrabble-ODS8) | [CNRTL](https://www.cnrtl.fr/) | schizothymiques (1566) |
|
|
82
82
|
| 🇩🇪 German | [💾](https://raw.githubusercontent.com/hippler/german-wordlist/master/words.txt) [hippler/german-wordlist](https://github.com/hippler/german-wordlist) | [DWDS](https://www.dwds.de) | polytoxikomanem (1512) |
|
|
83
83
|
| 🇮🇷 Persian | [💾](https://raw.githubusercontent.com/MansourM/persian-to-persian-dictionary/main/moein/words.txt) [MansourM/persian-to-persian-dictionary](https://github.com/MansourM/persian-to-persian-dictionary) | [واژه یاب](https://vajehyab.com) | (756) اگزیستانسیالیست |
|