From 8081cc3c208ec07f4957dea2c9425be37f70f6ce Mon Sep 17 00:00:00 2001 From: James Pogran Date: Mon, 9 Dec 2024 12:02:39 -0500 Subject: [PATCH] Configure dependabot to update package.json and group dependency updates (#1908) * Change dependabot versioning strategy to increase-if-necessary Bump the versioning strategy to increase-if-necessary to allow for minor and patch updates to be automatically applied by Dependabot inside the package.json file. Our semantic version constraints are still respected with increase-if-necessary, but allows us to keep pace with libraries. See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#versioning-strategy for more information. This does introduce the possibility of breaking changes, as increase-if-necessary will update to a major version. However since all PRs require a review, we can catch these breaking changes before they become a problem. We can monitor this and adjust the strategy if necessary. Previously the versioning strategy was set to lockfile-only which only allowed for the exact version specified in the package-lock.json file to be updated. This was introduced in #721 with the intention of monitoring what was updated and then deciding if we would change the strategy. * Use dependabot groups to group development dependencies This adds groups to the dependabot configuration file for development dependencies. There are many reasons to group dependencies, but the reason focused on here is optimizing for PR review. Instead of a single PR per dependency, a single PR with all the updates for a group is created. This is especially useful for development dependencies, which are often updated frequently and in small increments. This can lead to a large number of PRs being created. By grouping these dependencies, the rebase-review-merge-repeat cycle is reduced. This commit introduces only groups for development dependacies in order to keep things simple. Likely we won't group production, but we can further refine the groups as needed. * changelog * format --- .changes/unreleased/INTERNAL-20241209-100936.yaml | 6 ++++++ .github/dependabot.yml | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/INTERNAL-20241209-100936.yaml diff --git a/.changes/unreleased/INTERNAL-20241209-100936.yaml b/.changes/unreleased/INTERNAL-20241209-100936.yaml new file mode 100644 index 0000000000..cad2c1c440 --- /dev/null +++ b/.changes/unreleased/INTERNAL-20241209-100936.yaml @@ -0,0 +1,6 @@ +kind: INTERNAL +body: Configure dependabot to update package.json and group dependency updates +time: 2024-12-09T10:09:36.876848-05:00 +custom: + Issue: "1908" + Repository: vscode-terraform diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a4cc8e4e43..62101d072f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,14 @@ version: 2 updates: - package-ecosystem: 'npm' - versioning-strategy: lockfile-only + versioning-strategy: increase-if-necessary directory: '/' schedule: interval: 'daily' labels: ['dependencies'] + groups: + development-dependencies: + dependency-type: 'development' ignore: - dependency-name: '@types/*' update-types: ['version-update:semver-minor', 'version-update:semver-patch']