Skip to content

Commit f55e2c2

Browse files
committed
chore: init
1 parent 1fdc38c commit f55e2c2

29 files changed

Lines changed: 228 additions & 214 deletions

assets/logo-icon.txt

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣶⣶⣶⣶⣶⣶⣤⣤⣀⡀
2-
⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣀
3-
⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀
4-
⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
5-
⠀⠀⠀⢀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⡀
6-
⠀⠀⢠⣿⣿⣿⣿⣿⣿⠏⠉⠙⠛⠛⠋⠁⠀⠀⠈⠙⠛⠛⠋⠉⠹⣿⣿⣿⣿⣿⣿⡄
7-
⠀⠀⢸⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣼⣿⣿⣿⣿⣿⡇
8-
⠀⣠⣾⣿⣿⡏⠁⢀⡴⠶⠟⢛⣛⣛⣛⠛⠶⢦⣄⠀⠀⣀⣤⠾⠋⠀⠈⢹⣿⣿⣷⣄
9-
⢰⣿⣿⣿⣿⣿⠀⣿⢰⣿⣿⣿⠟⠻⣿⣿⣿⣦⢹⡿⠿⠛⠉⠀⠀⠀⠀⣿⣿⣿⣿⣿⡆
10-
⠈⢿⣿⣿⣿⡟⠀⢻⡘⣿⣿⣿⡄⠘⢿⣿⣿⠇⡾⠁⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⡿⠁
11-
⠀⢀⣿⣿⣯⡀⠀⠈⢳⡙⣿⣿⣭⢠⣾⣿⠏⡼⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⣽⣿⣿⡀
12-
⢠⣿⣿⣿⣿⣿⡄⠀⠀⠙⣮⣙⠛⠟⣛⣥⠞⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⡄
13-
⠘⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠉⠛⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⠃
14-
⠀⠈⣿⣿⣟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣻⣿⣿⠁
15-
⢀⣾⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣷⡀
16-
⠸⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⠇
17-
⠀⠙⠻⠿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⠿⠟⠋
1+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣤⣤⣴⣶⣶⣤⣤⣤⣤⣄⣀⡀
2+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣀
3+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄
4+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀
5+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄
6+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷
7+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄
8+
⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠉⠙⠛⠛⠛⠛⠋⠀⠀⠀⠀⠀⠉⠛⠛⠛⠛⠛⠉⠁⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧
9+
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡿⠁⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿
10+
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⠿⠿⠟⠋⣀⣤⣴⠶⠶⠶⠶⠶⠶⣤⣤⣀⠀⠀⠀⠀⠀⢀⣴⡟⠁⠀⠀⠀⠀⠈⠛⠿⠿⢿⣿⣿⣿⣿
11+
⠀⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣇⠀⠀⠀⣾⢫⣴⣶⣶⣿⡿⣿⣿⣶⣶⣬⠹⣷⣴⣶⠶⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣷⣦⡀
12+
⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⣿⠸⣿⣿⣿⡏⠀⢤⣿⣿⣿⣿⢡⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣷
13+
⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠸⣧⠻⣿⣿⡿⠆⠀⣹⣿⣿⢃⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿
14+
⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⠟⠀⠀⠀⠀⠘⢷⣝⠿⣿⣧⣾⣿⠟⣡⡞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⠟⠁
15+
⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠙⠳⢦⣬⣥⡶⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣿⣿⣿⣯⡀
16+
⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣆
17+
⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿
18+
⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⣿⠏
19+
⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠹⣿⣿⣿⣿⠁
20+
⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣦⡀
21+
⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣷
22+
⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⡟
23+
⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⡿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⡿⠟

contributing/concepts/architecture.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ The CLI binary entrypoint. Calls `cli()` from `kidd` with the CLI name, version,
9696

9797
The framework primitives:
9898

99-
| Module | Purpose |
100-
| --------------- | ---------------------------------------------------------- |
101-
| `cli.ts` | Entry function that wires yargs, config, and context |
102-
| `command.ts` | Factory for creating typed commands |
103-
| `middleware.ts` | Factory and pipeline runner for middleware composition |
104-
| `autoloader.ts` | Auto-discovery and dynamic import of command files |
105-
| `context/` | Context creation, types, and error handling |
99+
| Module | Purpose |
100+
| --------------- | ------------------------------------------------------ |
101+
| `cli.ts` | Entry function that wires yargs, config, and context |
102+
| `command.ts` | Factory for creating typed commands |
103+
| `middleware.ts` | Factory and pipeline runner for middleware composition |
104+
| `autoloader.ts` | Auto-discovery and dynamic import of command files |
105+
| `context/` | Context creation, types, and error handling |
106106

107107
### Lib Layer
108108

@@ -295,10 +295,10 @@ Config is validated against a Zod schema and errors are returned as discriminate
295295

296296
kidd uses two error strategies depending on the layer:
297297

298-
| Layer | Strategy | Type |
299-
| ------------ | ----------------------------------- | ------------------------------------------ |
300-
| Lib/internal | `Result<T, E>` tuples | `[error, null]` or `[null, value]` |
301-
| Context/CLI | `ContextError` (thrown at boundary) | `{ code, exitCode }` |
298+
| Layer | Strategy | Type |
299+
| ------------ | ----------------------------------- | ---------------------------------- |
300+
| Lib/internal | `Result<T, E>` tuples | `[error, null]` or `[null, value]` |
301+
| Context/CLI | `ContextError` (thrown at boundary) | `{ code, exitCode }` |
302302

303303
**Result tuples** are used for expected failures (config parsing, validation, file I/O). Chain with early returns:
304304

examples/simple/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@examples/simple",
33
"version": "0.0.0",
44
"private": true,
5+
"type": "module",
56
"scripts": {
67
"dev": "kidd dev",
78
"build": "kidd build",
@@ -18,6 +19,5 @@
1819
"tsdown": "catalog:",
1920
"tsx": "catalog:",
2021
"typescript": "catalog:"
21-
},
22-
"type": "module"
22+
}
2323
}

packages/bundler/src/compile.test.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,17 @@ describe('compile operation', () => {
167167
)
168168

169169
const [, output] = await compile({
170-
config: { compile: { name: 'my-app', targets: ['darwin-arm64', 'linux-x64', 'windows-x64'] } },
170+
config: {
171+
compile: { name: 'my-app', targets: ['darwin-arm64', 'linux-x64', 'windows-x64'] },
172+
},
171173
cwd: '/project',
172174
})
173175

174176
expect(output).toMatchObject({
175177
binaries: expect.arrayContaining([
176-
expect.objectContaining({ target: 'darwin-arm64', label: 'macOS Apple Silicon' }),
177-
expect.objectContaining({ target: 'linux-x64', label: 'Linux x64' }),
178-
expect.objectContaining({ target: 'windows-x64', label: 'Windows x64' }),
178+
expect.objectContaining({ label: 'macOS Apple Silicon', target: 'darwin-arm64' }),
179+
expect.objectContaining({ label: 'Linux x64', target: 'linux-x64' }),
180+
expect.objectContaining({ label: 'Windows x64', target: 'windows-x64' }),
179181
]),
180182
})
181183
})
@@ -195,8 +197,12 @@ describe('compile operation', () => {
195197
await compile({
196198
config: { compile: { name: 'my-app', targets: ['darwin-arm64', 'linux-x64'] } },
197199
cwd: '/project',
198-
onTargetStart: (target) => { started.push(target) },
199-
onTargetComplete: (target) => { completed.push(target) },
200+
onTargetComplete: (target) => {
201+
completed.push(target)
202+
},
203+
onTargetStart: (target) => {
204+
started.push(target)
205+
},
200206
})
201207

202208
expect(started).toContain('darwin-arm64')

packages/bundler/src/compile.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { execFile as execFileCb } from 'node:child_process'
22
import { readdirSync, unlinkSync } from 'node:fs'
33
import { join } from 'node:path'
44

5+
import type { CompileTarget } from '@kidd/config'
56
import { err, ok } from '@kidd/utils/fp'
67
import type { AsyncResult } from '@kidd/utils/fp'
7-
import type { CompileTarget } from '@kidd/config'
88

99
import { DEFAULT_COMPILE_TARGETS } from './constants.js'
1010
import { detectBuildEntry, resolveConfig } from './resolve-config.js'
@@ -124,7 +124,9 @@ async function compileSingleTarget(params: {
124124

125125
const [execError] = await execBunBuild(args)
126126
if (execError) {
127-
return err(new Error(`bun build --compile failed for target ${params.target}`, { cause: execError }))
127+
return err(
128+
new Error(`bun build --compile failed for target ${params.target}`, { cause: execError })
129+
)
128130
}
129131

130132
return ok({ label: resolveTargetLabel(params.target), path: outfile, target: params.target })
@@ -223,5 +225,5 @@ function cleanBunBuildArtifacts(cwd: string): void {
223225
readdirSync(cwd)
224226
.filter((name) => name.endsWith('.bun-build'))
225227
.map((name) => join(cwd, name))
226-
.forEach(unlinkSync)
228+
.map(unlinkSync)
227229
}

packages/bundler/src/generate-autoloader.test.ts

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ describe('static autoloader generation', () => {
4545

4646
expect(code).toContain("import _deploy from '/project/commands/deploy/index.ts'")
4747
expect(code).toContain("import _deploy_preview from '/project/commands/deploy/preview.ts'")
48-
expect(code).toContain("import _deploy_production from '/project/commands/deploy/production.ts'")
49-
expect(code).toContain("withTag({ ..._deploy, commands:")
48+
expect(code).toContain(
49+
"import _deploy_production from '/project/commands/deploy/production.ts'"
50+
)
51+
expect(code).toContain('withTag({ ..._deploy, commands:')
5052
expect(code).toContain("'preview': _deploy_preview")
5153
expect(code).toContain("'production': _deploy_production")
5254
expect(code).toContain("}, 'Command')")
@@ -57,9 +59,7 @@ describe('static autoloader generation', () => {
5759
dirs: [
5860
{
5961
dirs: [],
60-
files: [
61-
{ filePath: '/project/commands/auth/login.ts', name: 'login' },
62-
],
62+
files: [{ filePath: '/project/commands/auth/login.ts', name: 'login' }],
6363
name: 'auth',
6464
},
6565
],
@@ -77,9 +77,7 @@ describe('static autoloader generation', () => {
7777
it('should import withTag from the provided tag module path', () => {
7878
const scan: ScanResult = {
7979
dirs: [],
80-
files: [
81-
{ filePath: '/project/commands/status.ts', name: 'status' },
82-
],
80+
files: [{ filePath: '/project/commands/status.ts', name: 'status' }],
8381
}
8482

8583
const code = generateStaticAutoloader({ scan, tagModulePath: TAG_PATH })
@@ -94,9 +92,7 @@ describe('static autoloader generation', () => {
9492
dirs: [
9593
{
9694
dirs: [],
97-
files: [
98-
{ filePath: '/project/commands/deploy/cloud/aws.ts', name: 'aws' },
99-
],
95+
files: [{ filePath: '/project/commands/deploy/cloud/aws.ts', name: 'aws' }],
10096
name: 'cloud',
10197
},
10298
],
@@ -133,16 +129,12 @@ describe('static autoloader generation', () => {
133129
dirs: [
134130
{
135131
dirs: [],
136-
files: [
137-
{ filePath: '/project/commands/deploy/preview.ts', name: 'preview' },
138-
],
132+
files: [{ filePath: '/project/commands/deploy/preview.ts', name: 'preview' }],
139133
index: '/project/commands/deploy/index.ts',
140134
name: 'deploy',
141135
},
142136
],
143-
files: [
144-
{ filePath: '/project/commands/status.ts', name: 'status' },
145-
],
137+
files: [{ filePath: '/project/commands/status.ts', name: 'status' }],
146138
}
147139

148140
const code = generateStaticAutoloader({ scan, tagModulePath: TAG_PATH })
@@ -157,9 +149,7 @@ describe('autoloader parts generation', () => {
157149
it('should use dynamic imports inside autoload function', () => {
158150
const scan: ScanResult = {
159151
dirs: [],
160-
files: [
161-
{ filePath: '/project/commands/status.ts', name: 'status' },
162-
],
152+
files: [{ filePath: '/project/commands/status.ts', name: 'status' }],
163153
}
164154

165155
const parts = generateAutoloaderParts({ scan, tagModulePath: TAG_PATH })
@@ -175,9 +165,7 @@ describe('autoloader parts generation', () => {
175165
it('should include region markers', () => {
176166
const scan: ScanResult = {
177167
dirs: [],
178-
files: [
179-
{ filePath: '/project/commands/status.ts', name: 'status' },
180-
],
168+
files: [{ filePath: '/project/commands/status.ts', name: 'status' }],
181169
}
182170

183171
const parts = generateAutoloaderParts({ scan, tagModulePath: TAG_PATH })
@@ -203,9 +191,7 @@ describe('autoloader parts generation', () => {
203191
dirs: [
204192
{
205193
dirs: [],
206-
files: [
207-
{ filePath: '/project/commands/auth/login.ts', name: 'login' },
208-
],
194+
files: [{ filePath: '/project/commands/auth/login.ts', name: 'login' }],
209195
name: 'auth',
210196
},
211197
],

packages/bundler/src/generate-autoloader.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export function generateStaticAutoloader(params: GenerateStaticAutoloaderParams)
6161
* @param params - The scan result and path to the tag utility module.
6262
* @returns Import statements (empty) and the replacement autoloader region.
6363
*/
64-
export function generateAutoloaderParts(params: GenerateStaticAutoloaderParams): StaticAutoloaderParts {
64+
export function generateAutoloaderParts(
65+
params: GenerateStaticAutoloaderParams
66+
): StaticAutoloaderParts {
6567
const imports = collectImports(params.scan)
6668

6769
if (imports.length === 0) {
@@ -165,9 +167,7 @@ function buildImportStatements(
165167
): readonly string[] {
166168
const tagLine = buildTagImportLine(imports, tagModulePath)
167169

168-
const importLines = imports.map(
169-
(entry) => `import ${entry.identifier} from '${entry.filePath}'`
170-
)
170+
const importLines = imports.map((entry) => `import ${entry.identifier} from '${entry.filePath}'`)
171171

172172
return [...tagLine, '', ...importLines]
173173
}
@@ -294,13 +294,9 @@ function buildDynamicAutoloaderRegion(
294294
imports: readonly ImportEntry[],
295295
commandsObject: string
296296
): string {
297-
const destructuring = imports
298-
.map((entry) => ` { default: ${entry.identifier} },`)
299-
.join('\n')
297+
const destructuring = imports.map((entry) => ` { default: ${entry.identifier} },`).join('\n')
300298

301-
const importCalls = imports
302-
.map((entry) => ` import('${entry.filePath}'),`)
303-
.join('\n')
299+
const importCalls = imports.map((entry) => ` import('${entry.filePath}'),`).join('\n')
304300

305301
return [
306302
'//#region src/autoloader.ts (static)',

packages/bundler/src/map-config.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,3 @@ describe('watch config mapping', () => {
114114
expect(result.onSuccess).toBeUndefined()
115115
})
116116
})
117-

packages/bundler/src/map-config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ export function mapToBuildConfig(config: ResolvedBundlerConfig): InlineConfig {
3333
logLevel: 'info',
3434
minify: config.build.minify,
3535
outDir: config.buildOutDir,
36+
outputOptions: {
37+
codeSplitting: false,
38+
},
3639
platform: 'node',
3740
plugins: [
3841
createAutoloadPlugin({
3942
commandsDir: config.commands,
4043
tagModulePath: resolveTagModulePath(),
4144
}),
4245
],
43-
outputOptions: {
44-
codeSplitting: false,
45-
},
4646
sourcemap: config.build.sourcemap,
4747
target: config.build.target,
4848
treeshake: true,

packages/bundler/src/resolve-config.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,3 @@ describe(normalizeCompileOptions, () => {
167167
expect(normalizeCompileOptions(opts)).toStrictEqual(opts)
168168
})
169169
})
170-

0 commit comments

Comments
 (0)