scrabble-solver 2.18.5 → 2.18.6

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.
Files changed (97) hide show
  1. package/.nx/workspace-data/d/server-process.json +3 -3
  2. package/.nx/workspace-data/file-map.json +491 -491
  3. package/.nx/workspace-data/lockfile-dependencies.json +12490 -0
  4. package/.nx/workspace-data/lockfile-nodes.json +23570 -0
  5. package/.nx/workspace-data/nx_files.lock +0 -0
  6. package/.nx/workspace-data/nx_files_v2.nxt +0 -0
  7. package/.nx/workspace-data/project-graph.json +759 -1018
  8. package/CLAUDE.md +2 -1
  9. package/bin/scrabble-solver.js +1 -1
  10. package/bump-version.js +2 -2
  11. package/bun.lock +167 -221
  12. package/bunfig.toml +1 -0
  13. package/lerna.json +1 -1
  14. package/package.json +20 -20
  15. package/packages/configs/package.json +3 -3
  16. package/packages/constants/package.json +1 -1
  17. package/packages/dictionaries/package.json +5 -5
  18. package/packages/logger/package.json +1 -1
  19. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  20. package/packages/scrabble-solver/.next/build-manifest.json +17 -17
  21. package/packages/scrabble-solver/.next/cache/.previewinfo +1 -1
  22. package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
  23. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  24. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +2 -2
  25. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  26. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
  27. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  28. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  29. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  30. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  31. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
  32. package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
  33. package/packages/scrabble-solver/.next/next-server.js.nft.json +1 -1
  34. package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
  35. package/packages/scrabble-solver/.next/required-server-files.js +16 -1
  36. package/packages/scrabble-solver/.next/required-server-files.json +16 -1
  37. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  38. package/packages/scrabble-solver/.next/server/chunks/30.js +2 -2
  39. package/packages/scrabble-solver/.next/server/chunks/612.js +1 -1
  40. package/packages/scrabble-solver/.next/server/chunks/67.js +1 -1
  41. package/packages/scrabble-solver/.next/server/chunks/671.js +1 -1
  42. package/packages/scrabble-solver/.next/server/chunks/712.js +1 -1
  43. package/packages/scrabble-solver/.next/server/chunks/853.js +3 -3
  44. package/packages/scrabble-solver/.next/server/chunks/942.js +1 -1
  45. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  46. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  47. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  48. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  49. package/packages/scrabble-solver/.next/server/pages/_document.js.nft.json +1 -1
  50. package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
  51. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js +1 -1
  52. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  53. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js +1 -1
  54. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  55. package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
  56. package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
  57. package/packages/scrabble-solver/.next/server/pages/api/verify.js +1 -1
  58. package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
  59. package/packages/scrabble-solver/.next/server/pages/api/visit.js +1 -1
  60. package/packages/scrabble-solver/.next/server/pages/api/visit.js.nft.json +1 -1
  61. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  62. package/packages/scrabble-solver/.next/server/pages/index.js +3 -3
  63. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  64. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  65. package/packages/scrabble-solver/.next/server/pages/not-found.html +1 -1
  66. package/packages/scrabble-solver/.next/server/preview-props.json +5 -0
  67. package/packages/scrabble-solver/.next/server/route-cache/PAGES/8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1/$/index.html +1 -1
  68. package/packages/scrabble-solver/.next/server/route-cache/PAGES/8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1/$/index.json +1 -1
  69. package/packages/scrabble-solver/.next/server/route-cache/PAGES/8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1/$/index.meta +1 -1
  70. package/packages/scrabble-solver/.next/static/3Gq7FQIRlitT1llwNwhr2/_buildManifest.js +1 -0
  71. package/packages/scrabble-solver/.next/static/chunks/101-bb2fe4023bf9f5a4.js +3 -0
  72. package/packages/scrabble-solver/.next/static/chunks/{256.2a4fa7f278e0a97d.js → 256.ad3906547e15ca9d.js} +1 -1
  73. package/packages/scrabble-solver/.next/static/chunks/827.d01b6d69af340ba4.js +1 -0
  74. package/packages/scrabble-solver/.next/static/chunks/framework-0cd78dbcb5962d50.js +1 -0
  75. package/packages/scrabble-solver/.next/static/chunks/main-1b24c44d79c86b6e.js +5 -0
  76. package/packages/scrabble-solver/.next/static/chunks/pages/{_app-0c68f165d6de8507.js → _app-a32e0cf53e276591.js} +1 -1
  77. package/packages/scrabble-solver/.next/static/chunks/pages/index-357a0f88e80ff0b0.js +1 -0
  78. package/packages/scrabble-solver/.next/static/chunks/{webpack-31879a8fb6dcffd0.js → webpack-411457e3de3a41ad.js} +1 -1
  79. package/packages/scrabble-solver/.next/trace +36 -22
  80. package/packages/scrabble-solver/.next/trace-build +1 -1
  81. package/packages/scrabble-solver/.next/types/cache-life.d.ts +11 -43
  82. package/packages/scrabble-solver/.next/types/validator.ts +7 -0
  83. package/packages/scrabble-solver/package.json +40 -40
  84. package/packages/scrabble-solver/public/service-worker.js +2 -2
  85. package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -1
  86. package/packages/solver/package.json +6 -6
  87. package/packages/types/package.json +2 -2
  88. package/packages/word-definitions/package.json +7 -7
  89. package/packages/word-lists/package.json +8 -8
  90. package/playwright-report/index.html +2 -2
  91. package/packages/scrabble-solver/.next/static/YHx536pklAqlc9UGAXCj8/_buildManifest.js +0 -1
  92. package/packages/scrabble-solver/.next/static/chunks/101-fee295c7587c0836.js +0 -3
  93. package/packages/scrabble-solver/.next/static/chunks/827.09f660ca0a951d12.js +0 -1
  94. package/packages/scrabble-solver/.next/static/chunks/framework-988fd6f19d2744e8.js +0 -1
  95. package/packages/scrabble-solver/.next/static/chunks/main-d397eb8af33c5163.js +0 -5
  96. package/packages/scrabble-solver/.next/static/chunks/pages/index-ea21d96a88f25000.js +0 -1
  97. /package/packages/scrabble-solver/.next/static/{YHx536pklAqlc9UGAXCj8 → 3Gq7FQIRlitT1llwNwhr2}/_ssgManifest.js +0 -0
