Codebase cleanup: dependency updates, CI hardening, and lint/type fixes#2625
Codebase cleanup: dependency updates, CI hardening, and lint/type fixes#2625hazre wants to merge 20 commits intocinnyapp:devfrom
Conversation
Centralize Matrix SDK imports behind a local compatibility module, migrate matrix subpath imports to the boundary, and switch to the $types alias. Upgrade TypeScript to latest so matrix-js-sdk typings resolve correctly before the next cleanup phase.
Adopt matrix event-map augmentation and Element-style typed boundaries for account data, and build message edit content with explicit replacement event types. Also make read receipt and fully_read marker sends independent with explicit failure handling.
There was a problem hiding this comment.
I'm not familiar with the codebase, but 346a32c doesn't make sense to me. AccountDataEditor takes a generic T extends string but seems like it should accept an AccountEventDataType (or Extract<keyof AccountDataEvents, string>? It doesn't seem like AccountEventDataType is used consistently). And FWIW I'd avoid using generics here, the union should cover all cases.
I'd recommend minimizing the type changes in this PR (leave everything as string for now and assert/cast with a TODO) and doing those in a separate PR to make the rest easier to merge.
|
Preview: https://2625--pr-cinny.netlify.app |
|
Mass dependency updates are recipe for disaster. You won't know what broke which part. |
I did test it locally and it seems to work but obviously without tests it's hard to account for every possible case. |
Yeah originally I did just cast it explicitly but I thought that's jank and could cause issues down the line, so what's I turned it into a generic but I suppose I can do that. |
|
I checked the preview, and fonts and emojiboard seems to broke. Additionally, IMHO these changes add no feature and if we merge these, all the PR's are going to have unnecessary merge conflicts. |
My first and foremost intention was fixing the type errors and that involves changing the imports, so I think I will cause conflicts to degree either way. I can revert 795b8be but keep the rest. So it would mostly a tooling change and refactor. And very unlikely to break anything. |
Revert the generic account-data typing introduced in 346a32c to keep these developer tools string-based for now. Add explicit temporary casts/TODOs where the Matrix event map currently requires narrower types so stricter typing can return in a follow-up PR.
This reverts commit bfd792e.
This partially reverts 67aa895 by keeping the major tooling/infra upgrades, but rolling most runtime dependency bumps back to safer/minor ranges with targeted compatibility fixes.
Upgrade i18next to v25 so react-i18next v16 can import keyFromSelector during Vite dependency optimization. This resolves the build failure introduced by the i18next downgrade.
Move @vanilla-extract/vite-plugin back from devDependencies to dependencies and pin it to the v3 line to avoid a major dependency jump.
Use a caret range for html-dom-parser v5 and pin @types/node to 24.10.13 to align with the current Node 24 toolchain expectation.
|
I reverted some stuff and now it's major tooling upgrades + mostly minor runtime updates. These are the major changes, everything else is a minor update, so it should be safe. (added this to the PR body too) Major Upgrades
Added
Removed
|
Description
I was really annoyed with all the type errors in the codebase, so I started fixing them but then I kept going and cleanup rest of the codebase as well. I know this is a bit much but I thought I might as well.
These are the major changes, everything else is a minor update, so it should be safe.
Major Upgrades
Added
Removed
Also if any of the changes are too much, I can remove it. (like import aliases)
Type of change
Checklist: