Skip to content

Commit 1669fe9

Browse files
minor refactor
1 parent 9f2c0c0 commit 1669fe9

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/constant.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
import { type PackageManager } from './types';
22

3+
/**
4+
* The package managers that PatchPulse supports.
5+
* Used for running the command to update the dependencies.
6+
*/
37
export const PACKAGE_MANAGERS: readonly PackageManager[] = [
48
'npm',
59
'pnpm',
610
'yarn',
711
'bun',
812
];
13+
14+
/**
15+
* The filenames of the configuration files that PatchPulse looks for.
16+
*/
17+
export const CONFIG_FILENAMES: readonly string[] = [
18+
'patchpulse.config.json',
19+
'.patchpulserc.json',
20+
'.patchpulserc',
21+
];

src/services/config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { existsSync, readFileSync } from 'fs';
22
import { join } from 'path';
3-
import { PACKAGE_MANAGERS } from '../constant';
3+
import { CONFIG_FILENAMES, PACKAGE_MANAGERS } from '../constant';
44
import { type PackageManager } from '../types';
55

66
export interface PatchPulseConfig {
@@ -9,12 +9,6 @@ export interface PatchPulseConfig {
99
noUpdatePrompt?: boolean;
1010
}
1111

12-
const CONFIG_FILENAMES = [
13-
'patchpulse.config.json',
14-
'.patchpulserc.json',
15-
'.patchpulserc',
16-
];
17-
1812
/**
1913
* Get the config from the config file and merged with the CLI config
2014
* @param argv - The command line arguments

0 commit comments

Comments
 (0)