Configure dependabot to update package.json and group dependency updates #1908
+10
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This bumps 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 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.
This also 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 dependancies in order to keep things simple. Likely we won't group production, but we can further refine the groups as needed.