Skip to content

chore: update opapi deps#692

Open
sea-grass wants to merge 1 commit into
masterfrom
cg-update-openapi-typescript
Open

chore: update opapi deps#692
sea-grass wants to merge 1 commit into
masterfrom
cg-update-openapi-typescript

Conversation

@sea-grass

Copy link
Copy Markdown
Contributor

This dependency update PR replaces tsup with tsdown and updates openapi-typescript. The opapi version is bumped a patch to 1.0.1.

The tsdown upgrade catches and fixes some issues with exported types.

The openapi-typescript upgrade comes with some improvements to generator types to make them both more accurate and lax.

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates opapi's build and OpenAPI type-generation stack. The main changes are:

  • Bumps @bpinternal/opapi to 1.0.1.
  • Replaces tsup with tsdown for package builds.
  • Upgrades openapi-typescript to v7.
  • Updates the OpenAPI TypeScript generator to use AST output.
  • Adjusts generated helper types for operation and handler inference.

Confidence Score: 4/5

The package build path needs fixes before merging.

  • The new build command no longer spells out the published output files.
  • The new build toolchain can fail on Node versions that the package does not currently reject.
  • The generator and helper-type changes look aligned with the updated OpenAPI generator path.

opapi/package.json

Important Files Changed

Filename Overview
opapi/package.json Updates the package version, build command, and key build/type-generation dependencies; the new build command and Node requirement need follow-up.
opapi/pnpm-lock.yaml Refreshes the dependency graph for tsdown and openapi-typescript v7, including new native build-tool packages.
opapi/src/generators/openapi-typescript.ts Migrates OpenAPI type generation to the async AST-based openapi-typescript v7 API.
opapi/src/generators/types.ts Relaxes generated operation/helper types and filters path-level non-handler keys.
opapi/src/opapi.ts Converts several imports and exports to type-only form for cleaner emitted output.

Reviews (1): Last reviewed commit: "chore: update opapi deps" | Re-trigger Greptile

Comment thread opapi/package.json
"scripts": {
"test": "vitest run",
"build": "tsup src/index.ts --dts --format cjs,esm --clean",
"build": "tsdown",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Build Output Contract Can Drift

The old command explicitly built src/index.ts with CJS, ESM, declarations, and a clean output, but bare tsdown now relies on default discovery. If tsdown does not emit the same dist/index.js, dist/index.mjs, and dist/index.d.ts files referenced by this package, the release can build with missing or renamed artifacts and consumers will fail to resolve the package.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread opapi/package.json
"prettier": "3.4.1",
"ts-node": "10.9.2",
"tsup": "8.3.5",
"tsdown": "0.22.4",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Build Tool Requires Newer Node

The new tsdown toolchain pulls in rolldown native bindings with a Node floor of ^20.19.0 || >=22.12.0, but the package does not declare that runtime requirement. CI or local builds on older supported Node versions can install dependencies and then fail when pnpm build runs.

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