Code Monkey home page Code Monkey logo

presets's Introduction

Renovate Presets

Deprecation Warning

This repository is no longer used to host/publish Renovate's built-in presets. They are instead included within the main Renovate repository: https://github.com/renovatebot/renovate/tree/master/lib/config/presets/internal

Old Content

This repository hosts all of Renovate's "built-in" presets. Renovate pulls from this repo's master branch at runtime whenever a config references presets with any of the following prefixes:

  • None: e.g. :preserveSemverRanges
  • Default: e.g. default:preserveSemverRanges (None is an alias to Default)
  • Docker: e.g. docker:disable
  • Group: e.g. group:monorepos
  • Helpers: e.g. helpers:followTypescriptNext
  • Monorepo: e.g. monorepo:angular
  • Packages: e.g. packages:apollographql
  • Preview: e.g. preview:buildkite
  • Schedule: e.g. schedule:daily

Contributing

  1. Fork and clone the repository
  2. Edit one or more files in src/. Be sure to include the description field if relevant.
  3. Run yarn build then yarn test
  4. Commit your changes including presets.json, push to GitHub, and raise a PR

Once PRs are committed to master, they are effectively "live" - there is no publish step.

Examples

If you have identified a "monorepo" that's missing, add it to src/monorepo.js. A monorepo definition as well as a group will be automatically added by yarn build.

If there is some other non-monorepo group of packages you think should be updated together, then you can contribute them directly to src/group.js.

If you think there is any config you repeat frequently that others could benefit from, add it to src/default.js.

presets's People

Contributors

aghassi avatar ajafff avatar astorije avatar bmish avatar daern91 avatar dotansimha avatar edmorley avatar emilio-martinez avatar ikatyang avatar ikesyo avatar mastermatt avatar monochromata avatar pvinis avatar rarkins avatar rdela avatar renovate-bot avatar renovate[bot] avatar sidharthachatterjee avatar simonkberg avatar singapore avatar sjparkinson avatar skaronator avatar tanem avatar tmack8001 avatar tom-sherman avatar tomkerkhove avatar viceice avatar whtsky avatar ykzts avatar zaubernerd avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

presets's Issues

Action Required: Fix Renovate Configuration

I just received this issue from renovate on one repo where I have it enabled:

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.

Error type: Preset name not found within published preset config (monorepo:babel6). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

I don't have any custom preset configuration in my config, so I assume that something broke in Renovate presets. Any idea?

RENOVATE_NPMRC

A follow up to mend/renovate-ce-ee#11

I am setting RENOVATE_NPMRC to registry=http://artifactory.example.com/artifactory/api/npm/npm/\n@scope:registry=http://artifactory.example.com/artifactory/api/npm/npm-scope/

Renovate seems to get the registry configuration value correctly, but the @scope:registry property is not set. Therefore, all requests for @scope packages are failing.

I thought, based on another issue I saw, that the newline would allow Renovate to correctly re-create the .npmrc file when it contains two more or more lines.

Arcus monorepo not respected

With #181 I've introduced mono repos for Arcus but it turns out I've probably misconfigured them given they are not respected.

Based on https://github.com/renovatebot/presets/blob/master/packages/renovate-config-monorepo/generate.js#L12 I would expect all of the packages from there to be updated in parallel.

However, multiple of them are opened:
image

We don't use that extensive configuration : https://github.com/arcus-azure/arcus.templates/blob/master/renovate.json#L10

/cc @stijnmoreels

Micro package preset

Based on our earlier discussion. :)

I'd like to put up a config preset for small focused package, aka micro packages. What defines these packages is that they don't need much maintenance and only have a few dependencies. This translates to no version pinning, grouping of all dependencies and a monthly schedule:

{
  "pinVersions": false,
  "groupName": "all",
  "schedule": ["before 8am on the first day of the month"],
  "lockFileMaintenance": {
    "schedule": ["before 8am on the first day of the month"]
  }
}

Instead of opening a PR I'm opening this issue because I'm not sure where to put such a config in the current directory structure. Correct me if I'm wrong, no directory/category seems to fit the above unless split.

Create a group for Semantic Release

It's not a monorepo, but there are parts of it that are loosely coupled.

https://github.com/semantic-release

So for example the @semantic-release/git type is tied to the normal semantic-release dependency. Ideally, group anyting with "semantic-release` in the name into a single PR as they probably need to move together anyway.

JSON Schema for validating configs

would love to have a JSON schema (as an npm package) to use for validating our custom config as part of our build and release process.

the npm package should just expose the JSON schema itself, and users can adopt any JSON Schema testing tool to run the validation

Prod dependencies unexpectedly pinned

Hey, I've just noticed that the production dependencies got pinned for some of our repos.

The renovate config for one of those repositories is:

{
  "extends": [
    "@ht2-labs:base"
  ]
}

That config extends our base config which is this:

{
  "extends": [
    ":library"
  ],
  "automerge": true,
  "automergeType": "branch-push",
  "major": {
    "automerge": false
  }
}

I've noticed that the :library config appears to be deprecated in here, so I'm guessing I need to change to the config:js-lib config, however, the :library config does currently extend the config:js-lib so I'm not sure if that's going to work. I will try that anyway when I get a minute, I think I'll also need to manually unpin the pinned prod dependencies so it might take a little while.

@fortawesome group

I'd like to configure my repos to update @fortawesome dependencies in bulk, but I'm struggling to understand how to make it happen. Can someone show me how this is supposed to work?

My dependencies are:

"@fortawesome/angular-fontawesome": "0.1.0-7",
"@fortawesome/fontawesome-free-brands": "5.0.10",
"@fortawesome/fontawesome-pro-light": "5.0.10",
"@fortawesome/fontawesome-pro-regular": "5.0.10",
"@fortawesome/fontawesome-pro-solid": "5.0.10",
"@fortawesome/fontawesome-svg-core": "1.2.0-11",

Thanks!

Private NPM packages showing warnings in on boarding PR

I've tried to add an NPM token following the instructions "Add an encrypted npm token to repository" however my onboarding PR is still giving me warnings about private packages e.g. @trussle/package-name.

Is this incorrectly configured or does the onboarding PR not clear these warnings? I've tried issuing other tokens and using the encode the .npmrc file options also, but still see the warning message in the onboarding PR.

renovate.json

{
  "extends": ["config:base"],
  "minor": {
    "groupName": "minor"
  },
  "docker": { "enabled": false },
  "encrypted": {
  "npmToken":  ""
  }
}

graphql-code-generator does not pick up packages from monorepo correctly

Current entry:

    "graphqlcodegenerator": {
      "description": "graphqlcodegenerator monorepo",
      "packageNames": [
        "graphql-code-generator",
        "graphql-codegen-core"
      ]
    },

It only picks up the 2 packages from the top level of packages, not the ones in packages/*/*/package.json (like all the packages in https://github.com/dotansimha/graphql-code-generator/tree/master/packages/plugins)

The entry was added in #45.

I tried to put together a PR, but I'm not sure how to provide pattern it should glob? Looking at the code, it seems I can just provide a single string path

Semantic commit mode auto-detection problem

In our initial PR (mozilla/treeherder#3025), the example commit messages contain the fix(deps) prefixes, even though we don't use semantic commits. This was initially confusing, since looking at the config docs, the default for semanticCommits is null (from here) which is auto-detect, which presumably should have turned off the prefixes for us.

I'm guessing that since the PR is using config:base, the included :semanticPrefixFixDepsChoreOthers preset is overriding the auto-detect behaviour to always enable semantic commit messages?

Presuming that's the case:

  1. Should config:base instead maintain the auto-detect behaviour?
  2. Is there a simple way to override the current config:base usage of :semanticPrefixFixDepsChoreOthers? Looking at the source (here) it seems I'd have to override x4 (one for each of dep/devDeps/...)

Many thanks :-)

Add groupings for Java Spring monorepo

Spring is a Java framework available through Maven Central on Maven and Gradle.
https://github.com/spring-projects/spring-framework
https://mvnrepository.com/artifact/org.springframework

Spring has several groupings

name group example
Spring Core org.springframework org.springframework:spring-context
Spring Security org.springframework.security org.springframework.security:spring-security-web
Spring LDAP org.springframework.ldap org.springframework.ldap:spring-ldap-core
Spring Boot org.springframework.boot org.springframework.boot:spring-boot-actuator
Spring Data org.springframework.data org.springframework.data:spring-data-cassandra
Spring Social org.springframework.social org.springframework.social:spring-social-twitter
Spring Integration org.springframework.integration org.springframework.integration:spring-integration-test

Unable To Generate MonoRepo Configurations

When attempting to generate the source for monorepo configuration I get the following error:

node generate
internal/modules/cjs/loader.js:628
    throw err;
    ^

Error: Cannot find module '@sindresorhus/is'
Require stack:
- .../renovatebot/presets/packages/renovate-config-monorepo/generate.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (.../renovatebot/presets/packages/renovate-config-monorepo/generate.js:1:12)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:839:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '.../renovatebot/presets/packages/renovate-config-monorepo/generate.js'
  ]
}

Not the only user getting this error as @tomkerkhove also reported it here, #169

Use depTypeList

Remove direct references to dependencies, devDependencies and peerDependencies

Add grouping for angular.js monorepo

Migrate presets separateMajorReleases and separatePatchReleases

The following config options were renamed in renovatebot/renovate#1952

  • multipleMajorPrs => separateMultipleMajor (false)
  • separateMajorReleases => separateMajorMinor (true)
  • separatePatchReleases => separateMinorPatch (false)

It looks like the default preset has not been updated and still sets the old config option names:

The Documentation has been updated to reference only the new config options:
https://renovatebot.com/docs/configuration-options/#separatemajorminor

I am not entirely sure that I understand how this is working, but it seems that the presets need to be migrated to the new config name. If yes, how do you prefer to migrate this change?

I see the following options:

A

  • Rename the preset to match the new config names separateMajorMinor, separateMinorPatch, and change the config option to match
  • Change renovate-config-base to reference the new preset names
  • This will break anyone who’s directly referencing the old preset names

B

  • Add a new preset with the new config names separateMajorMinor, separateMinorPatch and matching config options
  • Leave the old preset names separateMajorReleases and separatePatchReleases in place, and change the config options set to separateMajorMinor and separateMinorPatch, to not break people referencing them directly

Thanks!

Configure different emoji depending on commitMessageAction

Which Renovate are you using? CLI, App, or Pro

Looking forward to use Renovate App, but not yet merged the first PR.

Which platform are you using? GitHub, GitLab, Bitbucket Azure DevOps

GitHub organization with public repositories in becoming.

Have you checked the logs? Don't forget to include them if relevant

Not yet, as I haven't installed it yet.

Context

So, I'm currently creating a Yeoman opinionated project to handle scaffolding and syncing config files, carrying redundant tasks on my behalf across all the future repositories.

I first wired Greenkeeper to benefit from dependencies PR updates, but looking at your project it looks very interesting.

I planned to use Travis and Renovate to build CI/CD automation.

What is your question?

I currently use Gitmoji based semantic release, which I enjoy a lot more than classic semantic conventions.

To be able to do so, I use semantic-release / semantic-release-gitmoji / commitlint / commitlint-config-gitmoji / some other projects on top of which I setup custom configurations.

Sample can be found here, README isn't complete yet though.

All my automated semantic releases rely on a commit template like so :

:emoji: Some title

Facultative message body

Facultative extras like : #1

Finally my question is easy : can I for example setup commitMessagePrefix depending on commitMessageAction that :

  • Update add :arrow_up: prefix to the title
  • Pin add :pushpin: prefix to the title
  • Roll back add :arrow_down: prefix to the title
    ... and so on ?

Thanks in advance ^^

Validation Error

I have Renovate configuration package with a package.json file that contains the following configuration section:

{
  "renovate-config": {
    "default": {
      "extends": [
        "config:base"
      ]
    }
  }
}

When I run yarn renovate-config-validator I get the following error:

yarn run v1.5.1

Validating renovate.json
renovate.json is not valid JSON
Validating package.json > renovate-config
error An unexpected error occurred: "Command failed.
Exit code: 1

I went as far as having an package.json file with just the renovate-config section, but I still get the same error.

I can confirm that I started getting the validation error with version 11.40.0. though I still receive the error in Renovate 11.44.1.

Add groupings for Java Hibernate monorepo

