Repository navigation
feat: add plugins exports - #4076
Conversation
|
|
🦋 Changeset detectedLatest commit: 98ce35e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
ℹ️ Minor suggestion — the
nameBuildertype change in@hey-api/schemasisn't captured in the changesets.
Reviewed changes — adds a /plugins subpath export to both @hey-api/openapi-ts and @hey-api/openapi-python, backed by a new pluginHelper() factory in @hey-api/shared that produces type-safe plugin config builder functions. Internal dev presets are migrated to use the new helpers.
- Add
pluginHelper()in@hey-api/shared— a generic factory that returns a curried plugin config builder, strippingnamefrom the user-facing parameter and narrowing it to the specific plugin name literal in the return type. - Add
/pluginssubpath exports — newpackage.jsonexportsentries ("./plugins") and tsdown entry points for bothopenapi-tsandopenapi-python, each exposing aplugins.tsbarrel that exports one helper per registered plugin. - Migrate dev presets to plugins helpers —
dev/typescript/presets.tsanddev/python/presets.tsswitch from raw plugin name strings/config objects toplugins.myPlugin({ ... })calls. - Clean up
@hey-api/schemastypes — drops the@hey-api/spec-typesimport and widensnameBuilder'sschemacallback parameter from a union of specific OpenAPI types tounknown.
ℹ️ nameBuilder callback type narrowed to unknown without changelog entry
The @hey-api/schemas plugin's nameBuilder callback parameter schema changed from OpenAPIV2.SchemaObject | OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject to unknown. This is a backward-incompatible type change for callers that access schema properties inside their nameBuilder callback.
The three changesets cover the plugin exports feature but don't mention this type change. Consider adding a short note to one of the @hey-api/openapi-ts patch changesets.
Technical details
# nameBuilder schema type widened to unknown
## Affected sites
- `packages/openapi-ts/src/plugins/@hey-api/schemas/types.ts:13` — `schema` parameter changed from OpenAPI union to `unknown`
## Required outcome
- Add a changeset note documenting the `nameBuilder` schema type change so consumers are aware.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4076 +/- ##
==========================================
+ Coverage 38.70% 38.78% +0.07%
==========================================
Files 626 627 +1
Lines 21870 21897 +27
Branches 6408 6422 +14
==========================================
+ Hits 8465 8492 +27
Misses 10921 10921
Partials 2484 2484
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
@hey-api/codegen-core
@hey-api/json-schema-ref-parser
@hey-api/nuxt
@hey-api/openapi-ts
@hey-api/shared
@hey-api/spec-types
@hey-api/types
@hey-api/vite-plugin
commit: |

No description provided.