Skip to content

Commit 4ca2b26

Browse files
committed
fix: add dependabot.yml to fix npm workspaces issues
Adds dependabot configuration to address npm workspace lockfile issues that caused PR #3021 to fail. The root cause was Dependabot trying to update the same package (glob) to different major versions across workspace directories, creating an inconsistent package-lock.json that fails `npm ci`. Key changes: - Configure npm updates from root directory only (per issue #6346) - Use versioning-strategy: increase for consistent lockfile updates - Explicitly configure security update grouping via applies-to See: - dependabot/dependabot-core#6346 - dependabot/dependabot-core#7157
1 parent 78e0088 commit 4ca2b26

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: 2
2+
updates:
3+
# npm workspaces monorepo - manage from root only
4+
# See: https://github.com/dependabot/dependabot-core/issues/6346
5+
# Dependabot has issues updating package-lock.json when configured
6+
# for individual workspace directories. Using root directory ensures
7+
# consistent lockfile updates across all workspaces.
8+
- package-ecosystem: "npm"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
# Use 'increase' strategy to ensure both package.json and package-lock.json
13+
# are updated consistently
14+
versioning-strategy: increase
15+
groups:
16+
# Group version updates (minor/patch only for safety)
17+
npm-dependencies:
18+
patterns:
19+
- "*"
20+
update-types:
21+
- "minor"
22+
- "patch"
23+
# Explicitly configure security updates grouping
24+
# This ensures security updates are handled from the root directory
25+
# to avoid npm workspace hoisting issues when different workspaces
26+
# need different major versions of the same package
27+
npm-security:
28+
applies-to: security-updates
29+
patterns:
30+
- "*"
31+
32+
# Python packages
33+
- package-ecosystem: "pip"
34+
directory: "/src/fetch"
35+
schedule:
36+
interval: "weekly"
37+
38+
- package-ecosystem: "pip"
39+
directory: "/src/git"
40+
schedule:
41+
interval: "weekly"
42+
43+
- package-ecosystem: "pip"
44+
directory: "/src/time"
45+
schedule:
46+
interval: "weekly"
47+
48+
# GitHub Actions
49+
- package-ecosystem: "github-actions"
50+
directory: "/"
51+
schedule:
52+
interval: "weekly"
53+
groups:
54+
github-actions:
55+
patterns:
56+
- "*"

0 commit comments

Comments
 (0)