Repository navigation
build: TypeScript 7, Rsbuild 2, and Jest -> Rstest - #900
Conversation
TypeScript 7.0 is the Go-native compiler rewrite. It ships no programmatic
API -- `import * as ts from 'typescript'` does not exist, and a replacement
is not expected until 7.1. Both ts-jest and typescript-eslint link against
that API (typescript-estree requires it just to parse, independent of
parserOptions.project), so a single-version bump is impossible today.
Follow the upstream guidance and install both, disambiguated by npm alias:
`typescript` resolves to @typescript/typescript6, which re-exports the 6.0
API and renames its binary to tsc6; `@typescript/native` resolves to
typescript@7, which supplies `tsc`. Build and typecheck therefore run on the
native compiler while lint and test keep a working compiler API. pnpm's
strict-peer-dependencies is satisfied because the aliased package reports
version 6.0.2: within ts-jest's `<7` and typescript-eslint's `<6.1.0`.
typescript-eslint moves 8.54 -> 8.63 because 8.54 caps its peer at `<6.0.0`.
Most of what breaks is TypeScript 6.0's doing, not 7.0's. Verified against
6.0.3 and 7.0.2 side by side:
- `baseUrl` and `moduleResolution: node10` are removed outright in 7.0.
Dropping baseUrl is safe because `paths` targets resolve relative to the
config file that declares them -- even through `extends` -- so `./src/*`
in tsconfig.base.json reproduces the old repo-root mapping exactly. The
targets must now be relative; TS7 rejects bare specifiers (TS5090).
- `moduleResolution: bundler` is the closest analogue to node10, and
pairing it with `module: commonjs` only became legal in 6.0 (5.9 rejects
it with TS5095). Every consumer of these packages is a bundler or CJS
Node, which resolve the same way.
- `types` defaults to [] rather than every installed @types package, so
each program now names the globals-only packages it actually relies on.
Everything reached through an ordinary import (@types/katex, @types/react)
still resolves without an entry.
- `noUncheckedSideEffectImports` defaults on, so diagram needs the same
`declare module '*.css'` that app already had. The narrower
'*.module.css' declaration still wins for CSS modules.
- Symbol.dispose used to arrive implicitly via @types/node augmenting
SymbolConstructor. Name the lib that actually owns it instead.
Emit was checked rather than assumed: 446 emitted files were compared against
a TS 5.9 baseline by re-printing both from their parsed ASTs. Three .js files
differ, all AST-identical (JSX children placed on the same line). Nineteen
.d.ts files pick a different React.memo overload -- NamedExoticComponent<P>
becomes MemoExoticComponent<(p: P) => ReactElement>, a strict refinement that
is assignable to what it replaces, and a 6.0 change rather than a 7.0 one.
Upgrading has one sharp edge worth knowing: a .tsbuildinfo written by 5.9
under the old config makes 7.0 report phantom errors (475 of them in
src/server) instead of invalidating. Delete stale build state before the
first build. A 6.0-authored buildinfo is read correctly. engine's `clean`
now removes its two buildinfo files, which it had been leaving behind.
Dropping @types/resize-observer-browser falls out of making `types` explicit:
lib.dom has declared ResizeObserver since 4.2, and a triple-slash reference
in Canvas.tsx was the only thing keeping the package alive. diagram compiles
clean without either.
The `types: ["jest"]` entries exist only because ts-jest type-checks tests
against each package's tsconfig; they go away with the move to Rstest.
Rstest is built on Rsbuild 2, so the app has to move first. Two of the three
breaking changes that touch us are silent -- the old keys are ignored rather
than rejected -- which makes them worth spelling out.
Rsbuild 2 bundles http-proxy-middleware 4, where `context` became `pathFilter`
and `logLevel` was dropped. An array-style proxy entry with no `pathFilter`
matches every request, so keeping `context` does not preserve the old behavior:
it proxies the entire SPA to the backend. Confirmed by running the dev server
both ways -- with `context`, GET / returns 504 from the dead backend instead of
index.html. `changeOrigin` now defaults to true; kept explicit.
`performance.chunkSplit` is deprecated in favor of a top-level `splitChunks`,
where `strategy: 'all-in-one'` becomes `splitChunks: false`. That only disables
the SplitChunksPlugin; the LimitChunkCountPlugin in the component config is
still what collapses the dynamic-import chunks the cross-origin embed contract
depends on. Both bundles come out with the same chunk layout and sizes as
Rsbuild 1, and sd-component.js still resolves its publicPath from
document.currentScript.
@rsbuild/core is now pure ESM. Our config and scripts stay CommonJS: Rsbuild 2
already requires Node 20.19+/22.12+, which is exactly where `require(esm)`
became available, so `require('@rsbuild/core')` keeps working. Converting the
build scripts to ESM is a larger change and buys nothing today.
Separately: `startDevServer()` has never taken a `port` option -- not in 1.x
either -- so `PORT=3111 pnpm start:frontend` silently bound 3000. Move the port
to `server.port`, where Rsbuild reads it, and drop the argument that was being
discarded. Verified the dev server now binds PORT and still routes /api, /auth,
/oauth, /logout, /render, /session and /download to the backend while every
other path falls through to the SPA.
ts-jest needs TypeScript's programmatic compiler API, which TypeScript 7 does
not ship (deferred to 7.1). Rather than pin a second TypeScript just for the
test runner, move to Rstest: it compiles with the same Rspack/swc toolchain the
app already bundles with, so the runner shares one dependency tree instead of
dragging in a parallel one. Net -260 packages from the lockfile; the only
jest-family package left is a transitive jest-worker. Test counts are unchanged
package for package: core 100, engine 442 + 1 skipped, server 139, app 99,
diagram 1500, serve-web 113.
Rstest keeps test globals off, so each test file imports the helpers it uses
from '@rstest/core'. That retires @types/jest and the shared eslint config's
`jest: 'readonly'` globals block. `jest.*` maps onto `rs.*` 1:1 except:
- `jest.Mock<Return, Args>` / `jest.SpyInstance` become `Mock<Fn>` /
`MockInstance`, whose type argument is the whole function signature rather
than the return type. @types/jest typed jest.fn() loosely enough to hide
argument mismatches: nine were hiding in serve-web's ws.test.ts, which had
been passing `<void, [WsMessage]>` all along.
- `jest.requireActual` is synchronous; `rs.importActual` is not, and Rstest
rejects async mock factories outright. The replacement is the
`import ... with { rstest: 'importActual' }` attribute, which hoists along
with the factory. src/server cannot use it -- import attributes require an
ES module target, and that program emits CommonJS while type-checking its
own tests -- so static-config.test.ts uses `rs.mock('fs', { spy: true })`.
- `jest.requireMock` has no synchronous form either; login.test.tsx imports
the (already mocked) module namespace directly.
Rstest has no `@jest-environment` docblock. The 14 diagram tests that opted into
a Node environment are now an explicit `projects` entry: project-controller.ts
documents a "zero React, zero DOM" invariant that an ambient jsdom global would
quietly erode. The other 39 docblocks existed only to carry that pragma, so
their block-comment copyright headers return to the canonical line-comment form,
and check-copyright.py stops advertising a block form nothing uses.
Two Jest workarounds are deleted rather than ported. The wouter stub and its
moduleNameMapper existed because CommonJS Jest mishandled wouter's ESM-only
"exports"; rspack resolves it natively, which also retires the require.resolve()
dance guarding issue #523. The CSS-module Proxy stubs (which echoed each
property name back as its class name) give way to compiling the real stylesheets
with `output.cssModules.localIdentName: '[local]'`, so tests that query
`.eqnEditor` still match.
@testing-library/react self-registers `afterEach(cleanup)` only when `afterEach`
is a global, and @testing-library/dom's waitFor only pumps fake timers when a
global `jest` object exists (helpers.js gates on `typeof jest !== 'undefined'`,
then calls `jest.advanceTimersByTime`). Both are wired up explicitly in a
per-package tests/setup-testing-library.ts; the timer shim is inert under real
timers.
jsdom goes 26 -> 29, which implements PointerEvent. dialog.test.tsx asserted
that a bare pointerdown dismisses a Radix dialog -- true only because
@testing-library/dom fell back to a plain Event whose `button` was undefined.
Given a real PointerEvent (button 0), Radix waits for the matching click, as
browsers do, so the test now fires the full pointerdown/pointerup/click
sequence.
src/app/scripts/test.js was an orphaned create-react-app launcher that required
jest and that nothing invoked.
Test files remain un-type-checked: `isolatedModules` in tsconfig.base.json made
ts-jest transpile-only, so nothing is lost here, but the hole is now explicit
and tracked in #899 (55 latent errors, including a diagram test importing a
module that does not exist).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #900 +/- ##
=======================================
Coverage 91.00% 91.00%
=======================================
Files 226 226
Lines 145803 145803
=======================================
Hits 132684 132684
Misses 13119 13119 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e2a00e612
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| type FetchImpl = (input: unknown, init?: { method?: string }) => Promise<Response>; | ||
|
|
||
| const fetchMock = rs.fn<FetchImpl>(async () => userResponse(401, {})); | ||
| (globalThis as unknown as { fetch: Mock }).fetch = fetchMock; |
There was a problem hiding this comment.
Install fetch before importing App under Rstest
In the Rstest/Rspack runner, static imports are evaluated before this top-level assignment runs. App.tsx constructs UserInfoSingleton and calls fetch('/api/user') during module import, so the import { App, InnerApp } from '../App' below observes the native/missing fetch instead of this mock, causing the app suite to fail or make an uncontrolled relative fetch. Load App with a dynamic import after installing fetchMock, or move the fetch stub into setup that runs before test modules are evaluated.
Useful? React with 👍 / 👎.
| testEnvironment: 'jsdom', | ||
| include: ['tests/**/*.test.ts', 'tests/**/*.test.tsx'], | ||
| exclude: NODE_ENV_TESTS, | ||
| setupFiles: ['./tests/setup-testing-library.ts'], |
There was a problem hiding this comment.
Move TextEncoder polyfill into jsdom setup
Several jsdom tests still rely on Object.assign(globalThis, { TextEncoder, TextDecoder }) inside the test file before importing engine-backed modules such as ErrorDetails and StaticDiagram. Under Rstest's bundled ESM execution, those static imports run before the test body, so the engine import can execute in jsdom without TextEncoder and fail before the local polyfill statement runs. Add the polyfill to this setup file (or a second setup file) so it is installed before test modules load.
Useful? React with 👍 / 👎.
ReviewReviewed the toolchain migration end-to-end: TypeScript 6/7 dual-install with the aliased FindingsNo blocking correctness or behavior issues found. Specifically verified:
Minor nits (not worth follow-up):
Overall correctness verdictCorrect. The migration preserves test coverage package-for-package (2393 passed / 1 skipped), the two real behavior fixes it discovered along the way are load-bearing improvements, and every non-obvious choice (dual TypeScript install, node-env test split, rs.mock hoisting rules, importActual attribute, server's |
Rspack hoists ES imports above the module body, as the spec requires. TypeScript's CommonJS emit did not -- it left `require()` calls in source order -- so a `globalThis.fetch = ...` or a TextEncoder polyfill written above an import genuinely ran before that import under ts-jest. Both patterns survived the Rstest migration unchanged and both are now too late. App.tsx constructs UserInfoSingleton at module scope, whose constructor fetches /api/user. Since app.test.tsx's `fetchMock` is a const declared after the hoisted imports, it was still in its temporal dead zone when `../App` evaluated: the singleton reached the real undici fetch, which rejected with "Failed to parse URL from /api/user". The suite stayed green because the rejection is caught and reported as signed-out -- which is what the tests expect anyway -- and Rstest buffers console output on passing files, so the error was never printed. Move the stub into setup-fetch.ts, which runs before the test module's import graph, and pin the invariant with a test that the module-load request lands on the stub. The diagram tests' TextEncoder/TextDecoder polyfill has the same defect, but was inert rather than harmful: unlike jest's vm-isolated jsdom, Rstest's jsdom environment leaves Node's globals in place, so the engine's module-scope `new TextEncoder()` always found one. Rather than depend on that, hoist the polyfill into a jsdom setup file and drop the 19 misplaced copies. Also fix a duplicated word and a stale Jest reference in two comments.
|
@codex review |
Automated review — no findingsTraced the migration end-to-end (rstest configs, mock rewrites across all packages, tsconfig updates for TS7's stricter defaults, Rsbuild 2 proxy Verdict: correct. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91c7f78154
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Rsbuild prefers tsconfig `paths` over `alias` by default, and those paths | ||
| // resolve @simlin/engine to the package directory (i.e. its built output). | ||
| // @simlin/core needs no entry: tsconfig `paths` already lands on its source. | ||
| aliasStrategy: 'prefer-alias' as const, |
There was a problem hiding this comment.
Restore core source aliases under prefer-alias
With aliasStrategy: 'prefer-alias', Rsbuild does not use tsconfig paths as a bundling fallback; it uses only the explicit aliases. Since this config no longer aliases @simlin/core/datamodel, @simlin/core/common, or @simlin/core/collections, diagram tests that import those modules now resolve through the package exports to built lib/lib.module output (or fail when it is absent) instead of the source files that the Jest config exercised. That can let tests pass against stale built core output and miss source changes; add the core aliases here or avoid prefer-alias for this project.
Useful? React with 👍 / 👎.
`resolve.aliasStrategy: 'prefer-alias'` does not rank `alias` above tsconfig
`paths` -- it turns tsconfig-paths resolution off. Rsbuild wires rspack's
`resolve.tsConfig` only under the default `prefer-tsconfig`. The diagram
config leaned on the opposite reading ("@simlin/core needs no entry: tsconfig
paths already lands on its source"), so all five core subpaths it imports
resolved through package.json "exports" to src/core/lib instead. The suite
stayed green only because the built output happened to be current; a stale
build would have passed just as quietly while ignoring core source changes.
Alias @simlin/core to source in diagram, where jest's moduleNameMapper did.
Use a prefix entry rather than jest's one-subpath-at-a-time list: jest mapped
datamodel/common/collections and silently left canonicalize and base64 on the
built output, and a prefix cannot rot that way as subpaths are added. Give
app the same treatment -- it had the identical gap for base64 -- and pin bare
`@simlin/core` to index.ts, since resolving the directory would follow the
package's "main" straight back to lib.
src/core and src/server keep aliasing to built lib on purpose, as they did
under jest; their suites depend on a prior build.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12d8e9ebe2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rs.mock('@simlin/engine', () => ({ | ||
| Project: { | ||
| open: (...args: unknown[]) => open(...args), | ||
| openVensim: (...args: unknown[]) => openVensim(...args), | ||
| }, |
There was a problem hiding this comment.
Hoist shared mock functions with rs.hoisted
Rstest hoists rs.mock registrations above the module body, so this factory can run while resolving the static ../NewProject import before the const open / openVensim bindings on lines 13-14 have initialized. In this test file that makes the suite fail at module load with a TDZ ReferenceError instead of installing the engine mock; shared mocks referenced from a factory need to be created via rs.hoisted or moved inside the factory.
Useful? React with 👍 / 👎.
Review verdictReviewed the toolchain migration (TypeScript 7 dual-package strategy, Rsbuild 1→2, Jest→Rstest) with an adversarial eye on the mechanical hot spots:
One item I flagged internally but could not confirm without a live install: the main SPA's top-level Overall correctness: correct. No blocking issues found. |
A rs.mock factory runs the first time the module under test imports the
mocked specifier. NewProject.tsx statically imports @simlin/engine and
@simlin/core/datamodel, so both factories run while the hoisted `../NewProject`
import is being evaluated -- before any statement in the test file's body.
The shared `open`/`openVensim`/`projectFromJson` mocks are declared in that
body, so at factory time they sit in their temporal dead zone.
The file avoided the crash by having each factory return an arrow that calls
the mock rather than naming it: capturing a binding is not reading it, and
the read is deferred to call time, long after the body has run. That works,
but it is load-bearing indirection that reads as gratuitous, it erases the
mocks' types behind `(...args: unknown[])`, and simplifying it to the obvious
`Project: { open, openVensim }` turns the file into a ReferenceError at module
load. Confirmed by doing exactly that: the suite fails to collect.
Create the shared mocks with rs.hoisted, which is lifted alongside the
rs.mock calls, so the factories can name them directly. Under jest none of
this arose: its CommonJS emit preserved source order, so the consts were
initialized before `require('../NewProject')` ran.
|
@codex review |
|
Automated review I reviewed the TypeScript 7 / Rsbuild 2 / Rstest migration and did not find any actionable bugs. The changes are extensively documented and each subtle behavior change (jsdom PointerEvent breakage of dialog test, Spot checks that came up clean:
Overall correctness verdict: Correct. Review by Claude Opus 4.7. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The Jest-to-Rstest migration (2d5c09a, PR #900) converted every test file that existed on main to import describe/it/expect from @rstest/core, but rename-ops.test.ts was added on this branch after the migration's snapshot, so the rebase left it as the one file still using jest-style globals -- it failed to load under rstest in CI and tripped eslint's no-undef locally. Also drops the stale jest-environment docblock; the tests are pure functions of view data and run in the default node environment like their siblings.
Modernizes the TypeScript toolchain in three commits: TypeScript 7, Rsbuild 2, and Jest -> Rstest. They ship together because they are entangled -- ts-jest cannot run on TypeScript 7, and picking a replacement runner constrains which bundler the repo carries.
No open issue is resolved by this PR, so there is no closing keyword. See "Does not close #635" below.
1.
build: migrate to TypeScript 7TypeScript 7 is the Go-native compiler rewrite. It ships no programmatic compiler API (deferred to 7.1) and no
tsserver, so anything that embeds the compiler -- ts-jest,@rsbuild/plugin-type-check, typescript-eslint -- still needs a TS6-era package.The repo therefore carries two entries per package, which is the layout the TypeScript team recommends for exactly this transition:
"typescript": "npm:@typescript/typescript6@^6.0.2"-- the compat shim. Aliased astypescriptso peer-dependency ranges still see6.0.2; its binary is renamedtsc6to avoid colliding with TS7's."@typescript/native": "npm:typescript@^7.0.2"-- supplies the nativetscthatpnpm tscand the builds actually run.Most of the breaking changes landed in TypeScript 6, not 7. The ones that bit us:
"moduleResolution": "node"/"node10"were removed."bundler"is the closest analogue (extensionless relative imports plusexportssupport), and pairing it with"module": "commonjs"only became legal in TS6."baseUrl"was removed. Without it,pathstargets resolve relative to the config file that declares them (even throughextends), so every target is now./-prefixed. TS7 rejects bare non-relative targets outright (TS5090)."types"now defaults to[]rather than "every installed@typespackage". Each package names the globals-only packages it actually needs.Symbol.disposeused to arrive implicitly via@types/node; the engine now namesesnext.disposable, the lib that owns it.@types/resize-observer-browseris gone --lib.domhas declaredResizeObserversince TS 4.2. A triple-slash/// <reference types="resize-observer-browser" />inCanvas.tsxwas keeping it alive.Emit is unchanged. I diffed all 446 emitted files between TS 5.9 and TS 7: three
.jsfiles differ textually and all three are AST-identical (re-printed and compared). Nineteen.d.tsfiles change howReact.memocomponents are spelled -- a TS6 change -- and the new type is assignable to the old (verified with a standalone assignability probe).Gotcha for reviewers: a stale
.tsbuildinfowritten by TS 5.9 makes TS7 report hundreds of phantom errors. Buildinfo lives at<outDir>/<configName>.tsbuildinfo;src/engine'scleanscript now removes it. TS6-written buildinfo is read correctly by TS7 -- only the 5.9 artifacts are poison. If you see a wall of errors after checking this branch out,rmthe buildinfo.2.
app: upgrade to Rsbuild 2@rsbuild/coreis now pure ESM and requires Node 20.19+/22.12+ (exactly whererequire(esm)became available).Two real behavior fixes fell out of reading the changelog rather than trusting the config:
contexttopathFilter. Neither the old key norlogLevelerrors -- they are ignored -- and an array-form proxy entry with nopathFiltermatches every request. Verified counterfactually against a dead backend: withcontext:,GET /returns 504 (the SPA itself was being proxied); withpathFilter:, SPA routes return 200 HTML and all seven API prefixes return 504.PORTnever worked.startDevServer()has never accepted aportoption (checked against both 1.x and 2.x type definitions). The port now comes fromserver.port, where it belongs.Also
performance.chunkSplit: {strategy: 'all-in-one'}-> top-levelsplitChunks: false. The web-component build keeps itsLimitChunkCountPlugin({maxChunks: 1}), which is a cross-origin embed contract, not a size tweak.3.
test: migrate from Jest to RstestRstest compiles with the same Rspack/swc toolchain the app already bundles with, so the runner shares one dependency tree instead of dragging in a parallel one. (Vitest was the other candidate; it hard-depends on Vite, which would have entrenched a second bundler -- see the
simlin-servefollow-up below.)-260 packages from the lockfile. The only jest-family package left is a transitive
jest-worker.Test counts are unchanged, package for package: core 100, engine 442 + 1 skipped, server 139, app 99, diagram 1500, serve-web 113.
Non-obvious bits, all documented in
docs/dev/typescript.md:@rstest/core. That retires@types/jestand the shared eslint config'sjest: 'readonly'block.Mock<T>'s type argument is the whole function signature, not the return type.@types/jesttypedjest.fn()loosely enough to hide argument mismatches -- serve-web'sws.test.tshad been passing<void, [WsMessage]>all along, and it type-checks now.jest.requireActualis synchronous;rs.importActualis not, and Rstest rejects async mock factories outright. The replacement is theimport ... with { rstest: 'importActual' }attribute, which hoists along with the factory.src/servercannot use it (import attributes need an ES module target, and that program emits CommonJS while type-checking its own tests), sostatic-config.test.tsusesrs.mock('fs', { spy: true }).@jest-environmentdocblock. The 14 diagram tests that opted into a Node environment are now an explicitprojectsentry --project-controller.tsdocuments a "zero React, zero DOM" invariant that an ambient jsdom global would quietly erode. The other 39 docblocks existed only to carry the pragma, so those files' block-comment copyright headers return to the canonical line-comment form.@testing-library/reactself-registersafterEach(cleanup)only whenafterEachis a global, and@testing-library/dom'swaitForonly pumps fake timers when a globaljestobject exists (helpers.jsgates ontypeof jest !== 'undefined', then callsjest.advanceTimersByTime). Both are wired up explicitly in a per-packagetests/setup-testing-library.ts; the timer shim is inert under real timers.Two Jest workarounds are deleted rather than ported:
moduleNameMapperexisted because CommonJS Jest mishandled wouter's ESM-onlyexports. Rspack resolves it natively, which also retires therequire.resolve()dance that guarded app: jest.config.js hardcodes a pnpm virtual-store hash for wouter; breaks on every React bump #523.output.cssModules.localIdentName: '[local]', so tests that query.eqnEditorstill match -- against real CSS now.One behavior change worth a close look
jsdom goes 26 -> 29, which implements
PointerEvent.dialog.test.tsxasserted that a barepointerdowndismisses a Radix dialog. That was only true because@testing-library/domfell back to a plainEventwhosebuttonwasundefined; given a realPointerEvent(button: 0), Radix waits for the matchingclick, as browsers do. The test now fires the full pointerdown/pointerup/click sequence, which is what a real pointer produces. The test was passing for the wrong reason.Discovered along the way
isolatedModules: trueintsconfig.base.jsonmade ts-jest transpile-only for every package, so this migration loses nothing, but the hole is now explicit: 55 latent type errors, includingsrc/diagram/tests/editor-applyPatch.test.tsimporting from../json-types, a module that does not exist. The issue carries a workingtsconfig.tests.jsonand the full error list. (It also subsumes tech-debt entry 57, whose "fix" left the real bug in place -- because nothing type-checks it.)server: @simlin/server Jest suite intermittently fails one test under parallel pre-commit load). The Jest suite named in that issue is gone, but its failing test was never identified and the likely root causes (shared fixture state, tight timeouts under contention) are runner-agnostic. It should be retitled rather than closed.createConfig's index arithmetic (configs[configs.length - (options.react ? 3 : 2)]) necessary, so defect (c) is gone --options.projectis now assigned through a directbaseConfigreference. Defects (a) (module-level object shared across calls) and (b) (mutating the caller'signorePatternsarray) are untouched, so build: shared eslint config mutates module-level objects #895 stays open.src/app/scripts/test.jswas an orphaned create-react-app launcher thatrequired jest and that nothing invoked. Deleted.simlin-serve/weboff Vite onto Rsbuild, so the repo carries one bundler.Verification
pnpm test: 2393 passed, 1 skipped, exit 0 -- matching Jest package for package.pnpm tsc,pnpm lint,scripts/lint-project.sh,check-copyright.py: clean.