From 5f11999564f3f372d20beca930d1c40415b99548 Mon Sep 17 00:00:00 2001 From: Elizabeth Craig Date: Mon, 1 May 2023 20:42:55 -0700 Subject: [PATCH 1/2] default: use rangeStrategy bump instead of replace for dependencies --- .changeset/young-doors-boil.md | 5 +++++ README.md | 6 +++--- default.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/young-doors-boil.md diff --git a/.changeset/young-doors-boil.md b/.changeset/young-doors-boil.md new file mode 100644 index 00000000..bcadaeb1 --- /dev/null +++ b/.changeset/young-doors-boil.md @@ -0,0 +1,5 @@ +--- +'@microsoft/m365-renovate-config': patch +--- + +**default**: Use "bump" instead of "replace" for `dependencies` diff --git a/README.md b/README.md index e987c211..6e969116 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ A [recent Renovate update](https://docs.renovatebot.com/release-notes-for-major- Since the lockfile-only updates are likely a good strategy for `devDependencies` in most repos, `m365-renovate-config`'s default preset (which supersedes `:libraryRecommended`) has been updated as follows: -- Use `rangeStrategy: "replace"` for `dependencies` (production) to reduce the chance of breaks for library consumers. +- Use `rangeStrategy: "bump"` for `dependencies` (production) to reduce the chance of breaks for library consumers. - Remove overrides (use `rangeStrategy: "auto"`) for other dependency types. Notes on pinning behavior: @@ -146,7 +146,7 @@ Recommended config which is intended to be appropriate for most projects. }, { "matchDepTypes": ["dependencies"], - "rangeStrategy": "replace" + "rangeStrategy": "bump" } ] } @@ -174,7 +174,7 @@ Extended presets from this repo: Overrides for dependency types: - For `devDependencies`: Use "devDependencies" in commit messages (instead of the default "dependencies") to be clearer about what is being modified -- For `dependencies`: set [`rangeStrategy: "replace"`](https://docs.renovatebot.com/configuration-options/#rangestrategy) to replace the semver range even if the new version is in range (instead of just updating the lockfile), e.g. `"foo": "^1.1.0"` is changed to `"foo": "^1.2.0"`. This is because minor dependency versions may introduce new APIs, and if a library starts using those APIs without updating the dep's semver range, it could break consumers. +- For `dependencies`: set [`rangeStrategy: "bump"`](https://docs.renovatebot.com/configuration-options/#rangestrategy) to replace the semver range even if the new version is in range (instead of just updating the lockfile), e.g. `"foo": "^1.1.0"` is changed to `"foo": "^1.2.0"`. This is because minor dependency versions may introduce new APIs, and if a library starts using those APIs without updating the dep's semver range, it could break consumers. Other settings: diff --git a/default.json b/default.json index d87f3edc..1914c8f6 100644 --- a/default.json +++ b/default.json @@ -28,7 +28,7 @@ }, { "matchDepTypes": ["dependencies"], - "rangeStrategy": "replace" + "rangeStrategy": "bump" } ] } From b65dddeb7772dd3e112c46342d98d0140f58091d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 2 May 2023 03:46:39 +0000 Subject: [PATCH 2/2] Bump version to 2.0.2 [skip ci] --- .changeset/young-doors-boil.md | 5 ----- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 .changeset/young-doors-boil.md diff --git a/.changeset/young-doors-boil.md b/.changeset/young-doors-boil.md deleted file mode 100644 index bcadaeb1..00000000 --- a/.changeset/young-doors-boil.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@microsoft/m365-renovate-config': patch ---- - -**default**: Use "bump" instead of "replace" for `dependencies` diff --git a/CHANGELOG.md b/CHANGELOG.md index d7964e59..af3a5828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # @microsoft/m365-renovate-config +## 2.0.2 + +[Compare source](https://github.com/microsoft/m365-renovate-config/compare/v2.0.1...v2.0.2) - May 1, 2023, 8:46 PM PDT + +### Patch Changes + +- [`5f11999`](https://github.com/microsoft/m365-renovate-config/commit/5f11999564f3f372d20beca930d1c40415b99548) - **default**: Use "bump" instead of "replace" for `dependencies` (Thanks [@ecraig12345](https://github.com/ecraig12345)!) + ## 2.0.1 [Compare source](https://github.com/microsoft/m365-renovate-config/compare/v2.0.0...v2.0.1) - May 1, 2023, 8:33 PM PDT diff --git a/package.json b/package.json index e7a0e1a2..0d6a6be0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@microsoft/m365-renovate-config", - "version": "2.0.1", + "version": "2.0.2", "private": true, "type": "module", "repository": {