fix(journal): drop the retired @simplewebauthn/types package #15
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!15
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/simplewebauthn-types-deprecation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Flagged by Renovate's dependency dashboard (#12) as deprecated with no automatic replacement available, so it needed doing by hand.
The migration
SimpleWebAuthn retired the standalone types package in v13.0.0. The release notes say to "refactor existing imports from /types [and] simply import them from /browser or /server instead".
There was exactly one usage, and it is server-side, so
apps/journal/app/lib/auth.server.tsnow takesRegistrationResponseJSON,AuthenticationResponseJSONandAuthenticatorTransportFuturefrom@simplewebauthn/server. That package owns those types now and no longer depends on@simplewebauthn/typesat all, so the dependency is removed outright rather than replaced.A latent mismatch this also clears
The versions had already drifted a major:
browserandserverwere on 13.x while the types package sat at12.0.0. So the types being compiled against were a major behind the runtime implementing them.Harmless in this specific case — I diffed all three definitions between 12.0.0 and 13.3.2 before touching anything and they are byte-identical — but it is precisely the mismatch that the
@types/*major-ignore rule in the dependency config exists to prevent ("a mismatched type package breaks typecheck without buying anything"), and it would not have stayed harmless indefinitely.Verification
pnpm --filter @trails-cool/journal typecheck— clean (this is the meaningful check: if@simplewebauthn/serverdid not re-export these, it would fail here)pnpm --filter @trails-cool/journal lint— cleanpnpm --filter @trails-cool/journal test— 367 passed, 79 skipped@simplewebauthn/typesanywhere in the repo or lockfile