Spike: adopt the Dependabot bumps (blocked on typescript-eslint TS 7 support) - #236
Draft
EllAchE wants to merge 2 commits into
Draft
Spike: adopt the Dependabot bumps (blocked on typescript-eslint TS 7 support)#236EllAchE wants to merge 2 commits into
EllAchE wants to merge 2 commits into
Conversation
Not for merge. Main was unblocked instead by #196, which restored the five dependency ranges to the versions bun.lock already pinned. This branch took the other route — regenerate the lockfile and adopt the bumps — and is kept only because the zod 4 work in it is reusable whenever the repo does move. What is here: - `app/api/v1/_lib/openapi.ts` ported from zod 3's `_def.typeName` to zod 4's `_zod.def.type`, including the pipe direction: `.transform()` pipes the declared schema into a coercion, `z.preprocess()` pipes a coercion into the declared schema, so the side that is not the `transform` is the one to read. Reading `in` unconditionally documented the `limit`/`offset` query params as an untyped `{}`; `openapi.test.ts:80` pins exactly that. - `z.record` arity, `errorMap` -> `error`, and `z.partialRecord` for the enum-keyed notification categories, which is a silent runtime change in zod 4 rather than only a type error. What blocks it: `typescript@^7.0.2` is not adoptable. typescript-eslint throws at require time on TS >= 7 (no released version supports it, tracking issue typescript-eslint#10940), so `bun run lint` cannot run at all. Microsoft's documented workaround aliases `typescript` to the `@typescript/typescript6` compat package, but that package depends on `@typescript/old` -> `npm:typescript@^6`, and Bun dedupes that inner alias onto the root's own `typescript` alias, so the compat shim ends up requiring itself and exports nothing. Reviving this branch means waiting for typescript-eslint TS 7 support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft, not for merge. This is the road not taken:
mainwas unblocked by #196, which restored the five dependency ranges to the versionsbun.lockalready pinned. This branch took the other route — regenerate the lockfile and adopt the bumps — and is parked because one of the five is not adoptable yet.Kept because the zod 4 work is reusable whenever the repo does move, and because the blocker is worth recording rather than rediscovering.
What is here
app/api/v1/_lib/openapi.tsported from zod 3's_def.typeNameto zod 4's_zod.def.type. The subtle part is pipe direction:.transform()pipes the declared schema into a coercion,z.preprocess()pipes a coercion into the declared schema. The side that is not thetransformis the one describing what a caller sends. Readinginunconditionally documented thelimit/offsetquery params as an untyped{}— a silent 36-line hole in the published spec.openapi.test.ts:80pins exactly that case.lib/services/notification-preferences.ts— enum-keyedz.recordneedsz.partialRecordin zod 4. This is a runtime behaviour change, not just a type error: without it the schema demands every notification category be present.z.recordarity fixes inapp/api/v1/_lib/schemas.ts,errorMaptoerrorinlib/services/sponsors.ts, a narrowing helper inlib/mcp/server.ts, anddeclare module '*.css'intypes/static-assets.d.tsfor TS 7's side-effect import checking.Generated contracts (
docs/openapi.json,docs/mcp-tools.json) regenerate byte-identical under the ported walker.What blocks it
typescript@^7.0.2cannot be adopted on Bun today.node_modules/typescript-eslint/dist/index.js:45). No released version supports it — 8.67.0 is latest, tracking issue typescript-eslint#10940.bun run lintcannot run at all, so adopting TS 7 means losing the lint gate entirely.typescriptto the@typescript/typescript6compat package. That package is a shim —module.exports = require("@typescript/old")— where@typescript/oldis itselfnpm:typescript@^6. Bun dedupes that inner alias onto the root's owntypescriptalias, so the shim requires itself and exports nothing (require('typescript').versionMajorMinorisundefined). Anoverridesentry pinning@typescript/olddoes not break the cycle.Reviving this branch means waiting for typescript-eslint TS 7 support. The other four bumps (zod 4,
@types/node26,eslint-config-next16.3.1,@anthropic-ai/sdk0.117.1) are adoptable on their own if someone wants to split them out.Test plan
Against the full bump set, before the TS 7 blocker was hit:
bun run typecheckbun run docs:openapi+bun run docs:mcp— byte-identical outputbun run lint— cannot run, see abovebun run test/bun run build— not run; branch is 20+ commits behindmain🤖 Generated with Claude Code