Skip to content

Commit

Permalink
Configure dependabot to update package.json and group dependency upda…
Browse files Browse the repository at this point in the history
…tes (#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
  • Loading branch information
jpogran authored Dec 9, 2024
1 parent 090b674 commit 8081cc3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/INTERNAL-20241209-100936.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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']
Expand Down

0 comments on commit 8081cc3

Please sign in to comment.