Skip to content

Move to TypeScript 6 and hold TypeScript 7 until Next.js supports it - #97

Merged
guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
GuanzhouSong:chore/typescript-6
Jul 30, 2026
Merged

Move to TypeScript 6 and hold TypeScript 7 until Next.js supports it#97
guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
GuanzhouSong:chore/typescript-6

Conversation

@GuanzhouSong

Copy link
Copy Markdown
Contributor

Supersedes #95.

Why not TypeScript 7

Dependabot proposed TypeScript 7.0.2 in #95, which cannot build. TS 7 is the native port, and its compiler API is not the one Next.js links against:

Running TypeScript ...
TypeScript 7.0.2 does not provide the compiler API required by Next.js.
Enable experimental.useTypeScriptCli in your Next.js config to use the
TypeScript CLI, or install TypeScript 6 instead.
Next.js build worker exited with code: 1

This is not a problem with our code — TS 7 simply is not adoptable under Next.js 16 without opting into experimental.useTypeScriptCli.

What this does

  1. Takes TypeScript 6, the upgrade Next.js does support, rather than sitting on 5.9.3.
  2. Adds a versions: [7.x] ignore so Dependabot stops reopening the same unmergeable PR every Monday. The ignore is scoped to the 7.x line only — 6.x updates still flow normally, and the entry can be deleted once Next.js supports the native port.
  3. Drops @types/js-yaml, redundant since js-yaml 5 landed in npm(deps): bump js-yaml from 4.3.0 to 5.2.2 #93. v5 ships its own declarations through its types export condition; the DefinitelyTyped package describes the v4 API and nothing uses it now.

Testing

Generated and verified on a GitHub runner, not locally — this machine sits behind a corporate registry proxy that cannot reach registry.npmjs.org, so a locally produced lockfile would carry internal feed URLs that CI and outside contributors cannot fetch.

Check Result
npm install pass
npm run lint pass
npm run build:next pass
Resolved URLs on registry.npmjs.org 706 / 706

Worth noting the lint run was explicit: upstream CI does not run npm run lint, so the green checks on this PR alone would not prove the compiler change is clean. Adding a lint step to continuous-integration.yml would close that gap — happy to do it separately.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWCBtvyCpxc2aqtyLDhDeE

Dependabot proposed TypeScript 7.0.2 (documentdb#95), which cannot build. TS 7 is
the native port, and its compiler API is not the one Next.js links
against, so `next build` fails outright:

  TypeScript 7.0.2 does not provide the compiler API required by Next.js.
  Enable experimental.useTypeScriptCli in your Next.js config to use the
  TypeScript CLI, or install TypeScript 6 instead.

TypeScript 6 is supported, so this takes the upgrade Next.js actually
offers rather than sitting on 5.9.3. A `versions: [7.x]` ignore entry
holds TypeScript at 6 until Next.js supports the native port, so the
same unmergeable PR is not reopened every week. The ignore is scoped to
the 7.x line only, so 6.x updates still flow normally.

Also drops @types/js-yaml, which became redundant when js-yaml 5 landed
in documentdb#93. Version 5 ships its own type declarations via its `types` export
condition; the DefinitelyTyped package described the v4 API and is no
longer used by anything.

Generated and verified on GitHub infrastructure rather than locally: the
maintainer's machine sits behind a corporate registry proxy that cannot
reach registry.npmjs.org, so a locally produced lockfile would carry
internal feed URLs unusable by CI and outside contributors. All 706
resolved URLs point at registry.npmjs.org.

Verified with `npm install`, `npm run lint`, and `npm run build:next`,
all passing on TypeScript 6.0.3. Note that upstream CI does not run
lint, so the lint check was run explicitly during generation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWCBtvyCpxc2aqtyLDhDeE
@guanzhousongmicrosoft
guanzhousongmicrosoft merged commit 8acfddc into documentdb:main Jul 30, 2026
2 checks passed
@GuanzhouSong
GuanzhouSong deleted the chore/typescript-6 branch July 30, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants