Skip to content

Feat/update 2 latest - #353

Open
el-j wants to merge 8 commits into
fabien0102:mainfrom
el-j:feat/update-2-latest
Open

el-j wants to merge 8 commits into
fabien0102:mainfrom
el-j:feat/update-2-latest

Conversation

@el-j

@el-j el-j commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

OpenAPI Codegen: Tooling and compatibility update

Summary

This PR modernizes the project for the current JavaScript/TypeScript ecosystem and fixes compatibility issues introduced by newer package versions, stricter TypeScript checks, and the current Node runtime.

The goal was to keep the generator stable while updating the repo to a cleaner, faster, and more current toolchain without rewriting the generator architecture itself.

Related

This PR effectively incorporates and resolves the issues covered by:

These are part of the same maintenance and compatibility cleanup wave and are redundant once this branch is merged.

What changed

Tooling and linting

  • Switched the repository from ESLint to real oxlint
  • Removed the legacy ESLint configuration and aligned the repo around the faster, cleaner oxlint workflow
  • Modernized the workspace configuration to work with current pnpm lifecycle behavior and native dependency build approval
  • Kept the project aligned with the current supported toolchain without broad rewrite work

Dependency cleanup

  • Removed the deprecated got-fetch dependency and kept the codebase on the supported got package already in use by the CLI
  • Removed obsolete @types/* packages that are now redundant because the actual dependencies ship their own TypeScript declarations
  • Cleaned up stale dependency metadata and lockfile drift caused by modern package resolution
  • Updated the project to TypeScript 6.0.2 and aligned the package config for the new compiler requirements

TypeScript compatibility

  • Removed deprecated TypeScript config options that are no longer valid in current compiler versions
  • Added explicit rootDir values where required by TypeScript's stricter output-layout checks
  • Updated the plugin TypeScript config to modern Node16-style resolution and added the correct ES libs for the APIs used in the generator
  • Fixed strict typing issues raised by modern prompt APIs and runtime values
  • Resolved the issues surfaced by the stricter TypeScript checks introduced by the updated stack

React Query migration

  • Updated generated React Query code to match TanStack Query v5
  • Removed reliance on the old Enabled helper that no longer exists in the current package API
  • Switched generated usage to the supported enabled flag pattern based on UseQueryOptions["enabled"]
  • Updated the example frontend to use the same API pattern
  • Documented the migration in the package changelog and README so downstream users are aware of the breaking change

Testing and runtime compatibility

  • Added a small compatibility shim for the current Node runtime so the test environment works correctly with the current got / nock stack
  • Verified the project remains green under the current workflow and dependency stack
  • Confirmed the generated code and CLI still pass the package build, the typecheck, and the full test suite

Breaking changes

TanStack React Query v5 migration

This update includes a breaking change for generated React Query output.

TanStack React Query v5 removed the old Enabled helper. Generated code should now use the supported enabled option pattern instead of the removed helper.

This change is intentional and is reflected in the generated template, example app, and package migration documentation.

TypeScript configuration modernization

Projects consuming the generator should expect the TypeScript config to follow modern compiler expectations. Older config patterns like deprecated module resolution values and missing rootDir configuration are no longer appropriate under the current TypeScript toolchain.

Auto-close on merge

Fixes #354
Fixes #348

Validation

The following checks were run successfully:

  • pnpm test -- --run
  • pnpm check:types
  • pnpm build

Why this is important

The repo had fallen behind the current package ecosystem in several places:

  • TypeScript config had legacy values that were no longer accepted
  • the linting pipeline still depended on ESLint instead of the project’s chosen oxlint setup
  • deprecated dependencies remained in the dependency tree
  • generated React Query code was still built against an older TanStack API
  • runtime and test compatibility issues appeared under the current Node version and package stack

This change brings the project back into alignment with modern tooling while preserving the generator’s core behavior and making migration expectations clear for downstream users.

el-j added 8 commits October 7, 2026 14:55
- Added allowBuilds for '@swc/core' and 'esbuild' in pnpm-workspace.yaml
- Excluded minimum release age for nock@15.0.1
- Changed moduleResolution from 'Node' to 'Bundler' in tsconfig.json
…sistency

- Updated type definitions in `githubContext.ts`, `githubFetcher.ts`, `githubParameters.ts`, and `githubSchemas.ts` to use single-line union types for better clarity.
- Simplified the `RemoveIndex` type utility in `schemaToTypeAliasDeclaration.ts`.
- Made minor formatting adjustments in `README.md` for consistency.
- Updated `pnpm-workspace.yaml` to use consistent quotation marks.

run check and fix
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.

update dependencies & removed unused deprecated Error when migrating to typesrcipt v7

1 participant