这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jgoz
Copy link
Contributor

@jgoz jgoz commented Aug 29, 2025

fixes #2558

This is a comically large PR for what is essentially a one-line fix: don't rename output files if they already contain a .gen suffix.

The reason it's so large is that I added a client generation test case for clean: false which runs for every client.

Although this fixes the bug I reported, I think there is a better solution that I don't have time to contribute. Essentially, each client bundle should have a manifest of what is included and use that to determine which files need to be copied and renamed, rather than using the output directory listing. The manifest would need to be generated at the time of publishing in order to support Yarn's PnP mode; otherwise, the input directory could be used as the manifest.

@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 Aug 29, 2025

🦋 Changeset detected

Latest commit: eb6ee87

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 Aug 29, 2025

@jgoz 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 the size:XXL This PR changes 1000+ lines, ignoring generated files. label Aug 29, 2025
@dosubot dosubot bot added the client Client package related label Aug 29, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 29, 2025

Open in StackBlitz

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

commit: eb6ee87

@codecov
Copy link

codecov bot commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 23.83%. Comparing base (61e0956) to head (eb6ee87).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
packages/openapi-ts/src/generate/client.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2559   +/-   ##
=======================================
  Coverage   23.83%   23.83%           
=======================================
  Files         361      361           
  Lines       36080    36080           
  Branches     1560     1560           
=======================================
  Hits         8599     8599           
  Misses      27468    27468           
  Partials       13       13           
Flag Coverage Δ
unittests 23.83% <0.00%> (ø)

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.

Copy link
Member

@mrlubos mrlubos left a comment

Choose a reason for hiding this comment

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

Nice catch – thank you!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 29, 2025
@mrlubos
Copy link
Member

mrlubos commented Aug 29, 2025

I've seen this bug before but it was combined with something else I was working on, so I didn't realize it's an issue to be fixed

@mrlubos mrlubos merged commit 1a48863 into hey-api:main Aug 29, 2025
11 of 13 checks passed
@jgoz jgoz deleted the fix-clean-false-gen-ts-extensions branch August 29, 2025 22:22
@github-actions github-actions bot mentioned this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Client package related lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting clean:false results in duplicate files with extra .gen.ts extensions

2 participants