Skip to content

Conversation

@brolnickij
Copy link
Contributor

Description

Now for the @pinia/colada plugin together with client-nuxt, the default transport is always $fetch, because using @pinia/colada in a nuxt.js environment means a more advanced replacement for nuxt composables (useAsyncData / useFetch and etc)

For all other transport layers of @pinia/colada (when used outside a nuxt.js environment), the plugin stays transport‑independent and can be used with any client as before without changes

The client-nuxt transport now uses $fetch by default, but it does not break the public API, so there are no breaking changes at all (I added a small tip to the docs that composable now defaults to $fetch)

Close #2595

@bolt-new-by-stackblitz
Copy link

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

@changeset-bot
Copy link

changeset-bot bot commented Sep 4, 2025

🦋 Changeset detected

Latest commit: 771d244

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

This PR includes changesets to release 1 package
Name Type
@hey-api/openapi-ts 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
Copy link

vercel bot commented Sep 4, 2025

@brolnickij is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. client Client package related feature 🚀 New feature or request labels Sep 4, 2025
@brolnickij brolnickij changed the title feat(pinia-colada): implicit $fetch for nuxt (hide composable) feat(pinia-colada): implicit $fetch for client-nuxt (hide composable) Sep 4, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 4, 2025

Open in StackBlitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/codegen-core@2598
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/nuxt@2598
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@2598
npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/vite-plugin@2598

commit: 771d244

@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 8.00000% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.16%. Comparing base (62cff55) to head (771d244).
⚠️ Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
...pi-ts/src/plugins/@pinia/colada/mutationOptions.ts 6.66% 14 Missing ⚠️
...enapi-ts/src/plugins/@pinia/colada/queryOptions.ts 6.66% 14 Missing ⚠️
...ages/openapi-ts/src/plugins/@pinia/colada/utils.ts 7.69% 12 Missing ⚠️
...ages/openapi-ts/src/plugins/@hey-api/sdk/plugin.ts 0.00% 2 Missing ⚠️
...s/openapi-ts/src/plugins/@pinia/colada/queryKey.ts 33.33% 2 Missing ⚠️
.../src/plugins/@hey-api/client-nuxt/bundle/client.ts 0.00% 1 Missing ⚠️
...openapi-ts/src/plugins/@hey-api/sdk/typeOptions.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2598      +/-   ##
==========================================
+ Coverage   23.59%   24.16%   +0.56%     
==========================================
  Files         363      363              
  Lines       36545    36629      +84     
  Branches     1562     1644      +82     
==========================================
+ Hits         8622     8850     +228     
+ Misses      27910    27766     -144     
  Partials       13       13              
Flag Coverage Δ
unittests 24.16% <8.00%> (+0.56%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 5, 2025
@mrlubos mrlubos merged commit fc0c481 into hey-api:main Sep 5, 2025
11 of 13 checks passed
@hey-api hey-api bot mentioned this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Client package related feature 🚀 New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client-nuxt: composable should be optional (default to $fetch)

2 participants