kubb-labs / kubb

The ultimate toolkit for working with APIs.
https://kubb.dev
MIT License
738 stars 67 forks source link

Disabling output file extension #1422

Closed burt202 closed 2 days ago

burt202 commented 3 days ago

What version of kubb is running?

3.0.10

What kind of platform do you use?

Linux

How does your kubb.config.ts config look like

See linked repo below

Swagger/OpenAPI file?

See linked repo below

What version of external packages are you using(@tanstack-query, MSW, React, Vue, ...)

See linked repo below

What steps can reproduce the bug?

In v2, the contents of the index.ts file is export * from "./types"; but in v3 it adds .ts by default. I can get around this by doing:

extension: {
  ".ts": ""
}

but "" is not a valid to the KubbFile.Extname type. Is there a better way of doing this or does the typing need to be relaxed to allow empty string to disable it?

For repro, clone repo linked below and npm ci and npm run generate

https://github.com/burt202/kubb-test

Cheers, hopefully this is the last issue to enable us to upgrade to v3 smoothly!

How often does this bug happen?

Every time

What is the expected behavior?

No response

Additional information

No response

linear[bot] commented 3 days ago

KUBB-76 Disabling output file extension

stijnvanhulle commented 2 days ago

Fixed with v3.0.11

burt202 commented 2 days ago

Yep, 3.0.11 is all good with

extension: {
  ".ts": ""
}

Cheers!