-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.ts
155 lines (134 loc) · 3.8 KB
/
options.ts
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import { Bump } from "./bump.js";
export interface Options {
/**
* Wether to only update version ranges of internal dependencies using the
* `workspace:` protocol.
*/
onlyWorkspaceProtocol?: boolean | undefined;
/**
* Wether to overrides complex version ranges of internal dependencies to the
* latest version.
* @default false
*/
overrideComplexRange?: boolean | undefined;
/**
* Wether to allow stable version ranges of internal dependencies to
* pre-release versions.
* @default false
*/
updateStableToPreRelease?: boolean | undefined;
/**
* Whether to ignore warnings about usage of pre-release versions where a
* newer stable version exists.
* @default false
*/
ignoreOutdatedPreRelease?: boolean | undefined;
/**
* Whether to ignore warnings about invalid conventional commit messages.
* @default false
*/
ignoreInvalidCommit?: boolean | undefined;
/**
* The initial number to use in the pre-release sequence.
* @default 0
*/
initialPreRelease?: number | undefined;
/**
* Whether to preserve the sequence of pre-release when bumping the main version.
*
* - Enabled: `1.0.0-rc.5` -> `1.1.0-rc.0`
* - Disabled: `1.0.0-rc.5` -> `1.1.0-rc.6`
*
* @default false
*/
preservePreRelease?: boolean | undefined;
/**
* Whether to include private packages in versioning.
* @default false
*/
includePrivate?: boolean | undefined;
/**
* Allow versioning to bump versions from `0.x` to `1.x` major.
* @default false
*/
allowFirstMajor?: boolean | undefined;
/**
* Prevent major bumps without manual promotions.
* @default false
*/
preventMajorBump?: boolean | undefined;
/**
* Pattern of packages to include in versioning. When specified, only
* packages that match the patterns will be included. Use `*` to allow any
* sequence of characters.
*/
include?: string[] | undefined;
/**
* Pattern of packages to exclude in versioning. Use `*` to allow any
* sequence of characters.
*/
exclude?: string[] | undefined;
/**
* Patterns of packages to have linked versions. Use `*` to allow any
* sequence of characters.
*/
linked?: string[][] | undefined;
/**
* Patterns of packages to have fixed versions. Use `*` to allow any sequence
* of characters.
*/
fixed?: string[][] | undefined;
inputs?: string[];
/**
* The base git ref for getting commit history. Everything after this commit
* will be used as reference for versioning.
* @default "HEAD"
*/
base?: string | undefined;
/**
* Record of conventional commit type to version bump. By default, all types
* specified by `@commitlint/config-conventional` (based on the Angular convention) are defined.
*/
bumps?: Record<string, Bump | null> | undefined;
/**
* A record of manual promotions and their version bump to be incremented for each package.
*
* @example
* { "my-package": "minor" }
*/
promotions?: Record<string, Bump | undefined> | undefined;
/**
* A record of packages and their original version.
*
* @example
* { "my-package": "1.2.3" }
*/
original?: Record<string, string> | undefined;
/**
* Path to the root workspace directory.
* @default "./"
*/
workspaceRoot?: string;
}
export const DEFAULT_OPTIONS = {
onlyWorkspaceProtocol: false,
overrideComplexRange: false,
updateStableToPreRelease: false,
ignoreOutdatedPreRelease: false,
ignoreInvalidCommit: false,
initialPreRelease: 0,
preservePreRelease: false,
includePrivate: false,
allowFirstMajor: false,
preventMajorBump: false,
include: [],
exclude: [],
linked: [],
fixed: [],
inputs: ["{workspace}/**/*", "{package}/**/*"],
base: undefined,
bumps: {},
promotions: {},
original: {},
workspaceRoot: "./",
} satisfies Required<Options>;