Skip to content

Commit 164f41b

Browse files
committed
Dependabot config
1 parent a411917 commit 164f41b

File tree

2 files changed

+127
-0
lines changed

2 files changed

+127
-0
lines changed

.github/dependabot.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Dependabot configuration
2+
# - Only security updates (version updates disabled via open-pull-requests-limit: 0)
3+
# - Dependencies grouped within each ecosystem/directory
4+
# - 3-day minimum release age for new versions (so they can't be unpublished in NPM)
5+
#
6+
# Note: For pnpm workspaces (root /), all workspace packages are updated together.
7+
# Separate directories with their own lock files get separate PRs.
8+
9+
version: 2
10+
11+
updates:
12+
# NPM/PNPM packages - root workspace (covers packages/react-on-rails, etc.)
13+
- package-ecosystem: "npm"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
# Disable version update PRs - only security updates will be created
18+
open-pull-requests-limit: 0
19+
minimum-release-age: 3
20+
groups:
21+
npm-security:
22+
applies-to: security-updates
23+
patterns:
24+
- "*"
25+
26+
# Generator dummy app (uses yarn, separate from main workspace)
27+
- package-ecosystem: "npm"
28+
directory: "/spec/react_on_rails/dummy-for-generators"
29+
schedule:
30+
interval: "weekly"
31+
open-pull-requests-limit: 0
32+
minimum-release-age: 3
33+
groups:
34+
npm-security:
35+
applies-to: security-updates
36+
patterns:
37+
- "*"
38+
39+
# Ruby gems - Open source gem
40+
- package-ecosystem: "bundler"
41+
directory: "/react_on_rails"
42+
schedule:
43+
interval: "weekly"
44+
open-pull-requests-limit: 0
45+
minimum-release-age: 3
46+
groups:
47+
bundler-security:
48+
applies-to: security-updates
49+
patterns:
50+
- "*"
51+
52+
# Ruby gems - Pro gem
53+
- package-ecosystem: "bundler"
54+
directory: "/react_on_rails_pro"
55+
schedule:
56+
interval: "weekly"
57+
open-pull-requests-limit: 0
58+
minimum-release-age: 3
59+
groups:
60+
bundler-security:
61+
applies-to: security-updates
62+
patterns:
63+
- "*"
64+
65+
# GitHub Actions
66+
- package-ecosystem: "github-actions"
67+
directory: "/"
68+
schedule:
69+
interval: "weekly"
70+
open-pull-requests-limit: 0
71+
minimum-release-age: 3
72+
groups:
73+
actions-security:
74+
applies-to: security-updates
75+
patterns:
76+
- "*"

docs/MONOREPO_MERGER_PLAN.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ After the initial merge, the following CI adjustments may be needed:
476476
- [ ] Remove empty `react_on_rails_pro/` directory
477477
- [ ] Update all require paths in Ruby code
478478
- [ ] Update gemspec file paths and dependencies
479+
- [ ] **Update `.github/dependabot.yml`** to reflect final directory structure:
480+
- Remove `/react_on_rails_pro` bundler entry (directory no longer exists)
481+
- Update bundler directory from `/react_on_rails` to `/` (root now has both gemspecs)
479482

480483
**License Compliance:**
481484

@@ -660,10 +663,12 @@ After the initial merge, the following CI adjustments may be needed:
660663
### Critical License Rules
661664

662665
1. **Directory Classification:**
666+
663667
- **MIT Licensed:** `lib/react_on_rails/` (including specs), `packages/react-on-rails/` (including tests)
664668
- **Pro Licensed:** All directories explicitly listed in LICENSE.md under "React on Rails Pro License"
665669

666670
2. **LICENSE.md Updates:**
671+
667672
- Must be updated whenever pro directories are moved or renamed
668673
- Must accurately reflect current directory structure
669674
- Pro directories must be explicitly listed
@@ -741,6 +746,52 @@ license-compliance:
741746
run: ruby script/check-license-compliance.rb
742747
```
743748
749+
## Configuration Files
750+
751+
When directories are moved or renamed during the merger, the following configuration files must be updated to reflect the new structure:
752+
753+
| File | What to Update |
754+
| ------------------------ | ----------------------------------------------- |
755+
| `.github/dependabot.yml` | `directory:` entries for bundler/npm ecosystems |
756+
| `.rubocop.yml` | Exclusion patterns |
757+
| `eslint.config.ts` | Ignore patterns |
758+
| `.prettierignore` | Ignored directories |
759+
| `knip.ts` | Ignore patterns |
760+
761+
### Dependabot Configuration
762+
763+
The `.github/dependabot.yml` file configures automated security updates. It must be kept in sync with the repository structure.
764+
765+
**Current Configuration (Pre-Phase 6):**
766+
767+
```yaml
768+
# Bundler entries
769+
- directory: '/react_on_rails' # Open source gem
770+
- directory: '/react_on_rails_pro' # Pro gem
771+
772+
# NPM entries
773+
- directory: '/' # Root pnpm workspace
774+
- directory: '/spec/react_on_rails/dummy-for-generators' # Yarn-based generator dummy
775+
```
776+
777+
**Final Configuration (Post-Phase 6):**
778+
779+
```yaml
780+
# Bundler entries
781+
- directory: '/' # Root now contains both gemspecs
782+
783+
# NPM entries (unchanged)
784+
- directory: '/'
785+
- directory: '/spec/react_on_rails/dummy-for-generators'
786+
```
787+
788+
**When to Update dependabot.yml:**
789+
790+
- When Gemfile locations change
791+
- When package.json files are added/moved/removed
792+
- When new workspaces are added
793+
- When directories containing lock files are restructured
794+
744795
## Risk Management
745796

746797
### High-Risk Phases

0 commit comments

Comments
 (0)