1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| import process from 'node:process';
| import { loadConfig } from 'c12';
| import type { CliOption } from '../types';
|
| const defaultOptions: CliOption = {
| cwd: process.cwd(),
| cleanupDirs: [
| 'dist',
| '**/package-lock.json',
| '**/yarn.lock',
| '**/pnpm-lock.yaml',
| '**/node_modules',
| '!node_modules/**'
| ],
| ncuCommandArgs: ['--deep', '-u'],
| changelogOptions: {},
| gitCommitVerifyIgnores: [
| /^((Merge pull request)|(Merge (.*?) into (.*?)|(Merge branch (.*?)))(?:\r?\n)*$)/m,
| /^(Merge tag (.*?))(?:\r?\n)*$/m,
| /^(R|r)evert (.*)/,
| /^(amend|fixup|squash)!/,
| /^(Merged (.*?)(in|into) (.*)|Merged PR (.*): (.*))/,
| /^Merge remote-tracking branch(\s*)(.*)/,
| /^Automatic merge(.*)/,
| /^Auto-merged (.*?) into (.*)/
| ]
| };
|
| export async function loadCliOptions(overrides?: Partial<CliOption>, cwd = process.cwd()) {
| const { config } = await loadConfig<Partial<CliOption>>({
| name: 'soybean',
| defaults: defaultOptions,
| overrides,
| cwd,
| packageJson: true
| });
|
| return config as CliOption;
| }
|
|