Skip to content

Commit

Permalink
Release version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 committed May 1, 2023
1 parent 199f6d0 commit 9a9f133
Show file tree
Hide file tree
Showing 19 changed files with 288 additions and 293 deletions.
35 changes: 35 additions & 0 deletions .changeset/lemon-lions-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
'@microsoft/m365-renovate-config': major
---

`m365-renovate-config` version 2 makes the default preset a bit more opinionated based on testing, streamlines preset naming, and updates settings to better reflect recent improvements in Renovate.

**These changes have been picked up automatically** unless you specified a ref (e.g. `#v1`) as part of the preset names in your `extends` config.

Note: `<m365>` in preset names referenced below is a shorthand for `github>microsoft/m365-renovate-config`. This is just for readability of the readme and will _**not**_ work in actual configs (you must use the full repo prefix).

#### Default preset changes

The default preset (`github>microsoft/m365-renovate-config`) is now a bit more "opinionated" and includes the settings that were previously defined in `<m365>:libraryRecommended`. These settings can be disabled either individually or using the `excludePresets` option.

The dependency version update strategy (`rangeStrategy`) has also changed as described below.

#### Major preset changes and deprecations

Deprecated presets still exist for now to avoid immediate breaks in consuming repos, but will be removed in version 3.

- `<m365>:libraryRecommended` is deprecated in favor of this repo's default preset.
- `<m365>:beachballLibraryRecommended` is renamed to `<m365>:beachball`.

#### Dependency version update strategy

Previously, Renovate's `config:base` would pin `devDependencies` and possibly also `dependencies` to exact versions. Pinning `dependencies` is not desirable for libraries, so `v1` of `m365-renovate-config` omitted any pinning behavior in its default preset, and enabled pinning _only_ `devDependencies` in its `<m365>:libraryRecommended` preset.

A [recent Renovate update](https://docs.renovatebot.com/release-notes-for-major-versions/#version-35) included greatly expanded support for doing in-range updates (e.g. updating the installed version for `"foo": "^1.0.0"` from `1.1.0` to `1.2.0`) by changing only the lockfile. Therefore, Renovate's default [`rangeStrategy: "auto"`](https://docs.renovatebot.com/configuration-options/#rangestrategy) was changed to do lockfile-only updates when possible (instead of pinning or replacing versions), and `config:base` no longer includes any pinning of versions.

Since the lockfile-only updates are likely a good strategy for `devDependencies` in most repos, `m365-renovate-config`'s default preset (which supersedes `<m365>:libraryRecommended`) has been updated as follows:

- Use `rangeStrategy: "replace"` for `dependencies` (production) to reduce the chance of breaks for library consumers.
- Remove overrides (use `rangeStrategy: "auto"`) for other dependency types.

To restore the previous behavior of `<m365>:libraryRecommended`, extend the Renovate preset [`:pinOnlyDevDependencies`](https://docs.renovatebot.com/presets-default/#pinonlydevdependencies).
7 changes: 1 addition & 6 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>microsoft/m365-renovate-config:libraryRecommended",
"github>microsoft/m365-renovate-config",
"github>microsoft/m365-renovate-config:keepFresh"
],

Expand All @@ -17,11 +17,6 @@
"platformAutomerge": true
},

"pin": {
"enabled": false
},
"rangeStrategy": "update-lockfile",

"semanticCommits": "disabled",

"packageRules": [
Expand Down
316 changes: 158 additions & 158 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions beachball.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Recommended config for library repos which use Beachball for publishing.",

"extends": [
"github>microsoft/m365-renovate-config",
"github>microsoft/m365-renovate-config:beachballPostUpgrade"
]
}
58 changes: 4 additions & 54 deletions beachballLibraryRecommended.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Dependency management strategy for library repos, including Beachball change file generation.",
"description": "DEPRECATED; use this repo's `beachball` preset instead.",

"extends": ["github>microsoft/m365-renovate-config:libraryRecommended"],

"gitAuthor": "Renovate Bot <[email protected]>",

"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type patch --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
},

"pin": {
"group": {
"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type none --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
}
},

"lockFileMaintenance": {
"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type none --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
},

"packageRules": [
{
"matchDepTypes": ["devDependencies"],
"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type none --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
}
"extends": [
"github>microsoft/m365-renovate-config",
"github>microsoft/m365-renovate-config:beachballPostUpgrade"
]
}
14 changes: 0 additions & 14 deletions beachballLibraryVerbose.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@
"executionMode": "branch"
},

