Skip to content

Commit a6e0979

Browse files
committed
chore: Update smart defaults minVersion from 2.20.0 to 2.21.0
Updates all references to the smart defaults minimum version across source code, tests, and documentation.
1 parent 8aa3f43 commit a6e0979

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

docs/src/content/docs/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,21 +487,21 @@ minVersion: '0.5.0'
487487

488488
### Smart Defaults
489489

490-
Setting `minVersion` to `2.20.0` or higher enables smart defaults that simplify configuration:
490+
Setting `minVersion` to `2.21.0` or higher enables smart defaults that simplify configuration:
491491

492492
```yaml
493-
minVersion: '2.20.0'
493+
minVersion: '2.21.0'
494494
```
495495

496-
| Feature | Default with `minVersion >= 2.20.0` | Default without |
496+
| Feature | Default with `minVersion >= 2.21.0` | Default without |
497497
| ------------------- | ----------------------------------- | --------------- |
498498
| `changelog.policy` | `auto` | `none` |
499499
| `versioning.policy` | `auto` (with `>= 2.14.0`) | `manual` |
500500

501501
This means a minimal configuration like this:
502502

503503
```yaml
504-
minVersion: '2.20.0'
504+
minVersion: '2.21.0'
505505
targets:
506506
- name: npm
507507
- name: github
@@ -514,7 +514,7 @@ Will automatically:
514514
- Create `CHANGELOG.md` if it doesn't exist
515515

516516
:::tip[Recommended for New Projects]
517-
Use `minVersion: '2.20.0'` for new projects to take advantage of smart defaults.
517+
Use `minVersion: '2.21.0'` for new projects to take advantage of smart defaults.
518518
Run `craft init` to automatically generate this configuration.
519519
:::
520520

docs/src/content/docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Example output:
4848
4949
Proposed .craft.yml:
5050
────────────────────────────────────────
51-
minVersion: "2.20.0"
51+
minVersion: "2.21.0"
5252
targets:
5353
- name: npm
5454
- name: github
@@ -438,7 +438,7 @@ craft prepare # Defaults to 0.1.0 for first release
438438
craft publish 0.1.0
439439
```
440440
441-
With smart defaults enabled (`minVersion: "2.20.0"`), Craft will:
441+
With smart defaults enabled (`minVersion: "2.21.0"`), Craft will:
442442
443443
- Auto-detect version bumps from commits
444444
- Automatically generate changelogs

src/commands/__tests__/validate.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('validate command', () => {
5757
github:
5858
owner: getsentry
5959
repo: craft
60-
minVersion: "2.20.0"
60+
minVersion: "2.21.0"
6161
targets:
6262
- name: github
6363
`,
@@ -170,7 +170,7 @@ targets:
170170
github:
171171
owner: getsentry
172172
repo: craft
173-
minVersion: "2.20.0"
173+
minVersion: "2.21.0"
174174
targets:
175175
- name: npm
176176
id: npm-main
@@ -218,7 +218,7 @@ targets:
218218
github:
219219
owner: getsentry
220220
repo: craft
221-
minVersion: "2.20.0"
221+
minVersion: "2.21.0"
222222
changelogPolicy: auto
223223
targets:
224224
- name: github
@@ -299,7 +299,7 @@ targets:
299299
github:
300300
owner: getsentry
301301
repo: craft
302-
minVersion: "2.20.0"
302+
minVersion: "2.21.0"
303303
targets:
304304
- name: github
305305
`,
@@ -322,7 +322,7 @@ targets:
322322
github:
323323
owner: getsentry
324324
repo: craft
325-
minVersion: "2.20.0"
325+
minVersion: "2.21.0"
326326
targets:
327327
- name: github
328328
`,
@@ -344,7 +344,7 @@ targets:
344344
github:
345345
owner: getsentry
346346
repo: craft
347-
minVersion: "2.20.0"
347+
minVersion: "2.21.0"
348348
targets:
349349
- name: github
350350
`,
@@ -399,7 +399,7 @@ jobs:
399399
github:
400400
owner: getsentry
401401
repo: craft
402-
minVersion: "2.20.0"
402+
minVersion: "2.21.0"
403403
targets:
404404
- name: github
405405
`,

src/commands/validate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ function validateCraftConfig(configPath: string): ValidationIssue[] {
152152
});
153153
}
154154

155-
// Recommend minVersion >= 2.20.0 for smart defaults
155+
// Recommend minVersion >= 2.21.0 for smart defaults
156156
const minVersion = rawConfig.minVersion as string | undefined;
157-
const smartDefaultsVersion = '2.20.0';
157+
const smartDefaultsVersion = '2.21.0';
158158
if (!minVersion) {
159159
issues.push({
160160
level: 'warning',

src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function requiresMinVersion(requiredVersion: string): boolean {
248248
const AUTO_VERSION_MIN_VERSION = '2.14.0';
249249

250250
/** Minimum craft version required for smart defaults (auto changelog, etc.) */
251-
const SMART_DEFAULTS_MIN_VERSION = '2.20.0';
251+
const SMART_DEFAULTS_MIN_VERSION = '2.21.0';
252252

253253
/**
254254
* Returns the effective versioning policy for the project.
@@ -427,13 +427,13 @@ const DEFAULT_CHANGELOG_FILE_PATH = 'CHANGELOG.md';
427427
* Handles both legacy `changelogPolicy` and new `changelog` object format.
428428
* Emits deprecation warning when using `changelogPolicy`.
429429
*
430-
* Smart defaults (when minVersion >= 2.20.0):
430+
* Smart defaults (when minVersion >= 2.21.0):
431431
* - policy defaults to 'auto' instead of 'none'
432432
*/
433433
export function getChangelogConfig(): NormalizedChangelogConfig {
434434
const config = getConfiguration();
435435

436-
// Default values - use smart defaults for minVersion >= 2.20.0
436+
// Default values - use smart defaults for minVersion >= 2.21.0
437437
let filePath = DEFAULT_CHANGELOG_FILE_PATH;
438438
let policy = requiresMinVersion(SMART_DEFAULTS_MIN_VERSION)
439439
? ChangelogPolicy.Auto

src/utils/__tests__/templates.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Template Generation', () => {
2121
const yaml = generateCraftConfig(baseContext);
2222
const parsed = load(yaml) as Record<string, unknown>;
2323

24-
expect(parsed.minVersion).toBe('2.20.0');
24+
expect(parsed.minVersion).toBe('2.21.0');
2525
expect(parsed.targets).toHaveLength(2);
2626
});
2727

src/utils/templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface TemplateContext {
5252
*/
5353
export function generateCraftConfig(context: TemplateContext): string {
5454
const config: Record<string, unknown> = {
55-
minVersion: '2.20.0',
55+
minVersion: '2.21.0',
5656
};
5757

5858
// Sort targets by priority (already sorted from detection)

0 commit comments

Comments
 (0)