Skip to content

typescript-axios: support TypeScript 6 - #25148

Merged
wing328 merged 10 commits into
OpenAPITools:masterfrom
Felix-ming:typescript-6-typescript-axios
Oct 7, 2026
Merged

wing328 merged 10 commits into
OpenAPITools:masterfrom
Felix-ming:typescript-6-typescript-axios

Conversation

@Felix-ming

@Felix-ming Felix-ming commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Include TypeScript 6 in the generated typescript-axios development dependency range.
  • Add a regression test for the generated package.json.

Closes #24830.

Validation

  • git diff --check passed.
  • Regenerated both CI-targeted TypeScript Axios samples locally with JDK 21 using ./bin/generate-samples.sh ./bin/configs/typescript-axios-echo-api.yaml ./bin/configs/typescript-axios-es6-target.yaml; both generators succeeded.
  • The targeted Maven regression test passed locally: ./mvnw -pl modules/openapi-generator -am -Dtest=TypeScriptAxiosClientCodegenTest -Dsurefire.failIfNoSpecifiedTests=false test (15 tests, 0 failures). The latest PR workflow runs are awaiting maintainer approval.
  • The issue reporter confirms their generated client compiles with TypeScript 6.

Prepared with AI assistance.


Summary by cubic

Makes the typescript-axios generated clients work with TypeScript 6. Closes #24830.

  • Expands the generated devDependency range to ^4.0 || ^5.0 || ^6.0.
  • Removes the deprecated moduleResolution: node setting from generated ES6 tsconfig files so TypeScript 6 can use its compiler default.
  • Adds a regression test asserting the new dependency range and the omitted tsconfig setting, and regenerates the affected samples.

Written for commit 5aa3707. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.

Re-trigger cubic

Remove the explicit node10 moduleResolution override from generated ES6 tsconfig files. TypeScript 6 deprecates that setting; omitting it preserves the compiler default while keeping generated clients compatible.
Generate an ES6 client in the TypeScript 6 compatibility regression test and assert its tsconfig does not specify the deprecated node10 resolution option.
@wing328

wing328 commented Oct 6, 2026

Copy link
Copy Markdown
Member

thanks for the PR

cc @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10) @KannaKim (2026/07)

@wing328

wing328 commented Oct 7, 2026

Copy link
Copy Markdown
Member

Update with-complex-headers generated package.json to match the TypeScript Axios template range.
Update the with-npm-version-and-separate-models-and-api generated sample.
Update the with-npm-version generated sample to match the current TypeScript range.
@Felix-ming

Felix-ming commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Updated the three generated TypeScript Axios samples flagged by the Samples up-to-date check (with-complex-headers, with-npm-version-and-separate-models-and-api, and with-npm-version) to include ^6.0 in their TypeScript devDependency ranges. The changes match the expected generated output. Thanks!

@wing328
wing328 merged commit e5e9ca8 into OpenAPITools:master Oct 7, 2026
39 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQ][typescript-axios] Add TypeScript 6 to generated package.json peer range

2 participants