"pin": {
"group": {
"postUpgradeTasks": {
"commands": [
"git add --all",
"npx --verbose beachball change --no-fetch --no-commit --type none --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
}
},

"lockFileMaintenance": {
"postUpgradeTasks": {
"commands": [
Expand Down
44 changes: 44 additions & 0 deletions beachballPostUpgrade.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Run `beachball change` as a post-upgrade task.",

"gitAuthor": "Renovate Bot <[email protected]>",

"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type patch --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
},

"lockFileMaintenance": {
"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type none --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
},

"packageRules": [
{
"matchDepTypes": ["devDependencies"],
"postUpgradeTasks": {
"commands": [
"git add --all",
"npx beachball change --no-fetch --no-commit --type none --message '{{{commitMessage}}}'",
"git reset"
],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
}
]
}
24 changes: 15 additions & 9 deletions default.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
"description": ["Recommended config which is intended to be appropriate for most projects."],

"extends": [
":ignoreModulesAndTests",
":semanticPrefixFixDepsChoreOthers",
"group:monorepos",
"group:recommended",
"workarounds:all",
"config:base",
"github>microsoft/m365-renovate-config:groupReact",
"github>microsoft/m365-renovate-config:newConfigWarningIssue"
"github>microsoft/m365-renovate-config:newConfigWarningIssue",
"github>microsoft/m365-renovate-config:dependencyDashboardMajor"
],

"dependencyDashboard": true,

"prConcurrentLimit": 10,
"prHourlyLimit": 2,

Expand All @@ -24,5 +19,16 @@

"vulnerabilityAlerts": {
"enabled": true
}
},

"packageRules": [
{
"matchDepTypes": ["devDependencies"],
"commitMessageTopic": "devDependency {{{depName}}}"
},
{
"matchDepTypes": ["dependencies"],
"rangeStrategy": "replace"
}
]
}
2 changes: 1 addition & 1 deletion dependencyDashboardMajor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "Require dependency dashboard approval for major upgrades (and minor upgrades of deps known not to follow semver).",
"description": "Require dependency dashboard approval for major upgrades, 0.x upgrades, and minor upgrades of deps known not to follow semver.",
"dependencyDashboard": true,
"major": {
"dependencyDashboardApproval": true
Expand Down
5 changes: 2 additions & 3 deletions groupD3.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group D3 updates (except when initially pinning).",
"description": "Group D3 updates.",

"packageRules": [
{
"groupName": "D3 packages",
"matchPackagePrefixes": ["d3-", "@types/d3-"],
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"]
"matchPackagePrefixes": ["d3-", "@types/d3-"]
}
]
}
3 changes: 1 addition & 2 deletions groupEslint.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group and schedule all eslint-related updates (except when initially pinning).",
"description": "Group and schedule all eslint-related updates.",

"packageRules": [
{
"groupName": "eslint packages",
"matchPackagePatterns": ["eslint"],
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"],
"schedule": ["before 5am on the 8th and 22nd day of the month"]
}
]
Expand Down
1 change: 0 additions & 1 deletion groupFixtureUpdates.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"major": {
"dependencyDashboardApproval": false
},
"rangeStrategy": "replace",
"commitMessagePrefix": "[fixtures]",
"commitMessageExtra": "",
"automerge": true,
Expand Down
13 changes: 3 additions & 10 deletions groupFluent.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group Fluent UI and related package updates (except when initially pinning).",
"description": "Group Fluent UI and related package updates.",

"packageRules": [
{
"groupName": "Fluent UI React v9 packages",
"matchPackagePrefixes": ["@fluentui/"],
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"],
"matchCurrentVersion": ">=9.0.0-alpha.0"
},
{
"groupName": "Fluent UI React v9 packages",
"matchPackagePrefixes": ["@griffel/"],
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"]
"matchPackagePrefixes": ["@griffel/"]
},
{
"groupName": "Fluent UI React v8 packages",
"matchPackagePrefixes": ["@fluentui/"],
"matchUpdateTypes": ["minor", "patch", "bump", "digest"],
"matchCurrentVersion": "/^[1234568]\\./",
"excludePackageNames": [
"@fluentui/eslint-plugin",
Expand All @@ -28,13 +25,11 @@
},
{
"groupName": "Fluent UI React v8 packages",
"matchPackageNames": ["@fluentui/react-cards"],
"matchUpdateTypes": ["minor", "patch", "bump", "digest"]
"matchPackageNames": ["@fluentui/react-cards"]
},
{
"groupName": "Fluent UI React Northstar packages",
"matchPackagePrefixes": ["@fluentui/"],
"matchUpdateTypes": ["minor", "patch", "bump", "digest"],
"matchCurrentVersion": "0.x",
"excludePackageNames": [
"@fluentui/eslint-plugin",
Expand All @@ -45,13 +40,11 @@
},
{
"groupName": "Fabric packages",
"matchUpdateTypes": ["minor", "patch", "bump", "digest"],
"matchPackageNames": ["office-ui-fabric-react"],
"matchPackagePrefixes": ["@uifabric/"]
},
{
"groupName": "Fabric packages",
"matchUpdateTypes": ["minor", "patch", "bump", "digest"],
"matchPackageNames": ["@fluentui/react"],
"matchCurrentVersion": "^7.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion groupJest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group and schedule jest, ts-jest, jest types, and related packages (except when initially pinning).",
"description": "Group and schedule jest, ts-jest, jest types, and related packages.",

"packageRules": [
{
Expand Down
2 changes: 1 addition & 1 deletion groupReact.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group React packages and types (except when initially pinning).",
"description": "Group React packages and types.",

"packageRules": [
{
Expand Down
5 changes: 2 additions & 3 deletions groupRollup.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group all rollup-related updates (except when initially pinning).",
"description": "Group all Rollup-related updates.",

"packageRules": [
{
"groupName": "rollup packages",
"matchPackagePrefixes": ["@rollup"],
"matchPackagePatterns": ["^rollup"],
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"]
"matchPackagePatterns": ["^rollup"]
}
]
}
5 changes: 2 additions & 3 deletions groupYargs.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",

"description": "Group yargs, yargs-parser, and their types (except when initially pinning).",
"description": "Group yargs, yargs-parser, and their types.",

"packageRules": [
{
"groupName": "yargs packages",
"matchPackageNames": ["yargs", "yargs-parser", "@types/yargs", "@types/yargs-parser"],
"matchUpdateTypes": ["major", "minor", "patch", "bump", "digest"]
"matchPackageNames": ["yargs", "yargs-parser", "@types/yargs", "@types/yargs-parser"]
}
]
}
Loading

0 comments on commit 9a9f133

Please sign in to comment.