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.
Files changed (143) hide show
  1. package/.claude/settings.local.json +12 -1
  2. package/.github/workflows/build.yml +3 -5
  3. package/.github/workflows/{npx.yml → bunx.yml} +7 -11
  4. package/.github/workflows/deploy.yml +2 -2
  5. package/.github/workflows/{cypress.yml → e2e-tests.yml} +7 -7
  6. package/.github/workflows/oxfmt.yml +4 -6
  7. package/.github/workflows/{eslint.yml → oxlint.yml} +6 -8
  8. package/.github/workflows/{jest.yml → unit-tests.yml} +6 -8
  9. package/.nx/workspace-data/d/server-process.json +5 -0
  10. package/.nx/workspace-data/file-map.json +614 -602
  11. package/.nx/workspace-data/lockfile-dependencies.hash +1 -1
  12. package/.nx/workspace-data/lockfile-nodes.hash +1 -1
  13. package/.nx/workspace-data/nx_files.nxt +0 -0
  14. package/.nx/workspace-data/parsed-lock-file.dependencies.json +5297 -11117
  15. package/.nx/workspace-data/parsed-lock-file.nodes.json +16371 -7676
  16. package/.nx/workspace-data/project-graph.json +25734 -20117
  17. package/.nx/workspace-data/source-maps.json +96 -0
  18. package/.oxlintrc.json +314 -0
  19. package/CLAUDE.md +120 -0
  20. package/README.md +27 -25
  21. package/bin/scrabble-solver.js +1 -1
  22. package/bump-version.js +3 -4
  23. package/bun-test-globals.d.ts +1 -0
  24. package/bun.lock +3984 -0
  25. package/bun.test.preload.ts +21 -0
  26. package/bunfig.toml +2 -0
  27. package/lerna.json +1 -1
  28. package/package.json +28 -38
  29. package/packages/configs/build/games/literaki.d.ts +1 -1
  30. package/packages/configs/package.json +4 -4
  31. package/packages/constants/package.json +2 -2
  32. package/packages/dictionaries/package.json +5 -5
  33. package/packages/logger/package.json +2 -2
  34. package/packages/scrabble-solver/.next/BUILD_ID +1 -1
  35. package/packages/scrabble-solver/.next/build-manifest.json +9 -9
  36. package/packages/scrabble-solver/.next/cache/.previewinfo +1 -1
  37. package/packages/scrabble-solver/.next/cache/.rscinfo +1 -1
  38. package/packages/scrabble-solver/.next/cache/.tsbuildinfo +1 -1
  39. package/packages/scrabble-solver/.next/cache/webpack/client-production/0.pack +0 -0
  40. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack +0 -0
  41. package/packages/scrabble-solver/.next/cache/webpack/client-production/index.pack.old +0 -0
  42. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack +0 -0
  43. package/packages/scrabble-solver/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  44. package/packages/scrabble-solver/.next/cache/webpack/server-production/0.pack +0 -0
  45. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack +0 -0
  46. package/packages/scrabble-solver/.next/cache/webpack/server-production/index.pack.old +0 -0
  47. package/packages/scrabble-solver/.next/diagnostics/framework.json +1 -1
  48. package/packages/scrabble-solver/.next/prerender-manifest.json +4 -4
  49. package/packages/scrabble-solver/.next/required-server-files.js +2 -1
  50. package/packages/scrabble-solver/.next/required-server-files.json +2 -1
  51. package/packages/scrabble-solver/.next/routes-manifest.json +1 -1
  52. package/packages/scrabble-solver/.next/server/chunks/30.js +1 -1
  53. package/packages/scrabble-solver/.next/server/chunks/712.js +1 -1
  54. package/packages/scrabble-solver/.next/server/middleware-build-manifest.js +1 -1
  55. package/packages/scrabble-solver/.next/server/pages/404.html +1 -1
  56. package/packages/scrabble-solver/.next/server/pages/500.html +1 -1
  57. package/packages/scrabble-solver/.next/server/pages/_app.js.nft.json +1 -1
  58. package/packages/scrabble-solver/.next/server/pages/_error.js.nft.json +1 -1
  59. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale]/[word].js.nft.json +1 -1
  60. package/packages/scrabble-solver/.next/server/pages/api/dictionary/[locale].js.nft.json +1 -1
  61. package/packages/scrabble-solver/.next/server/pages/api/solve.js +1 -1
  62. package/packages/scrabble-solver/.next/server/pages/api/solve.js.nft.json +1 -1
  63. package/packages/scrabble-solver/.next/server/pages/api/verify.js.nft.json +1 -1
  64. package/packages/scrabble-solver/.next/server/pages/api/visit.js.nft.json +1 -1
  65. package/packages/scrabble-solver/.next/server/pages/index.html +1 -1
  66. package/packages/scrabble-solver/.next/server/pages/index.js.nft.json +1 -1
  67. package/packages/scrabble-solver/.next/server/pages/index.json +1 -1
  68. package/packages/scrabble-solver/.next/server/pages/not-found.html +1 -1
  69. package/packages/scrabble-solver/.next/server/webpack-api-runtime.js +1 -1
  70. package/packages/scrabble-solver/.next/static/{f_g0t0jBAscXxDrNYOuV0 → HFiEUpdZIGYd_XKb5mCLZ}/_buildManifest.js +1 -1
  71. package/packages/scrabble-solver/.next/static/chunks/{main-ca07941c8a544c9a.js → main-65a5015b46ca9827.js} +1 -1
  72. package/packages/scrabble-solver/.next/static/chunks/pages/{_app-369e5cb907606ad4.js → _app-9c9aaea7b6881765.js} +4 -4
  73. package/packages/scrabble-solver/.next/static/chunks/pages/{index-08b3b0a754095919.js → index-e9ea63e97865edcf.js} +1 -1
  74. package/packages/scrabble-solver/.next/static/css/{500cdc9a24075d91.css → 78726ae7cf7a5497.css} +1 -1
  75. package/packages/scrabble-solver/.next/trace +21 -21
  76. package/packages/scrabble-solver/.next/trace-build +1 -1
  77. package/packages/scrabble-solver/README.md +3 -3
  78. package/packages/scrabble-solver/next.config.js +1 -0
  79. package/packages/scrabble-solver/package.json +11 -10
  80. package/packages/scrabble-solver/public/service-worker.js +1 -1
  81. package/packages/scrabble-solver/src/@types/scss.d.ts +5 -0
  82. package/packages/scrabble-solver/src/components/Board/Board.module.scss +2 -2
  83. package/packages/scrabble-solver/src/components/Board/components/Actions/Actions.module.scss +1 -1
  84. package/packages/scrabble-solver/src/components/Board/components/Cell/Cell.module.scss +26 -6
  85. package/packages/scrabble-solver/src/components/Board/components/InputPrompt/InputPrompt.module.scss +1 -1
  86. package/packages/scrabble-solver/src/components/Button/Button.module.scss +1 -1
  87. package/packages/scrabble-solver/src/components/Dictionary/Dictionary.module.scss +1 -1
  88. package/packages/scrabble-solver/src/components/DictionaryInput/DictionaryInput.module.scss +1 -1
  89. package/packages/scrabble-solver/src/components/IconButton/IconButton.module.scss +1 -1
  90. package/packages/scrabble-solver/src/components/Loading/Loading.module.scss +1 -1
  91. package/packages/scrabble-solver/src/components/Modal/Modal.module.scss +1 -1
  92. package/packages/scrabble-solver/src/components/Modal/Modal.tsx +0 -1
  93. package/packages/scrabble-solver/src/components/NotFound/NotFound.module.scss +1 -1
  94. package/packages/scrabble-solver/src/components/PlainTiles/PlainTiles.module.scss +1 -1
  95. package/packages/scrabble-solver/src/components/Rack/Rack.module.scss +11 -6
  96. package/packages/scrabble-solver/src/components/Rack/components/InputPrompt/InputPrompt.module.scss +1 -1
  97. package/packages/scrabble-solver/src/components/Rack/components/RackTile/RackTile.module.scss +1 -1
  98. package/packages/scrabble-solver/src/components/Radio/Radio.module.scss +1 -1
  99. package/packages/scrabble-solver/src/components/Results/Results.module.scss +1 -1
  100. package/packages/scrabble-solver/src/components/ResultsInput/ResultsInput.module.scss +1 -1
  101. package/packages/scrabble-solver/src/components/Solver/Solver.module.scss +1 -1
  102. package/packages/scrabble-solver/src/components/Solver/components/InsertButton/InsertButton.module.scss +1 -1
  103. package/packages/scrabble-solver/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +1 -1
  104. package/packages/scrabble-solver/src/components/Spinner/Spinner.module.scss +1 -1
  105. package/packages/scrabble-solver/src/components/Tile/Tile.module.scss +1 -1
  106. package/packages/scrabble-solver/src/hooks/useLocalStorage.ts +4 -52
  107. package/packages/scrabble-solver/src/hooks/useMedia.ts +0 -1
  108. package/packages/scrabble-solver/src/lib/isMac.ts +1 -1
  109. package/packages/scrabble-solver/src/modals/MenuModal/MenuModal.module.scss +1 -1
  110. package/packages/scrabble-solver/src/modals/RemainingTilesModal/components/Character/Character.module.scss +1 -1
  111. package/packages/scrabble-solver/src/modals/ResultsModal/ResultsModal.module.scss +1 -1
  112. package/packages/scrabble-solver/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +1 -1
  113. package/packages/scrabble-solver/src/pages/_app.tsx +0 -1
  114. package/packages/scrabble-solver/src/parameters/index.ts +48 -47
  115. package/packages/scrabble-solver/src/sdk/fetchJson.ts +3 -7
  116. package/packages/scrabble-solver/src/service-worker/index.ts +0 -1
  117. package/packages/scrabble-solver/src/service-worker/routeSolveRequests.ts +18 -12
  118. package/packages/scrabble-solver/src/state/board/slice.ts +6 -4
  119. package/packages/scrabble-solver/src/state/localStorage.ts +42 -52
  120. package/packages/scrabble-solver/src/state/sagas.ts +1 -2
  121. package/packages/scrabble-solver/src/state/settings/initialState.ts +7 -7
  122. package/packages/scrabble-solver/src/styles/_tokens.scss +59 -0
  123. package/packages/scrabble-solver/src/styles/global.scss +3 -3
  124. package/packages/scrabble-solver/src/styles/mixins.scss +13 -12
  125. package/packages/scrabble-solver/src/styles/variables.module.scss +53 -0
  126. package/packages/scrabble-solver/src/styles/variables.scss +44 -41
  127. package/packages/scrabble-solver/tsconfig.json +0 -1
  128. package/packages/scrabble-solver/tsconfig.tsbuildinfo +1 -1
  129. package/packages/solver/build/fillPattern.d.ts +1 -3
  130. package/packages/solver/package.json +8 -7
  131. package/packages/types/build/Result.d.ts +1 -1
  132. package/packages/types/package.json +3 -3
  133. package/packages/word-definitions/build/languages/english.js +1 -3
  134. package/packages/word-definitions/package.json +5 -4
  135. package/packages/word-definitions/src/languages/english.ts +0 -1
  136. package/packages/word-definitions/src/parse.test.ts +7 -2
  137. package/packages/word-lists/package.json +3 -3
  138. package/tsconfig.json +2 -1
  139. package/eslint.config.mjs +0 -722
  140. package/jest.config.js +0 -15
  141. package/jest.setup.js +0 -6
  142. package/tsconfig.jest.json +0 -11
  143. /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.15.24",
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": "tsc --project .",
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.15.24"
28
+ "@scrabble-solver/types": "^2.16.0-alpha.0"
28
29
  },
29
30
  "devDependencies": {
30
- "@scrabble-solver/configs": "^2.15.24",
31
- "@scrabble-solver/constants": "^2.15.24",
32
- "@scrabble-solver/dictionaries": "^2.15.24"
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.15.24",
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": "tsc --project .",
22
+ "build": "tsgo --project .",
23
23
  "clean": "rimraf build/"
24
24
  },
25
25
  "dependencies": {
26
- "@scrabble-solver/constants": "^2.15.24"
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.15.24",
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": "tsc --project .",
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.15.24",
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 = readTestFile(`expected/${locale}.${word}.json`);
33
- expect(parse(locale, input)).toEqual(JSON.parse(expected));
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.15.24",
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": "tsc --project .",
22
+ "build": "tsgo --project .",
23
23
  "clean": "rimraf build/"
24
24
  },
25
25
  "dependencies": {
26
- "@scrabble-solver/types": "^2.15.24",
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": ["jest"]
16
+ "types": ["bun"]
16
17
  },
17
18
  "exclude": ["cypress", "cypress.config.ts", "node_modules"]
18
19
  }