Skip to content

Support TypeScript 6.0.x and hey-api/openapi-ts 0.99.x#196

Open
TakehiroTada wants to merge 6 commits into
7nohe:mainfrom
TakehiroTada:feature/support-hey-api-0.99.x-ts-6.0
Open

Support TypeScript 6.0.x and hey-api/openapi-ts 0.99.x#196
TakehiroTada wants to merge 6 commits into
7nohe:mainfrom
TakehiroTada:feature/support-hey-api-0.99.x-ts-6.0

Conversation

@TakehiroTada

@TakehiroTada TakehiroTada commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades the core dependencies to the latest versions, on top of v2.1.0 (#192).

Package Before After
typescript 5.9.3 6.0.3
ts-morph 27.x 28.x
@hey-api/openapi-ts 0.92.3 0.99.0

Key Changes

  • @hey-api/openapi-ts 0.99.0
    • Plugins config API and generated output are compatible with 0.92.3 — zero snapshot changes
    • Migrated the deprecated @hey-api/sdk option operationId: false to operations: { nesting: "id" } (identical behavior)
  • TypeScript 6.0 / ts-morph 28
    • Removed downlevelIteration and baseUrl from tsconfig — deprecated in TS 6.0 (TS5101) and both unused here
    • No SyntaxKind value shifts between 5.9 and 6.0, so no AST-traversal changes needed
    • peerDependencies: typescript: "5.x || 6.x", ts-morph: "28.x"
  • skipLibCheck: false support
    • Recreated the pnpm patch for @hey-api/openapi-ts@0.99.0 (TS2416 now in two places)
    • Added a pnpm patch for @hey-api/shared@0.5.0 (TS2749 — the value log referenced as a type)
    • Added a typed ky module stub to vendor-typestubs.d.ts (extends RequestInit, no any)
  • Node.js
    • engines: >=22.18.0 (required by hey-api 0.96+)
    • Test workflow and contributing guide now use Node.js 24, aligning with the release workflow
  • Docs
    • Contributing guide: new section on the type-patch workflow (patches/ + vendor-typestubs.d.ts)

Test Plan

  • pnpm build (skipLibCheck: false) / pnpm biome check . / pnpm install --frozen-lockfile
  • pnpm test — all 70 tests pass with zero snapshot changes (branch coverage 92.55%)
  • Codegen re-run for all 5 example apps — zero output diff, test:generated (tsc) passes

TakehiroTada and others added 6 commits July 3, 2026 08:48
…morph to 28

- Recreate the pnpm patch for @hey-api/openapi-ts@0.99.0: the TS2416 on
  ImplFuncTsDsl.toAst() persists and a second one appeared on
  ImplForTsDsl.toAst()
- Add a pnpm patch for @hey-api/shared@0.5.0, which references the value
  'log' as a type (TS2749) — both patches keep skipLibCheck: false working
- Add a 'ky' module stub to vendor-typestubs.d.ts for the bundled ky client
  plugin type declarations
- Drop downlevelIteration and baseUrl from tsconfig.json (deprecated in
  TypeScript 6.0, both unused here)
- Allow typescript 5.x || 6.x and require ts-morph 28.x as peer dependencies

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
….nesting

@hey-api/openapi-ts 0.99 deprecates the sdk plugin's boolean operationId
option. operationId: false maps internally to operations: { nesting: 'id' },
so pass the new option directly to silence the deprecation warning while
keeping --noOperationId behavior identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
@hey-api/openapi-ts raised its minimum Node.js version to 22.18.0 in 0.96+,
so bump the CI matrix and the contributing guide accordingly (package.json
engines is updated in the dependency upgrade commit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
Align the test matrix and the contributing guide with the release workflow,
which already runs on Node.js 24. package.json engines stay at >=22.18.0 —
the actual minimum required by @hey-api/openapi-ts 0.99.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
Extend RequestInit (which provides the members @hey-api/openapi-ts picks
from ky's Options) and model KyInstance as a minimal callable interface,
replacing the previous any-based stub. The unknown index signature keeps
unreferenced ky options open without weakening type checking.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
…ng guide

Contributors upgrading @hey-api/openapi-ts need to know why patches/ and
src/vendor-typestubs.d.ts exist and how to recreate the pnpm patches, now
that the 0.99.0 upgrade added a second patched package (@hey-api/shared).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dPzdeZL1kurBr7De3rYKN
@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

@TakehiroTada is attempting to deploy a commit to the Daiki Urata's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant