Skip to content

Commit aef8926

Browse files
committed
cleanup types
1 parent 3af2d37 commit aef8926

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/sqitch/deploy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ interface Extensions {
1818
const deployFastCache: Record<string, Awaited<ReturnType<typeof packageModule>>> = {};
1919

2020
const getCacheKey = (
21-
pg: Partial<PgConfig> | undefined,
21+
pg: PgConfig,
2222
name: string,
2323
database: string
2424
): string => {
2525
const { host, port, user } = pg ?? {};
26-
return `${host ?? 'localhost'}:${port ?? 5432}:${user ?? 'user'}:${database}:${name}`;
26+
return `${host}:${port}:${user}:${database}:${name}`;
2727
};
2828

2929
const log = new Logger('deploy');
@@ -84,7 +84,7 @@ export const deploy = async (
8484
if (options?.fast ?? true) {
8585
// Use fast deployment strategy
8686
const localProject = new LaunchQLProject(modulePath);
87-
const cacheKey = getCacheKey(opts.pg, extension, database);
87+
const cacheKey = getCacheKey(opts.pg as PgConfig, extension, database);
8888

8989
if (options?.cache && deployFastCache[cacheKey]) {
9090
log.warn(`⚡ Using cached pkg for ${extension}.`);

0 commit comments

Comments
 (0)