Commit 8ae4bd6
authored
chore: quality-tightening (yarn 1 -> 4, oxfmt + oxlint + tsc + vitest + husky) (#305)
* chore: quality-tightening (yarn 1 -> 4, oxfmt + oxlint + tsc + vitest + husky)
Yarn 1 -> 4 migration plus the standard quality-tightening rollout.
- Drops yarn 1 lockfile + .yarnrc; adds .yarnrc.yml + mise.toml
(node 20.18.0, yarn 4.14.1, actionlint, shellcheck, gitleaks).
- prettier -> oxfmt
- eslint (with @typescript-eslint, github, jest, prettier, unicorn)
-> oxlint with eslint-plugin-unicorn
- jest 26 + jest-circus + jest-fail-on-console + ts-jest +
@types/jest -> vitest 4 + vite 7 + @vitest/coverage-istanbul.
jest.config.js + jest.setup.ts removed; replaced with
vitest.config.mts + src/test/setup.ts.
- new: tsgo --noEmit (alongside tsc fallback)
- husky 7 -> husky 9 with scripts/ensure-husky.mjs self-heal +
lint-staged
- yarn-audit-fix dropped (yarn 4 has its own audit; the fixer was
yarn 1 specific)
- ts-node dropped (not used by build/test/lint)
- TypeScript bumped 4.x -> 5; tsconfig target ES6 -> ES2022 + lib
ES2022 + DOM, skipLibCheck on, types: [node].
- Added standard yarn 4 .gitignore entries (.yarn/cache et al.)
Test migration (10 files):
- Bulk-converted jest.* -> vi.* and added vitest imports.
- 2 tests asserted nothing: 'expect(() => fn()).rejects;' (no
matcher chained). Replaced with proper
'await expect(fn()).rejects.toThrow(...)' assertions, per the
global rule 'Never weaken a test to make it pass'.
- jest.setup.ts (jest-fail-on-console) replaced with
src/test/setup.ts that installs equivalent console-fail spies in
beforeEach + restores in afterEach. Same 'console output =
failed test' behaviour.
Verified locally: lint 0/6, format clean, typecheck clean,
test 77/78 (1 pre-existing skipped), build succeeds (ncc bundle
2282kB), actionlint clean across all workflows.
* ci: corepack-enable yarn 4 in main.yml + use mise node + add cache
* chore(deps): bump @actions/github 5 -> 6 + force undici >=6.24
Snyk flagged 9 transitive vulnerabilities (3 high, 6 moderate)
through the old toolchain. @actions/github@5.x carries an outdated
@octokit/* + undici 5.29 chain. Bumping to v6 picks up the patched
@octokit/* and pinning undici via yarn resolutions clears the
remaining WebSocket / HTTP-smuggling advisories.
After: 'yarn npm audit --recursive' reports no audit suggestions.
@actions/github v6's typings tightened the createCheck() call: the
'status' and 'conclusion' fields are string-literal unions now, not
free strings. results-check.ts widens those with 'as const' so the
typecheck stays clean.
Also: lint-staged globs now exclude dist/ explicitly so pre-commit
hooks don't fail with 'Expected at least one target file' when the
only staged files are in the dist/ ignore-patterned tree.
* ci(unity-test-runner): start Docker daemon on Windows runners
5 windows-2022 jobs failed in this PR with:
failed to connect to the docker API at npipe:////./pipe/docker_engine
##[error]The process 'C:\Windows\system32\docker.exe' failed with exit code 1
Failing jobs:
- Test each mode sequentially (windows-2022, 2022.3.13f1, ...)
- Test each mode sequentially (windows-2022, 2023.1.19f1, ...)
- Test each mode sequentially (windows-2022, 2023.2.2f1, ...)
- Test edit mode (windows-2022, 2023.1.19f1, ..., true)
- Test edit mode (windows-2022, 2023.2.2f1, ..., true)
GitHub-hosted windows-2022 runners ship with the Docker service
**Stopped**. Action runs that pull a Linux/Windows container have to
explicitly start the daemon first; otherwise 'docker run' inside the
action returns the npipe error above.
Sister project unity-builder solved this in May 2025 by adding an
'Ensure Docker daemon is ready' step before the action invocation.
Mirroring the same step here, gated on 'runner.os == Windows' so
ubuntu-latest matrix entries skip it. Inserted into all 7 jobs that
target the matrix.baseRunner runner (testRunner, testAllModes,
testRunnerInEditMode, testRunnerInPlayMode, testStandalone,
testStandaloneIL2CPP, testEachModeSequentially).
Pre-existing on main (last successful Windows run was Feb 2026,
before windows-2022 became the default and the daemon-stopped
behaviour started).
* ci: retrigger CI for unity-test-runner
The previous run had two transient Unity-internal failures:
- 'Test package mode in all modes with Scoped Registry and Multiple
Scopes' on ubuntu-latest exited with code 134 (Mono crash inside
Unity Editor's threadpool callback).
- 'Test standalone with IL2CPP (windows-2022, 2023.1.19f1)' failed
with 'Access token is unavailable; failed to update' inside the
Unity licensing client \u2014 a transient licensing-server flake.
Both are container-internal Unity flakiness, unrelated to the
quality-tightening migration; they've been observed on main historically
too. Pushing an empty commit to retrigger only those jobs (and
verify they're flakes, not consistent failures).1 parent 9e9fb99 commit 8ae4bd6
40 files changed
Lines changed: 35737 additions & 13663 deletions
File tree
- .github/workflows
- .husky
- dist
- scripts
- src
- model
- test
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
29 | 71 | | |
30 | 72 | | |
31 | 73 | | |
| |||
64 | 106 | | |
65 | 107 | | |
66 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
67 | 138 | | |
68 | 139 | | |
69 | 140 | | |
| |||
111 | 182 | | |
112 | 183 | | |
113 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
114 | 214 | | |
115 | 215 | | |
116 | 216 | | |
| |||
174 | 274 | | |
175 | 275 | | |
176 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
177 | 306 | | |
178 | 307 | | |
179 | 308 | | |
| |||
234 | 363 | | |
235 | 364 | | |
236 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
237 | 395 | | |
238 | 396 | | |
239 | 397 | | |
| |||
293 | 451 | | |
294 | 452 | | |
295 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
296 | 483 | | |
297 | 484 | | |
298 | 485 | | |
| |||
344 | 531 | | |
345 | 532 | | |
346 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
347 | 563 | | |
348 | 564 | | |
349 | 565 | | |
| |||
403 | 619 | | |
404 | 620 | | |
405 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
406 | 651 | | |
407 | 652 | | |
408 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 1 | + | |
8 | 2 | | |
9 | | - | |
10 | | - | |
| 3 | + | |
11 | 4 | | |
12 | | - | |
13 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments