Compare commits
91 Commits
b74849d3e2
...
8d1e5f1200
Author | SHA1 | Date | |
---|---|---|---|
|
8d1e5f1200 | ||
|
a6007cef10 | ||
|
9bb0c57b92 | ||
|
3b36ab17e4 | ||
|
375587213e | ||
|
8da02bad50 | ||
|
5bfcb1d379 | ||
|
40443d2afa | ||
|
800b8c9905 | ||
|
8a2b888971 | ||
|
0bc78cb715 | ||
|
e8ab79ebed | ||
|
491df80b66 | ||
|
5ed9e152ab | ||
|
acb1f4184b | ||
|
957a3e5c24 | ||
|
1f5e089818 | ||
|
97ddcb711b | ||
|
93525b5803 | ||
|
c6ca35c4ab | ||
|
e50ebaa815 | ||
|
1c59b67d7e | ||
|
f54890001c | ||
|
8ef2fadce4 | ||
|
4dd6eb4e95 | ||
|
6204a6fdcb | ||
|
12433b78e5 | ||
|
c3b6e9e6b5 | ||
|
901f6a6812 | ||
|
75ececd942 | ||
|
8b304adf14 | ||
|
f7b87f3d1e | ||
|
12acaa9590 | ||
|
9475505cd2 | ||
|
1ae69a4183 | ||
|
17eeceb4f3 | ||
|
6ae2bd70cf | ||
|
10b9cfcdb0 | ||
|
ede2a947ca | ||
|
32faab05d5 | ||
|
b1561ce741 | ||
|
9f74bfff94 | ||
|
0517d5704a | ||
|
48db9491c6 | ||
|
c92b895946 | ||
|
903fad89d9 | ||
|
d41e6055e7 | ||
|
0c82b3f514 | ||
|
ed915dcb58 | ||
|
c0a42985bf | ||
|
26cbf2db8c | ||
|
1df3ac0962 | ||
|
e1e7287919 | ||
|
adb5900497 | ||
|
9218d35938 | ||
|
22d2b4a436 | ||
|
958eb00566 | ||
|
22b9a19ba6 | ||
|
0935d817e9 | ||
|
462b423cb8 | ||
|
157b662f9e | ||
|
3434078329 | ||
|
c0e755c3c3 | ||
|
19730f9cf0 | ||
|
29d9bb6e7b | ||
|
7cb2c560ab | ||
|
f3854abc16 | ||
|
1b8082a177 | ||
|
ed8858e07d | ||
|
2f1cf2fc13 | ||
|
a117ff9bc8 | ||
|
30a6f47081 | ||
|
08d7216424 | ||
|
0ef1a34030 | ||
|
4f259e2c2f | ||
|
bb46ba9f60 | ||
|
556d588d67 | ||
|
2e3a7d47e0 | ||
|
ab394db9cf | ||
|
7b7edbb474 | ||
|
ffa3d1cfe3 | ||
|
fc128a2f4c | ||
|
99545cf3c7 | ||
|
6ad11015f7 | ||
|
6211fbd471 | ||
|
3940abbeaf | ||
|
51d4c33de0 | ||
|
58876a2086 | ||
|
ef843debee | ||
|
adee68a6d5 | ||
|
b1e1a383fb |
1
.github/workflows/github-pages.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- beta
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
5
.github/workflows/linting.yml
vendored
@ -41,4 +41,7 @@ jobs:
|
||||
run: pnpm biome-ci
|
||||
|
||||
- name: Check dependencies with depcruise
|
||||
run: pnpm depcruise
|
||||
run: pnpm depcruise
|
||||
|
||||
- name: Lint with ls-lint
|
||||
run: pnpm ls-lint
|
2
.github/workflows/test-shard-template.yml
vendored
@ -44,4 +44,4 @@ jobs:
|
||||
run: pnpm i
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm exec vitest --project ${{ inputs.project }} --no-isolate --shard=${{ inputs.shard }}/${{ inputs.totalShards }} ${{ !runner.debug && '--silent' || '' }}
|
||||
run: pnpm test:silent --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
|
||||
|
1
.github/workflows/tests.yml
vendored
@ -11,6 +11,7 @@ on:
|
||||
- beta
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check-path-change-filter:
|
||||
|
28
.ls-lint.yml
Normal file
@ -0,0 +1,28 @@
|
||||
# Base settings to use
|
||||
# Note that the `_cfg` key isn't part of ls-lint's configuration, it's just a YAML anchor for reuse.
|
||||
_cfg: &cfg
|
||||
.ps1: kebab-case
|
||||
.ts: kebab-case
|
||||
.js: kebab-case
|
||||
.*.ts: kebab-case
|
||||
.*.js: kebab-case
|
||||
.dir: kebab-case
|
||||
.py: snake_case # python files should always use snake_case
|
||||
|
||||
ls:
|
||||
<<: *cfg
|
||||
src: &src
|
||||
<<: *cfg
|
||||
.dir: kebab-case | regex:@types
|
||||
.js: exists:0
|
||||
src/system/version-migration/versions:
|
||||
.ts: snake_case
|
||||
<<: *cfg
|
||||
test: *src
|
||||
ignore:
|
||||
- node_modules
|
||||
- .vscode
|
||||
- .github
|
||||
- .git
|
||||
- public
|
||||
- dist
|
@ -104,7 +104,7 @@ Most non-trivial changes (*especially bug fixes*) should come along with new tes
|
||||
- Test edge cases. A good strategy is to think of edge cases beforehand and create tests for them using `it.todo`. Once the edge case has been handled, you can remove the `todo` marker.
|
||||
|
||||
## 😈 Development Save File
|
||||
> Some issues may require you to have unlocks on your save file which go beyond normal overrides. For this reason, the repository contains a [save file](../test/testUtils/saves/everything.psrv) with _everything_ unlocked (even ones not legitimately obtainable, like unimplemented variant shinies).
|
||||
> Some issues may require you to have unlocks on your save file which go beyond normal overrides. For this reason, the repository contains a [save file](../test/test-utils/saves/everything.psrv) with _everything_ unlocked (even ones not legitimately obtainable, like unimplemented variant shinies).
|
||||
|
||||
1. Start the game up locally and navigate to `Menu -> Manage Data -> Import Data`
|
||||
2. Select [everything.prsv](test/testUtils/saves/everything.prsv) (`test/testUtils/saves/everything.prsv`) and confirm.
|
||||
2. Select [everything.prsv](test/test-utils/saves/everything.prsv) (`test/test-utils/saves/everything.prsv`) and confirm.
|
||||
|
@ -19,7 +19,6 @@
|
||||
// and having to verify whether each individual file is ignored
|
||||
"includes": [
|
||||
"**",
|
||||
"!**/*.d.ts",
|
||||
"!**/dist/**/*",
|
||||
"!**/build/**/*",
|
||||
"!**/coverage/**/*",
|
||||
@ -177,9 +176,10 @@
|
||||
}
|
||||
},
|
||||
|
||||
// Overrides to prevent unused import removal inside `overrides.ts` and enums files (for TSDoc linkcodes)
|
||||
// Overrides to prevent unused import removal inside `overrides.ts` and enums files (for TSDoc linkcodes),
|
||||
// as well as in all TS files in `scripts/` (which are assumed to be boilerplate templates).
|
||||
{
|
||||
"includes": ["**/src/overrides.ts", "**/src/enums/**/*"],
|
||||
"includes": ["**/src/overrides.ts", "**/src/enums/**/*", "**/scripts/**/*.ts", "**/*.d.ts"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"correctness": {
|
||||
@ -189,7 +189,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"includes": ["**/src/overrides.ts"],
|
||||
"includes": ["**/src/overrides.ts", "**/scripts/**/*.ts"],
|
||||
"linter": {
|
||||
"rules": {
|
||||
"style": {
|
||||
|
12
global.d.ts
vendored
@ -1,14 +1,20 @@
|
||||
import type { AnyFn } from "#types/type-helpers";
|
||||
import type { SetupServerApi } from "msw/node";
|
||||
|
||||
export {};
|
||||
|
||||
declare global {
|
||||
/**
|
||||
* Only used in testing.
|
||||
* Can technically be undefined/null but for ease of use we are going to assume it is always defined.
|
||||
* Used to load i18n files exclusively.
|
||||
*
|
||||
* To set up your own server in a test see `game_data.test.ts`
|
||||
* To set up your own server in a test see `game-data.test.ts`
|
||||
*/
|
||||
var server: SetupServerApi;
|
||||
|
||||
// Overloads for `Function.apply` and `Function.call` to add type safety on matching argument types
|
||||
interface Function {
|
||||
apply<T extends AnyFn>(this: T, thisArg: ThisParameterType<T>, argArray: Parameters<T>): ReturnType<T>;
|
||||
|
||||
call<T extends AnyFn>(this: T, thisArg: ThisParameterType<T>, ...argArray: Parameters<T>): ReturnType<T>;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
pre-commit:
|
||||
skip:
|
||||
- merge
|
||||
- rebase
|
||||
commands:
|
||||
biome-lint:
|
||||
run: pnpm exec biome check --write --reporter=summary --staged --no-errors-on-unmatched
|
||||
stage_fixed: true
|
||||
skip:
|
||||
- merge
|
||||
- rebase
|
||||
ls-lint:
|
||||
run: pnpm exec ls-lint
|
||||
|
||||
post-merge:
|
||||
commands:
|
||||
|
14
package.json
@ -12,12 +12,12 @@
|
||||
"test": "vitest run --no-isolate",
|
||||
"test:cov": "vitest run --coverage --no-isolate",
|
||||
"test:watch": "vitest watch --coverage --no-isolate",
|
||||
"test:silent": "vitest run --silent --no-isolate",
|
||||
"test:silent": "vitest run --silent='passed-only' --no-isolate",
|
||||
"test:create": "node scripts/create-test/create-test.js",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"eslint": "eslint --fix .",
|
||||
"eslint-ci": "eslint .",
|
||||
"biome": "biome check --write --changed --no-errors-on-unmatched",
|
||||
"biome": "biome check --write --changed --no-errors-on-unmatched --diagnostic-level=error",
|
||||
"biome-ci": "biome ci --diagnostic-level=error --reporter=github --no-errors-on-unmatched",
|
||||
"docs": "typedoc",
|
||||
"depcruise": "depcruise src test",
|
||||
@ -28,19 +28,21 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.0.0",
|
||||
"@ls-lint/ls-lint": "2.3.1",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.16.3",
|
||||
"@types/node": "^22.16.5",
|
||||
"@vitest/coverage-istanbul": "^3.2.4",
|
||||
"@vitest/expect": "^3.2.4",
|
||||
"chalk": "^5.4.1",
|
||||
"dependency-cruiser": "^16.10.4",
|
||||
"inquirer": "^12.7.0",
|
||||
"inquirer": "^12.8.2",
|
||||
"jsdom": "^26.1.0",
|
||||
"lefthook": "^1.12.2",
|
||||
"msw": "^2.10.4",
|
||||
"phaser3spectorjs": "^0.0.8",
|
||||
"typedoc": "^0.28.7",
|
||||
"typedoc": "^0.28.8",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.5",
|
||||
"vite": "^7.0.6",
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"vitest": "^3.2.4",
|
||||
"vitest-canvas-mock": "^0.3.3"
|
||||
|
932
pnpm-lock.yaml
@ -333,8 +333,6 @@
|
||||
"671-yellow",
|
||||
"6713",
|
||||
"6713",
|
||||
"672",
|
||||
"672",
|
||||
"6724",
|
||||
"6724",
|
||||
"673",
|
||||
@ -377,10 +375,6 @@
|
||||
"690",
|
||||
"691",
|
||||
"691",
|
||||
"692",
|
||||
"692",
|
||||
"693",
|
||||
"693",
|
||||
"695",
|
||||
"695",
|
||||
"696",
|
||||
@ -503,10 +497,6 @@
|
||||
"751",
|
||||
"752",
|
||||
"752",
|
||||
"753",
|
||||
"753",
|
||||
"754",
|
||||
"754",
|
||||
"755",
|
||||
"755",
|
||||
"756",
|
||||
@ -1459,8 +1449,6 @@
|
||||
"671b-yellow",
|
||||
"6713b",
|
||||
"6713b",
|
||||
"672b",
|
||||
"672b",
|
||||
"6724b",
|
||||
"6724b",
|
||||
"673b",
|
||||
@ -1503,10 +1491,6 @@
|
||||
"690b",
|
||||
"691b",
|
||||
"691b",
|
||||
"692b",
|
||||
"692b",
|
||||
"693b",
|
||||
"693b",
|
||||
"695b",
|
||||
"695b",
|
||||
"696b",
|
||||
@ -1629,10 +1613,6 @@
|
||||
"751b",
|
||||
"752b",
|
||||
"752b",
|
||||
"753b",
|
||||
"753b",
|
||||
"754b",
|
||||
"754b",
|
||||
"755b",
|
||||
"755b",
|
||||
"756b",
|
||||
@ -2585,8 +2565,6 @@
|
||||
"671sb-yellow",
|
||||
"6713sb",
|
||||
"6713sb",
|
||||
"672sb",
|
||||
"672sb",
|
||||
"6724sb",
|
||||
"6724sb",
|
||||
"673sb",
|
||||
@ -2629,10 +2607,6 @@
|
||||
"690sb",
|
||||
"691sb",
|
||||
"691sb",
|
||||
"692sb",
|
||||
"692sb",
|
||||
"693sb",
|
||||
"693sb",
|
||||
"695sb",
|
||||
"695sb",
|
||||
"696sb",
|
||||
@ -2755,10 +2729,6 @@
|
||||
"751sb",
|
||||
"752sb",
|
||||
"752sb",
|
||||
"753sb",
|
||||
"753sb",
|
||||
"754sb",
|
||||
"754sb",
|
||||
"755sb",
|
||||
"755sb",
|
||||
"756sb",
|
||||
@ -3716,8 +3686,6 @@
|
||||
"671s-yellow",
|
||||
"6713s",
|
||||
"6713s",
|
||||
"672s",
|
||||
"672s",
|
||||
"6724s",
|
||||
"6724s",
|
||||
"673s",
|
||||
@ -3760,10 +3728,6 @@
|
||||
"690s",
|
||||
"691s",
|
||||
"691s",
|
||||
"692s",
|
||||
"692s",
|
||||
"693s",
|
||||
"693s",
|
||||
"695s",
|
||||
"695s",
|
||||
"696s",
|
||||
@ -3886,10 +3850,6 @@
|
||||
"751s",
|
||||
"752s",
|
||||
"752s",
|
||||
"753s",
|
||||
"753s",
|
||||
"754s",
|
||||
"754s",
|
||||
"755s",
|
||||
"755s",
|
||||
"756s",
|
||||
@ -4625,8 +4585,6 @@
|
||||
"730",
|
||||
"747",
|
||||
"748",
|
||||
"753",
|
||||
"754",
|
||||
"755",
|
||||
"756",
|
||||
"761",
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 671 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 876 B After Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 836 B After Width: | Height: | Size: 747 B |
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 646 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 675 B |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 956 B |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 885 B |
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 963 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |