Skip to content

Commit 7788c86

Browse files
committed
allow disabling jiti fsCache.
1 parent 9163b6b commit 7788c86

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

src/arguments/common.mts

+2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import type { ArgsDef } from 'citty'
22
import { CWDArg } from './cwd.mjs'
33
import { DebugArg } from './debug.mjs'
44
import { EnvironmentArg } from './environment.mjs'
5+
import { JitiArgs } from './jiti.mjs'
56
import { NoOutdatedCheckArg } from './no-outdated-notice.mjs'
67

78
export const CommonArgs = {
89
...CWDArg,
910
...DebugArg,
1011
...EnvironmentArg,
12+
...JitiArgs,
1113
...NoOutdatedCheckArg,
1214
} satisfies ArgsDef

src/arguments/jiti.mts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { ArgsDef } from 'citty'
2+
3+
const NoFilesystemCachingArg = {
4+
'no-filesystem-caching': {
5+
default: false,
6+
description:
7+
'Will not write cache files to disk. See https://github.com/unjs/jiti#fscache for more information.',
8+
type: 'boolean',
9+
},
10+
} satisfies ArgsDef
11+
12+
export const JitiArgs = {
13+
...NoFilesystemCachingArg,
14+
} satisfies ArgsDef

src/arguments/no-outdated-notice.mts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { ArgsDef } from 'citty'
22

33
export const NoOutdatedCheckArg = {
44
'no-outdated-check': {
5+
default: false,
56
description:
67
'Will not check for latest kysely/kysely-ctl versions and notice newer versions exist.',
78
type: 'boolean',

src/config/get-config.mts

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
export interface ArgsLike {
1111
cwd?: string
1212
environment?: string
13+
'filesystem-caching'?: boolean
1314
}
1415

1516
export async function getConfig(
@@ -21,6 +22,9 @@ export async function getConfig(
2122
cwd,
2223
dotenv: true,
2324
envName: args.environment,
25+
jitiOptions: {
26+
fsCache: Boolean(args['filesystem-caching']),
27+
},
2428
globalRc: false,
2529
name: 'kysely',
2630
packageJson: false,

0 commit comments

Comments
 (0)