Skip to content

refactor: rename tilde api with dollar - #4086

Merged
mrlubos merged 1 commit into
mainfrom
refactor/tilde-to-dollar
Jun 18, 2026
Merged

mrlubos merged 1 commit into
mainfrom
refactor/tilde-to-dollar

Conversation

@mrlubos

@mrlubos mrlubos commented Jun 18, 2026

Copy link
Copy Markdown
Member

No description provided.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot

changeset-bot Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d5ca286

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hey-api/openapi-ts Patch
@hey-api/shared Patch
@hey-api/openapi-python Patch

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

@vercel

vercel Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 18, 2026 5:31am

Request Review

@mrlubos
mrlubos marked this pull request as ready for review June 18, 2026 05:22
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. internal ⚙️ Internal development work. labels Jun 18, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@hey-api/codegen-core

npm i https://pkg.pr.new/@hey-api/codegen-core@4086

@hey-api/json-schema-ref-parser

npm i https://pkg.pr.new/@hey-api/json-schema-ref-parser@4086

@hey-api/nuxt

npm i https://pkg.pr.new/@hey-api/nuxt@4086

@hey-api/openapi-ts

npm i https://pkg.pr.new/@hey-api/openapi-ts@4086

@hey-api/shared

npm i https://pkg.pr.new/@hey-api/shared@4086

@hey-api/spec-types

npm i https://pkg.pr.new/@hey-api/spec-types@4086

@hey-api/types

npm i https://pkg.pr.new/@hey-api/types@4086

@hey-api/vite-plugin

npm i https://pkg.pr.new/@hey-api/vite-plugin@4086

commit: d5ca286

@pullfrog pullfrog 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.

Reviewed changes — renames ~hooks to $hooks and ~resolvers to $resolvers across plugin config types, runtime code, and documentation, with @deprecated annotations on the old keys for backward compatibility.

  • Add $hooks and $resolvers to PluginBaseConfig and Plugin.Resolvers types — new fields in packages/shared/src/plugins/types.ts with @deprecated on ~hooks and ~resolvers
  • Update all resolver access sites — every toAst function and validator resolver across typescript, zod (mini/v3/v4), valibot, and pydantic now checks $resolvers first, falling back to ~resolvers
  • Update PluginInstance hook reading — buildEventHooks, getHooks, and isOperationKind in packages/shared/src/plugins/shared/utils/instance.ts try $hooks first
  • Update plugin export types — Required<...>['$resolvers'] in index.ts for both openapi-ts and openapi-python
  • Update documentation — parser, resolvers, custom plugin, and SDK docs reference $hooks/$resolvers
  • Add changesets — patch for @hey-api/openapi-ts and @hey-api/shared

ℹ️ Nitpicks

  • packages/shared/src/plugins/shared/utils/__tests__/instance.test.ts still uses '~hooks' in test config — worth migrating to $hooks (and/or adding coverage for the $hooks path) in a follow-up.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

</TabItem>
</Tabs>

## Parameters

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.

This new ## Parameters section (~70 lines documenting paramsStructure) is unrelated to the ~ → $ rename. Consider moving it to a separate PR to keep this diff focused on the rename.

@codecov

codecov Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.51064% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.79%. Comparing base (f519dc8) to head (d5ca286).

Files with missing lines Patch % Lines
...ckages/shared/src/plugins/shared/utils/instance.ts 0.00% 0 Missing and 3 partials ⚠️
...rc/plugins/@hey-api/typescript/v1/toAst/boolean.ts 0.00% 0 Missing and 2 partials ⚠️
...ugins/@hey-api/typescript/v1/toAst/intersection.ts 0.00% 0 Missing and 2 partials ⚠️
...s/src/plugins/@hey-api/typescript/v1/toAst/null.ts 0.00% 0 Missing and 2 partials ⚠️
...src/plugins/@hey-api/typescript/v1/toAst/number.ts 0.00% 0 Missing and 2 partials ⚠️
.../src/plugins/@hey-api/typescript/v1/toAst/tuple.ts 0.00% 0 Missing and 2 partials ⚠️
.../plugins/@hey-api/typescript/v1/toAst/undefined.ts 0.00% 0 Missing and 2 partials ⚠️
.../src/plugins/@hey-api/typescript/v1/toAst/union.ts 0.00% 0 Missing and 2 partials ⚠️
...rc/plugins/@hey-api/typescript/v1/toAst/unknown.ts 0.00% 0 Missing and 2 partials ⚠️
...s/src/plugins/@hey-api/typescript/v1/toAst/void.ts 0.00% 0 Missing and 2 partials ⚠️
... and 61 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4086   +/-   ##
=======================================
  Coverage   38.79%   38.79%           
=======================================
  Files         630      630           
  Lines       21907    21896   -11     
  Branches     6415     6495   +80     
=======================================
- Hits         8499     8495    -4     
+ Misses      10927    10844   -83     
- Partials     2481     2557   +76     
Flag Coverage Δ
unittests 38.79% <8.51%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrlubos
mrlubos force-pushed the refactor/tilde-to-dollar branch from 0096ae5 to d5ca286 Compare June 18, 2026 05:29
@mrlubos
mrlubos merged commit 7c9463f into main Jun 18, 2026
11 of 12 checks passed
@mrlubos
mrlubos deleted the refactor/tilde-to-dollar branch June 18, 2026 05:33
@hey-api hey-api Bot mentioned this pull request Jun 18, 2026

This branch was successfully deployed

1 active deployment
Preview — d5ca2867 Deployed Jun 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal ⚙️ Internal development work. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant