Giter VIP home page Giter VIP logo

renovate-config's Introduction

Test

If keeping dependencies up to date is part of your job, then you have two options:

Option A

  1. Check if any of the dependencies are outdated.
  2. For each outdated dependency find out what changed, lookup its release notes, changelog, git diff.
  3. Create PRs, with the context for the team to review.
  4. Some PRs should be grouped together to reduce noise, so you don't have to review 100s of PRs.
  5. If you have lockfiles (yarn.lock, package-lock.json, etc) you'll likely have merge conflicts for every dependency PR you created.
  6. If on a monorepo dedupe lockfiles after merging all the PRs, to avoid nasty bugs as some libraries, like react, breaks if multiple instances of it exists within the same render.
  7. Rince and repeat.

Option B

  1. Have Renovatebot do all the steps in Option A.
  2. Ship.

Usage

  1. Install the Renovate, the easiest method is the GitHub App. Other alternatives are the Docker Image or Self-Hosting
  2. Make sure it has access to your repository, if it does you should see it open a PR with the title Configure Renovate on your repository.
  3. Create a renovate.json file in your repository root, on the default branch:
    {
      "$schema": "https://docs.renovatebot.com/renovate-schema.json",
      "extends": ["github>sanity-io/renovate-config"]
    }
  4. If you see Renovatebot opening an issue on your repo titled "Dependency Dashboard" then you're good to go. If you're using the official GitHub app it should only take a few minutes. But if it's self hosted it might take a bit longer.

The default preset, github>sanity-io/renovate-config, is a composition of the following presets:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "github>sanity-io/renovate-config:base",
    "github>sanity-io/renovate-config:branding",
    "github>sanity-io/renovate-config:security",
    "github>sanity-io/renovate-config:strategy",
    "github>sanity-io/renovate-config:labels",
    "github>sanity-io/renovate-config:node-lts",
    "github>sanity-io/renovate-config:schedule",
    "github>sanity-io/renovate-config:group-recommended",
    "github>sanity-io/renovate-config:group-non-major",
    "github>sanity-io/renovate-config:workarounds-esm",
    "github>sanity-io/renovate-config:dedupe"
  ]
}

If you're overall happy with the default behavior, but there's one or two presets you disagree with, you can use ignorePresets to disable them:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["github>sanity-io/renovate-config"],
  "ignorePresets": [
    "github>sanity-io/renovate-config:branding",
    "github>sanity-io/renovate-config:labels"
  ]
}

There's also a collection of presets you can choose to opt-in to:

[
  "github>sanity-io/renovate-config:automerge",
  "github>sanity-io/renovate-config:studio-v2",
  "github>sanity-io/renovate-config:studio-v3"
]

automerge should only be used if the repository is setup to require PR review approvals and passing tests before merging.

While studio-v2 and studio-v3 use presets that are handy if you're building a Sanity Studio in your project.

Scaling PR noise, gentler onboarding for large projects

Depending on the project, the default behavior might result in too much noise. Especially if it's a large monorepo, with many outdated dependencies, and many developers sending in PRs on a general basis. For such projects it's better to tweak the preset to use a more manual and granular mode:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "github>sanity-io/renovate-config",
    ":dependencyDashboardApproval"
  ],
  "ignorePresets": ["github>sanity-io/renovate-config:group-non-major"]
}

With this setup Renovatebot will only create PRs when a developer checks off a specific dependency update in the "Dependency Dashboard" issue. And by turning off group-non-major it'll show a more granular list over dependencies instead of creating a very large PR that groups every patch and minor update together. If you don't want any grouping but prefer each dependency to have its own PR you can add github>sanity-io/renovate-config:group-recommended to the ignorePresets array.

Scaling up momentum, when a project only cares about major updates

If a project have a small backlog of outdated dependencies, and have a good CI infra setup, you can reduce noise by grouping as many dependency updates in the same PR as possible:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["github>sanity-io/renovate-config"],
  "ignorePresets": ["github>sanity-io/renovate-config:group-recommended"],
  "packageRules": [
    {
      "automerge": true,
      "matchDepTypes": ["devDependencies"],
      "updateTypes": ["minor", "patch"]
    }
  ]
}

With this setup only major dependencies get their own PRs. And dev dependencies that aren't major are automerged.

renovate-config's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

renovate-config's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Using a curated preset maintained by


Sanity: The Composable Content Cloud

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(deps): lock file maintenance

Detected dependencies

github-actions
.github/workflows/create-node-pr.yml
  • actions/checkout v4
  • actions/setup-node v4
  • tibdex/github-app-token v2@3beb63f4bd073e61482598c45c71c1019b59b73a
  • peter-evans/create-pull-request v6@a4f52f8033a6168103c2538976c07b467e8163bc
.github/workflows/create-sort-pr.yml
  • actions/checkout v4
  • actions/setup-node v4
  • tibdex/github-app-token v2@3beb63f4bd073e61482598c45c71c1019b59b73a
  • peter-evans/create-pull-request v6@a4f52f8033a6168103c2538976c07b467e8163bc
.github/workflows/prettier.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • tibdex/github-app-token v2@3beb63f4bd073e61482598c45c71c1019b59b73a
  • peter-evans/create-pull-request v6@a4f52f8033a6168103c2538976c07b467e8163bc
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-node v4
npm
package.json
  • @types/sort-object-keys ^1.1.0
  • renovate ^37.227.1
  • sort-object-keys ^1.1.2
  • zx 7.2.3
  • prettier ^3.2.5
  • prettier-plugin-packagejson ^2.4.12

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: lockfileMaintenance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.