npm package: @nesvel/renovate-config
Description: Shared Renovate configuration for automated dependency updates in monorepos
Author: Nesvel
Latest version: 1.0.3

# @nesvel/renovate-config

Production-ready Renovate presets optimized for monorepos. Includes a balanced base preset and a strict preset.

## What you get

- Smart grouping for common ecosystems (TypeScript, ESLint, Jest, React, Next.js, NestJS, Vite, Turborepo)
- Sensible PR limits and weekly schedule
- 3-day stability window to avoid flaky releases (base)
- High-priority security updates
- Optional strict preset that disables all automerge and raises review requirements

## Install

If you plan to use a JavaScript config (recommended for flexibility), install the package:

```bash
pnpm add -D @nesvel/renovate-config
# or
npm i -D @nesvel/renovate-config
```

## Usage

You can configure Renovate via JSON or JavaScript. The easiest way to customize is using JavaScript.

### Option A — JavaScript config (recommended)

Create `renovate.config.js` (or `renovate-config.js`) in the repository root.

Use the balanced base preset:

```js
// renovate.config.js
module.exports = require('@nesvel/renovate-config').config;
```

Use the strict preset:

```js
// renovate.config.js
module.exports = require('@nesvel/renovate-config').strictConfig;
```

Extend and customize:

```js
// renovate.config.js
const { config } = require('@nesvel/renovate-config');

module.exports = {
  ...config,
  // Run on weekends instead of Monday mornings
  schedule: ['every weekend'],
  // Example: enable automerge for non-major prod deps
  packageRules: [
    ...(config.packageRules || []),
    {
      description: 'Automerge non-major prod deps',
      matchDepTypes: ['dependencies'],
      matchUpdateTypes: ['minor', 'patch'],
      automerge: true,
    },
  ],
};
```

### Option B — JSON config

Create `renovate.json` in the repository root and point to this package via JavaScript bridge, e.g.:

```json
{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["config:recommended"]
}
```

Then add a `renovate.config.js` next to it to import and merge the preset if you need custom logic. Plain JSON cannot import Node modules directly.

## Presets included

- Base (exported as `config`)
  - Weekly schedule: before 5 AM on Monday (UTC)
  - PR concurrency: 10 (5 per hour)
  - Stability days: 3
  - Security patches prioritized
  - Automerge disabled by default (devDependency minor/patch can be enabled via rules)
  - Rich grouping rules for major toolchains

- Strict (exported as `strictConfig`)
  - No automerge
  - Longer stability (7 days)
  - Lower PR limits (5 concurrent, 2 per hour)
  - Workspace packages updates disabled by default

## Example: monorepo setup

In a Turborepo-style monorepo, add at repository root:

```js
// renovate.config.js
const { config } = require('@nesvel/renovate-config');

module.exports = {
  ...config,
  ignorePaths: [
    '**/node_modules/**',
    '**/dist/**',
    '**/.turbo/**',
    '**/coverage/**',
  ],
};
```

## Troubleshooting

- Renovate runs in its own environment in CI. If you use `renovate.config.js`, ensure `@nesvel/renovate-config` is present in your repository `devDependencies` so CI can `npm/pnpm install` it.
- If Renovate ignores schedules, check your timezone (`timezone: 'UTC'` by default) and the actual CI runner time.
- If preset changes don’t apply, clear Renovate’s cache or re-run the job.

## License

MIT © Nesvel