Skip to content

Commit

Permalink
fix: Include single file exports in the main index.ts file.
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvanhulle committed Nov 17, 2024
1 parent 81089c2 commit ca3b862
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 41 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-bags-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kubb/core": patch
---

Include single file exports in the main index.ts file.
4 changes: 3 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ title: Changelog

# Changelog

## 3.0.7
- [`core`](/plugins/core): Include single file exports in the main index.ts file.

## 3.0.6
- [`plugin-oas`](/plugins/plugin-oas/): Correct use of variables when a path/params contains _ or -
- [`core`](/plugins/core): Main index.ts not being created using `barrelType: 'all'`
- [`core`](/plugins/core): `barrelType: 'propagate'` to make sure the core can still generate barrel files, even if the plugin will not have barrel files

## 3.0.5
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@tanstack/svelte-query": "^5.60.5",
"@tanstack/vue-query": "^5.60.5",
"axios": "^1.7.7",
"msw": "^2.6.4",
"msw": "^2.6.5",
"react": "^18.3.1",
"solid-js": "^1.9.3",
"svelte": "^3.59.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@tanstack/svelte-query": "^5.60.5",
"@tanstack/vue-query": "^5.60.5",
"axios": "^1.7.7",
"msw": "^2.6.4",
"msw": "^2.6.5",
"react": "^18.3.1",
"solid-js": "^1.9.3",
"svelte": "^3.59.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/msw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@kubb/plugin-oas": "workspace:*",
"@kubb/plugin-ts": "workspace:*",
"@mswjs/http-middleware": "^0.9.2",
"msw": "^2.6.4",
"msw": "^2.6.5",
"react": "^18.3.1",
"tsup": "^8.3.5"
},
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { clean, read } from '@kubb/fs'
import type * as KubbFile from '@kubb/fs/types'
import { FileManager, processFiles } from './FileManager.ts'
import { type FileManager, processFiles } from './FileManager.ts'
import { PluginManager } from './PluginManager.ts'
import { isInputPath } from './config.ts'
import { createLogger } from './logger.ts'
Expand Down Expand Up @@ -114,9 +114,6 @@ export async function safeBuild(options: BuildOptions): Promise<BuildOutput> {
return undefined
}

if (FileManager.getMode(pluginOptions.output?.path) === 'single') {
return undefined
}
return {
name: pluginOptions.output?.barrelType === 'all' ? undefined : [source.name],
path: getRelativePath(rootPath, file.path),
Expand Down
60 changes: 27 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ca3b862

Please sign in to comment.