package/CLAUDE.md CHANGED
@@ -16,7 +16,7 @@ word-definitions ─────────────┘
16
16
  logger (independent, used by app + dictionaries)
17
17
  ```
18
18
 
19
- The GADDAG itself lives outside this repo, in [`@kamilmielnik/gaddag`](https://github.com/kamilmielnik/gaddag) — a flat typed-array automaton with `has`/`hasPrefix`/`getArc`, binary `serialize`/`deserialize`, and `Gaddag.fromArray(words)`. It replaced `@kamilmielnik/trie` (#164) and is consumed by `dictionaries`, `solver`, and the app as a regular npm dependency (`^3.0.0`). A local `packages/gaddag/` directory may exist — it holds git-ignored compiled output left over from before the package was extracted and is **not** a workspace.
19
+ The GADDAG itself lives outside this repo, in [`@kamilmielnik/gaddag`](https://github.com/kamilmielnik/gaddag) — a flat typed-array automaton with `has`/`hasPrefix`/`getArc`, binary `serialize`/`deserialize`, and `Gaddag.fromArray(words)`. It replaced `@kamilmielnik/trie` (#164) and is consumed by `dictionaries`, `solver`, and the app as a regular npm dependency (`3.0.0`). A local `packages/gaddag/` directory may exist — it holds git-ignored compiled output left over from before the package was extracted and is **not** a workspace.
20
20
 
21
21
  - `solver` — pure word-finding engine. Given a `Gaddag`, `Config`, `Board`, and `Tile[]`, returns scored `ResultJson`s. Has no I/O. `solve.ts` delegates to `MoveGenerator` (a single file holding all the logic) — anchor-based GADDAG move generation with per-cell cross-check masks, run once per direction; results are scored inline and sorted deterministically so UI ties resolve identically. `MoveGenerator` throws on alphabets over 64 tiles or boards over 32×32 because move sort keys pack direction/line/start/end into one integer. `benchmarks/` measures median `solve()` times on fixed mid-game boards (en-US, en-GB, pl-PL; 0–2 blanks): `bun run benchmark` from the root reruns them and rewrites the chart SVG + results table in the package `README.md`; it needs real (downloaded) dictionaries.
22
22
  - `dictionaries` — downloads/caches per-locale word lists to `$HOME/.scrabble-solver/dictionaries` and exposes them as `Gaddag`s (binary `<locale>.gaddag` files on disk; building the Polish GADDAG from its 3.2M-word list takes ~25 s, so it happens in `postbuild`/background updates, not per request; the `update-dictionaries` / `remove-dictionaries` bin scripts wrap this, and `update()` refreshes only stale locales unless forced, returning the locales it could not build — `update-dictionaries` exits 1 when there are any, so `bun run build` fails instead of shipping without a dictionary). 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 considered stale, but only `update()` (run from `postbuild` and the packaging workflows) refreshes them — `get()` serves stale entries as-is. `DiskCache.get` treats files it cannot deserialize (corrupted, or written by an app version with an incompatible format — the binary magic doubles as the format version) as cache misses: it deletes them and the dictionary is re-downloaded and re-serialized automatically; `set` also removes the pre-#164 `<locale>.txt` trie cache. The solver worker does the same client-side (`src/solver-worker/getGaddag.ts`): it returns undefined for undeserializable cached dictionaries, falling back to the server and revalidating. Only this package and `logger` perform filesystem I/O — keep other packages pure so they can run in Edge / browser contexts.
@@ -83,6 +83,7 @@ Hot reload only works for the `scrabble-solver` package. Edits to any other pack
83
83
  - **Install layout**: `bunfig.toml` pins `[install] linker = "hoisted"`. With Bun's isolated layout, `next build` fails — webpack bundles `unzipper` from `word-lists` and errors on its uninstalled optional `@aws-sdk/client-s3` dependency. Don't remove it.
84
84
  - **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 because Next.js runs the project-local `tsc` CLI (TS7 has no JS compiler API). Next 16.3.0 turned that on by default, so the `experimental.useTypeScriptCli` flag that pinned the app to the 16.3 preview line is gone from `next.config.js`; set it to `false` only to opt back into the JS compiler API, which TS7 cannot serve. 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 `e2e` and `playwright.config.ts` (covered by `e2e/tsconfig.json` instead); library packages extend it and additionally exclude `**/*.test.ts` from emitted output. A package's `tsconfig.json` covers `src/` only, so TypeScript living outside it needs its own `noEmit` config and its own `tsc` invocation or nothing type-checks it — `packages/logger/scripts/tsconfig.json` is the pattern (`module: preserve` because the scripts are ESM run by bun, while the package itself emits CJS), invoked from the package `build` so CI catches it. `packages/solver/benchmarks/` is still uncovered.
85
85
  - **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, and stubs out Next's unconditionally-bundled ES2019-2022 polyfills (`polyfill-module`) with `empty-module.js` via `NormalModuleReplacementPlugin` — every browserslist target (`package.json` `browserslist`: Chrome/Edge/Firefox ≥ 100, Safari ≥ 15.4, …) supports those natively, and browserslist alone does not control that chunk. SCSS load paths are extended to `./src` and `node_modules/include-media/dist`.
86
+ - **Dependency upgrades**: `bun update --latest -r` rewrites every internal `@scrabble-solver/*` specifier to `"latest"` in both `package.json`s and `bun.lock` — restore them to `<version>` afterwards. Every dependency in every workspace is pinned to an exact version: `bunfig.toml` sets `exact = true` so `bun add` saves exact versions, `version:bump-lerna` passes `--exact`, and `bump-version.js` writes exact internal specifiers. `next` is pinned exactly because the published package ships a prebuilt `.next` and global installs (`bunx`/`npx`) ignore the lockfile, so a newer Next.js resolved at install time crashes on the older build output (next 16.4.0 broke 2.18.5 this way).
86
87
  - **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.
87
88
 
88
89
  ## CI workflows
@@ -5,4 +5,4 @@ const path = require('path');
5
5
 
6
6
  const rootDirectory = path.join(__dirname, '..');
7
7
  process.chdir(rootDirectory);
8
- execSync('bun start');
8
+ execSync('bun start', { stdio: 'inherit' });
package/bump-version.js CHANGED
@@ -19,7 +19,7 @@ const getCurrentAppVersion = () => {
19
19
 
20
20
  const updateRootPackageJson = (filename, version) => {
21
21
  const content = fs.readFileSync(filename, 'utf-8');
22
- const replaced = content.replace(/("@scrabble-solver\/scrabble-solver":\s*)"[^"]+"/, `$1"^${version}"`);
22
+ const replaced = content.replace(/("@scrabble-solver\/scrabble-solver":\s*)"[^"]+"/, `$1"${version}"`);
23
23
 
24
24
  fs.writeFileSync(filename, replaced);
25
25
  };
@@ -27,7 +27,7 @@ const updateRootPackageJson = (filename, version) => {
27
27
  const updateBunLock = (filename, version) => {
28
28
  let content = fs.readFileSync(filename, 'utf-8');
29
29
 
30
- content = content.replace(/("@scrabble-solver\/[^"]+":\s*)"\^[^"]+"/g, `$1"^${version}"`);
30
+ content = content.replace(/("@scrabble-solver\/[^"]+":\s*)"[^"]+"/g, `$1"${version}"`);
31
31
 
32
32
  content = content.replace(/("version":\s*)"[^"]+"/g, `$1"${version}"`);
33
33