Hibernate is a Java framework available through Maven Central on Maven and Gradle.
http://hibernate.org
https://mvnrepository.com/artifact/org.hibernate

Hibernate has several groupings

name group example
Hibernate Core org.hibernate org.hibernate:hibernate-tools
Hibernate Validator org.hibernate.validator org.hibernate.validator:hibernate-validator-osgi
Hibernate OGM org.hibernate.ogm org.hibernate.ogm:hibernate-ogm-mongodb
Hibernate Commons org.hibernate.common org.hibernate.common:hibernate-commons-annotations

Show: Grouping of unit test related javascript dependencies

I created a preset of my own to enable me to group unit test related packages just like linter-packages can be grouped through the official presets.

The configuration can be found here: https://github.com/voxpelli/renovate-config-voxpelli/blob/master/package.json

An example of a PR can be found here: voxpelli/node-jekyll-utils#13

I have made no attempt to list all unit test related javascript packages, but rather listed the one I know I use across my projects

Update: Feel free to include these among the other official groups you have in here if you like πŸ™‚

Add a lintersNonMajor group?

Major linter upgrades almost always break builds, but non-major ones should almost never do it.

Having a linters group limited to non-majors, like the testNonMajor, would be neat πŸ‘

(Btw: Apart from my personal testing of your GitHub app, we're also trialing it internally at @Sydsvenskan now – works nicely so far πŸŽ‰)

The includeNodeModules preset also clears bower_components

The preset sets ignorePaths to an empty array, which means both of the default elements ([β€˜/node_modules/’, β€˜/bower_components/’]) are removed, rather than just node_modules:
https://renovateapp.com/docs/configuration-reference/configuration-options#ignorepaths
https://github.com/singapore/renovate-config/blob/1ad87fa442859eea25768a751e5ca3e93692f59d/packages/renovate-config-default/package.json#L24-L27

Perhaps the simplest way to solve this is just to change the preset description to clarify it affects both?

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.

File: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid regExp for packageRules[0].packagePatterns: eslint,prettier``

Add socket.io monorepo

socket.io and socket.io-client would be main offenders, they share version number and release at the same time. I'm unsure if other socket.io repos can also apply.

Schedule every two weeks

Is it possible to define custom schedule by defining a custom interval for the updates? We're currently using after 9pm on sunday, so would something like after 9pm every second sunday work?

Invalid configuration option: combinePatchMinorReleases

I've tried setting up one of our larger services today to use renovate. Using the config:base option we'd end up with ~35 initial PRs so I was looking to tweak the settings to create larger PRs that group minors and patch versions.

Looking over the configuration I decided on the following;

{
  "extends": ["config:base"],
  "combinePatchMinorReleases": true,
  "separatePatchReleases": false,
  "encrypted": {
    "npmrc":
      ""
  }
}

Renovate now gives me the following error;

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.

File: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: combinePatchMinorReleases

Once you have resolved this problem (in this onboarding branch), Renovate will return to providing you with a preview of your repository's configuration.

Based on the documentation I could see these options have the potential to conflict.

  • combinePatchMinorReleases: "Combine any patch and minor upgrades together into same branch/PR"
    -separatePatchReleases : "Separate patch and minor releases of dependencies into separate PRs"

Whats the best way to resolve this? Ideally, I think I'd like all the patch/minor updates in one PR and then majors one per dependency. This is probably less ideal long term but initially we're going to have a lot of PRs to process otherwise.

Add group for .NET Core / ASP.Net Core Docker containers

Microsoft is using a variety of Docker images on which .NET Core & ASP.NET Core applications depend, such as mcr.microsoft.com/dotnet/core/sdk & mcr.microsoft.com/dotnet/core/aspnet.

For Promitor I depend on those and receive update PRs, but they are seperated (example: tomkerkhove/promitor#831 & tomkerkhove/promitor#832) which is not ideal so I'd like to group them so that the CI works.

I'm looking to open a PR for adding this and was wondering if monorepo Docker images should also end up in https://github.com/renovatebot/presets/blob/master/packages/renovate-config-monorepo or if there are better ways to do this?

Rename repo

It’s too confusing with the config-help one. I suggest calling it β€œpresets”.

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.