-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig-schema.json
More file actions
389 lines (389 loc) · 14.8 KB
/
Copy pathconfig-schema.json
File metadata and controls
389 lines (389 loc) · 14.8 KB
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/dmno-dev/bumpy/main/packages/bumpy/config-schema.json",
"title": "Bumpy Configuration",
"description": "Configuration for @varlock/bumpy — monorepo versioning and changelog tool",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "Path or URL to the JSON schema"
},
"baseBranch": {
"type": "string",
"description": "Branch used for release comparisons",
"default": "main"
},
"access": {
"type": "string",
"enum": ["public", "restricted"],
"description": "Default npm publish access level",
"default": "public"
},
"versionCommitMessage": {
"type": "string",
"description": "Customize the commit message used when versioning. A plain string is used as-is. A path starting with \"./\" or \"../\" is loaded as a module that exports a function receiving the release plan and returning a message string."
},
"changelog": {
"description": "Changelog formatter — \"default\", \"github\", or path to a custom formatter. Can also be a tuple of [formatter, options]. Set to false to disable changelog generation.",
"default": "default",
"oneOf": [
{ "type": "boolean", "const": false },
{ "type": "string" },
{
"type": "array",
"items": [{ "type": "string" }, { "type": "object" }],
"minItems": 2,
"maxItems": 2
}
]
},
"changedFilePatterns": {
"type": "array",
"description": "Glob patterns to filter which changed files count toward marking a package as changed. Can be overridden per-package.",
"items": { "type": "string" },
"default": ["**"]
},
"ignoredPackageJsonFields": {
"type": "array",
"description": "Top-level package.json fields whose change alone does not mark a package as changed. When package.json is the only changed file, it's diffed against the base branch and changes confined to these fields are ignored. Default: ['devDependencies']. A changed devDependencies entry matching the package's releaseTriggeringDevDeps still counts.",
"items": { "type": "string" },
"default": ["devDependencies"]
},
"fixed": {
"type": "array",
"description": "Package groups that always bump together to the same version. Each element is an array of package name globs.",
"items": {
"type": "array",
"items": { "type": "string" }
},
"default": []
},
"linked": {
"type": "array",
"description": "Package groups that share the highest bump level. Each element is an array of package name globs.",
"items": {
"type": "array",
"items": { "type": "string" }
},
"default": []
},
"ignore": {
"type": "array",
"description": "Package name globs to exclude from versioning",
"items": { "type": "string" },
"default": []
},
"include": {
"type": "array",
"description": "Package name globs to explicitly include (overrides ignore and privatePackages)",
"items": { "type": "string" },
"default": []
},
"updateInternalDependencies": {
"type": "string",
"enum": ["patch", "minor", "out-of-range"],
"description": "When to update internal dependency version ranges",
"default": "out-of-range"
},
"dependencyBumpRules": {
"type": "object",
"description": "Controls how bumps propagate through dependency types",
"properties": {
"dependencies": { "$ref": "#/$defs/dependencyBumpRule" },
"devDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
"peerDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
"optionalDependencies": { "$ref": "#/$defs/dependencyBumpRule" }
},
"additionalProperties": false
},
"privatePackages": {
"type": "object",
"description": "Whether to version and/or create git tags for private packages",
"properties": {
"version": {
"type": "boolean",
"description": "Whether to version private packages",
"default": false
},
"tag": {
"type": "boolean",
"description": "Whether to create git tags for private packages",
"default": false
}
},
"additionalProperties": false
},
"allowCustomCommands": {
"description": "Allow per-package custom commands (buildCommand, publishCommand, checkPublished) defined in package.json \"bumpy\" fields. true = allow all, string[] = allow matching package name globs, false = only root-config commands allowed.",
"default": false,
"oneOf": [
{ "type": "boolean" },
{
"type": "array",
"items": { "type": "string" }
}
]
},
"packages": {
"type": "object",
"description": "Per-package config overrides, keyed by package name or glob pattern",
"additionalProperties": { "$ref": "#/$defs/packageConfig" }
},
"publish": {
"type": "object",
"description": "Publishing pipeline configuration",
"properties": {
"packManager": {
"type": "string",
"enum": ["auto", "npm", "pnpm", "bun", "yarn"],
"description": "Package manager to use for packing. \"auto\" detects from lockfile.",
"default": "auto"
},
"publishManager": {
"type": "string",
"enum": ["npm", "pnpm", "bun", "yarn"],
"description": "Command to use for publishing. npm supports OIDC/provenance.",
"default": "npm"
},
"publishArgs": {
"type": "array",
"items": { "type": "string" },
"description": "Extra args appended to the publish command (e.g., \"--tag next\")",
"default": []
},
"protocolResolution": {
"type": "string",
"enum": ["pack", "in-place", "none"],
"description": "How to handle workspace:/catalog: protocol resolution. \"pack\" = use PM's pack to build a clean tarball, \"in-place\" = rewrite package.json before publish, \"none\" = don't resolve.",
"default": "pack"
},
"provenance": {
"type": "boolean",
"description": "Attach provenance attestation when publishing via npm. Requires a supported CI environment with OIDC (GitHub Actions, GitLab CI, etc.). Only works with publishManager \"npm\".",
"default": false
},
"npmStaged": {
"type": "boolean",
"description": "Use npm staged publishing (`npm stage publish`). Stages the publish on npmjs.com, requiring manual 2FA approval before going live. Only works with publishManager \"npm\" and requires npm >= 11.15.0.",
"default": false
}
},
"additionalProperties": false
},
"gitUser": {
"type": "object",
"description": "Git identity used for CI commits",
"properties": {
"name": {
"type": "string",
"description": "Git user name",
"default": "bumpy-bot"
},
"email": {
"type": "string",
"description": "Git user email",
"default": "276066384+bumpy-bot@users.noreply.github.com"
}
},
"additionalProperties": false
},
"versionPr": {
"type": "object",
"description": "Customize the version PR created by bumpy ci release",
"properties": {
"title": {
"type": "string",
"description": "PR title",
"default": "🐸 Versioned release"
},
"branch": {
"type": "string",
"description": "Branch name for the version PR",
"default": "bumpy/version-packages"
},
"preamble": {
"type": "string",
"description": "HTML/markdown content prepended to the PR body"
}
},
"additionalProperties": false
},
"channels": {
"type": "object",
"description": "Prerelease channels, keyed by channel name. Each maps a long-lived branch to a prerelease line (version suffix + npm dist-tag). Prerelease versions are derived at publish time and never committed.",
"additionalProperties": {
"type": "object",
"properties": {
"branch": {
"type": "string",
"description": "Branch that triggers this channel (required)"
},
"preid": {
"type": "string",
"description": "Version suffix (preid), e.g. \"rc\" produces 1.2.0-rc.0. Defaults to the channel name."
},
"tag": {
"type": "string",
"description": "npm dist-tag for publishes. Defaults to the channel name."
},
"versionPr": {
"type": "object",
"description": "Release PR overrides for this channel",
"properties": {
"title": {
"type": "string",
"description": "Release PR title. Defaults to \"<base title> (<channel name>)\"."
},
"branch": {
"type": "string",
"description": "Release PR branch. Defaults to \"<base branch>-<channel name>\"."
},
"automerge": {
"type": "boolean",
"description": "Enable auto-merge on the release PR",
"default": false
}
},
"additionalProperties": false
}
},
"required": ["branch"],
"additionalProperties": false
}
}
},
"additionalProperties": false,
"$defs": {
"bumpType": {
"type": "string",
"enum": ["major", "minor", "patch"]
},
"cascadeConfig": {
"oneOf": [
{
"type": "array",
"description": "List of package names/glob patterns (defaults: trigger \"patch\", bumpAs \"match\")",
"items": { "type": "string" }
},
{
"type": "object",
"description": "Package name/glob patterns mapped to cascade rules",
"additionalProperties": {
"type": "object",
"properties": {
"trigger": {
"$ref": "#/$defs/bumpType",
"description": "Minimum bump level that triggers the cascade (default: \"patch\")"
},
"bumpAs": {
"description": "What level to bump the target (default: \"match\")",
"oneOf": [{ "$ref": "#/$defs/bumpType" }, { "type": "string", "const": "match" }]
}
},
"additionalProperties": false
}
}
]
},
"dependencyBumpRule": {
"oneOf": [
{
"type": "object",
"properties": {
"trigger": {
"$ref": "#/$defs/bumpType",
"description": "Minimum bump level that triggers propagation"
},
"bumpAs": {
"description": "What level to bump the dependent (\"match\" mirrors the triggering level)",
"oneOf": [{ "$ref": "#/$defs/bumpType" }, { "type": "string", "const": "match" }]
}
},
"required": ["trigger", "bumpAs"],
"additionalProperties": false
},
{
"type": "boolean",
"const": false,
"description": "Set to false to disable propagation for this dependency type"
}
]
},
"packageConfig": {
"type": "object",
"description": "Per-package configuration",
"properties": {
"managed": {
"type": "boolean",
"description": "Explicitly opt this package in or out of version management"
},
"directBump": {
"type": "boolean",
"description": "When false, this package can never be bumped directly by a bump file — it only receives propagated bumps (fixed/linked group, cascade, dependency). Use for derived artifacts like platform binary packages kept in a fixed group with their core package."
},
"access": {
"type": "string",
"enum": ["public", "restricted"],
"description": "Override the global access level"
},
"publishCommand": {
"description": "Custom command(s) to publish this package (replaces npm publish)",
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": { "type": "string" }
}
]
},
"buildCommand": {
"type": "string",
"description": "Command to run before publishing"
},
"registry": {
"type": "string",
"description": "Custom npm registry URL"
},
"skipNpmPublish": {
"type": "boolean",
"description": "Don't publish to npm (still creates git tags)"
},
"checkPublished": {
"type": "string",
"description": "Custom command that outputs the currently published version"
},
"changedFilePatterns": {
"type": "array",
"description": "Glob patterns to filter which changed files count toward marking this package as changed (overrides root setting)",
"items": { "type": "string" }
},
"dependencyBumpRules": {
"type": "object",
"description": "Per-package override for dependency propagation rules",
"properties": {
"dependencies": { "$ref": "#/$defs/dependencyBumpRule" },
"devDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
"peerDependencies": { "$ref": "#/$defs/dependencyBumpRule" },
"optionalDependencies": { "$ref": "#/$defs/dependencyBumpRule" }
},
"additionalProperties": false
},
"cascadeTo": {
"description": "Explicit cascade targets — when this package is bumped, cascade to matching packages.",
"$ref": "#/$defs/cascadeConfig"
},
"cascadeFrom": {
"description": "Explicit cascade sources — when a matching package is bumped, cascade the bump to this package.",
"$ref": "#/$defs/cascadeConfig"
},
"releaseTriggeringDevDeps": {
"type": "array",
"description": "Names (or globs) of devDependencies that are release-relevant: a change to one requires a release of this package, and (for internal workspace deps) its own releases cascade here. devDependencies are ignored for versioning by default — this opts specific entries back in. The usual reason is a dep bundled into the published output (inlined by tsup/tsdown/esbuild/rollup/…). Shorthand for a cascadeFrom rule of { trigger: 'patch', bumpAs: 'patch' }; an explicit cascadeFrom for the same source takes precedence.",
"items": { "type": "string" }
}
},
"additionalProperties": false
}
}
}