Skip to content

Commit

Permalink
Merge branch 'main' into ci/test-node-v16
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Nov 12, 2021
2 parents dbd184c + 6732fce commit c2557f7
Show file tree
Hide file tree
Showing 281 changed files with 2,360 additions and 3,194 deletions.
25 changes: 16 additions & 9 deletions .eslintrc.js
Expand Up @@ -5,14 +5,13 @@ module.exports = {
},
plugins: ['@renovate'],
extends: [
'airbnb-typescript/base',
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:jest/style',
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/src/configs
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:promise/recommended',
Expand All @@ -34,15 +33,15 @@ module.exports = {
'import/named': 0,
'import/namespace': 0,
'import/no-named-as-default-member': 0,
'import/prefer-default-export': 0, // no benefit

// other rules
'import/prefer-default-export': 0, // no benefit
'no-restricted-syntax': 0,
'no-await-in-loop': 0,
'prefer-destructuring': 0,
'prefer-template': 0,
'no-underscore-dangle': 0,
'consistent-return': 'error',
eqeqeq: 'error',
'no-console': 'error',
'no-negated-condition': 'error',
'no-param-reassign': 'error',
'no-template-curly-in-string': 'error',
'sort-imports': [
'error',
{
Expand Down Expand Up @@ -95,14 +94,21 @@ module.exports = {
// TODO: fix me
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-argument': 0, // thousands of errors :-/

'@typescript-eslint/restrict-template-expressions': [
1,
{ allowNumber: true, allowBoolean: true },
],
'@typescript-eslint/restrict-plus-operands': 2,

'@typescript-eslint/naming-convention': 2,
'@typescript-eslint/naming-convention': [
2,
{
selector: 'enumMember',
format: ['PascalCase'],
},
],

'@typescript-eslint/unbound-method': 2,
'@typescript-eslint/ban-types': 2,
Expand All @@ -120,6 +126,7 @@ module.exports = {
jest: true,
},
rules: {
'no-template-curly-in-string': 0,
'prefer-destructuring': 0,
'prefer-promise-reject-errors': 0,
'import/no-dynamic-require': 0,
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Expand Up @@ -154,6 +154,7 @@ jobs:
yarn prettier
yarn markdown-lint
yarn git-check
yarn doc-fence-check
- name: Test schema
run: yarn test-schema
Expand Down
54 changes: 0 additions & 54 deletions data/extract.py

This file was deleted.

2 changes: 1 addition & 1 deletion data/node-js-schedule.json
Expand Up @@ -88,7 +88,7 @@
"lts": "2021-10-26",
"maintenance": "2022-10-18",
"end": "2024-04-30",
"codename": ""
"codename": "Gallium"
},
"v17": {
"start": "2021-10-19",
Expand Down
9 changes: 4 additions & 5 deletions docs/development/configuration.md
Expand Up @@ -53,11 +53,10 @@ If you add a `renovate.json` file to the root of your repository, you can use th
If you add configuration options to your `package.json` then these will override any other settings above.

```json
"renovate": {
"labels": [
"upgrade",
"bot"
]
{
"renovate": {
"labels": ["upgrade", "bot"]
}
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/development/local-development.md
Expand Up @@ -80,7 +80,7 @@ To ensure everything is working properly on your end, you must:
1. Verify all tests pass and have 100% test coverage, by running `yarn test`
1. Verify the installation by running `yarn start`. You must see this error: `You must configure a GitHub personal access token`

You only need to do these 5 steps this one time.
You only need to do these steps once.

Before you submit a pull request you should:

Expand Down Expand Up @@ -181,10 +181,10 @@ It's usually easier to have the logs in a file that you can open with a text edi
You can use a command like this to put the log messages in a file:

```
rm -f debug.log && yarn start myaccount/therepo --log-level=debug > debug.log
LOG_LEVEL=debug yarn start myaccount/therepo > debug.log
```

The example command will delete any existing `debug.log` and then save Renovate's output to a new `debug.log` file.
The example command will redirect/save Renovate's output to the `debug.log` file (and overwrite `debug.log` if it already exists).

### Adding configuration options

Expand Down
37 changes: 19 additions & 18 deletions docs/usage/config-presets.md
Expand Up @@ -128,28 +128,24 @@ You can find the Renovate team's preset configs at the "Config Presets" section
If you browse the "default" presets, you will see some that contain parameters, e.g.:

```json
"labels": {
"description": "Apply labels <code>{{arg0}}</code> and <code>{{arg1}}</code> to PRs",
"labels": [
"{{arg0}}",
"{{arg1}}"
]
},
"assignee": {
"description": "Assign PRs to <code>{{arg0}}</code>",
"assignees": [
"{{arg0}}"
]
},
{
"labels": {
"description": "Apply labels <code>{{arg0}}</code> and <code>{{arg1}}</code> to PRs",
"labels": ["{{arg0}}", "{{arg1}}"]
},
"assignee": {
"description": "Assign PRs to <code>{{arg0}}</code>",
"assignees": ["{{arg0}}"]
}
}
```

Here is how you would use these in your Renovate config:

```json
"extends": [
":labels(dependencies,devops)",
":assignee(rarkins)"
]
{
"extends": [":labels(dependencies,devops)", ":assignee(rarkins)"]
}
```

In short, the number of `{{argx}}` parameters in the definition is how many parameters you need to provide.
Expand All @@ -170,7 +166,9 @@ To host your preset config on GitHub:
- In other repos, reference it in an extends array like "github>owner/name", for example:

```json
{
"extends": ["github>rarkins/renovate-config"]
}
```

From then on Renovate will use the Renovate config from the preset repo's default branch.
Expand Down Expand Up @@ -259,7 +257,6 @@ For example:
{
"name": "renovate-config-fastcore",
"version": "0.0.1",
...
"renovate-config": {
"default": {
"extends": ["config:base", "schedule:nonOfficeHours"]
Expand All @@ -271,13 +268,17 @@ For example:
Then in each of your repositories you can add your Renovate config like:

```json
{
"extends": ["fastcore"]
}
```

Any repository including this config will then adopt the rules of the default `library` preset but schedule it on weeknights or weekends.

Note: if you prefer to publish using the namespace `@fastcore/renovate-config` then you would use the `@` prefix instead:

```json
{
"extends": ["@fastcore"]
}
```
14 changes: 11 additions & 3 deletions docs/usage/configuration-options.md
Expand Up @@ -1234,7 +1234,7 @@ See [Private npm module support](https://docs.renovatebot.com/getting-started/pr
## npmrcMerge

This option exists to provide flexibility about whether `npmrc` strings in config should override `.npmrc` files in the repo, or be merged with them.
In some situations you need the ability to force override `.npmrc` contents in a repo (`npmMerge=false`) while in others you might want to simply supplement the settings already in the `.npmrc` (`npmMerge=true`).
In some situations you need the ability to force override `.npmrc` contents in a repo (`npmrcMerge=false`) while in others you might want to simply supplement the settings already in the `.npmrc` (`npmrcMerge=true`).
A use case for the latter is if you are a Renovate bot admin and wish to provide a default token for `npmjs.org` without removing any other `.npmrc` settings which individual repositories have configured (such as scopes/registries).

If `false` (default), it means that defining `config.npmrc` will result in any `.npmrc` file in the repo being overridden and therefore its values ignored.
Expand Down Expand Up @@ -2218,7 +2218,7 @@ image: my.new.registry/aRepository/andImage:1.21-alpine
## registryUrls

Usually Renovate is able to either (a) use the default registries for a datasource, or (b) automatically detect during the manager extract phase which custom registries are in use.
In case there is a need to configure them manually, it can be done using this `registryUrls` field, typically using `packageUrls` like so:
In case there is a need to configure them manually, it can be done using this `registryUrls` field, typically using `packageRules` like so:

```json
{
Expand All @@ -2241,7 +2241,15 @@ By default, `renovate` will update to a version greater than `latest` only if th
## reviewers

Must be valid usernames.
If on GitHub and assigning a team to review, use the prefix `team:`, e.g. provide a value like `team:someteam`.

If on GitHub and assigning a team to review, you must use the prefix `team:` and add the _last part_ of the team name.
Say the full team name on GitHub is `@organization/foo`, then you'd set the config option like this:

```json
{
"reviewers": "team:foo"
}
```

## reviewersFromCodeOwners

Expand Down
4 changes: 3 additions & 1 deletion docs/usage/docker.md
Expand Up @@ -126,11 +126,13 @@ If you wish to override Docker settings for one particular type of manager, use
For example, to disable digest updates for Docker Compose only but leave them for other managers like `Dockerfile`, you would use this:

```json
{
"docker-compose": {
"digest": {
"enabled": false
}
}
}
```

The following configuration options are applicable to Docker:
Expand Down Expand Up @@ -227,7 +229,7 @@ To get access to the token a custom Renovate Docker image is needed that include
The Dockerfile to create such an image can look like this:

```Dockerfile
FROM renovate/renovate:28.20.0
FROM renovate/renovate:29.2.6
# Include the "Docker tip" which you can find here https://cloud.google.com/sdk/docs/install
# under "Installation" for "Debian/Ubuntu"
RUN ...
Expand Down
42 changes: 24 additions & 18 deletions docs/usage/faq.md
Expand Up @@ -180,38 +180,44 @@ Set the configuration option `labels` to an array of labels to use.
e.g.

```json
"packageRules": [
{
"matchPackageNames": ["abc"],
"assignees": ["importantreviewer"]
}
]
{
"packageRules": [
{
"matchPackageNames": ["abc"],
"assignees": ["importantreviewer"]
}
]
}
```

### Apply a rule, but only for packages starting with `abc`

Do the same as above, but instead of using `matchPackageNames`, use `matchPackagePatterns` and a regex:

```json
"packageRules": [
{
"matchPackagePatterns": "^abc",
"assignees": ["importantreviewer"]
}
]
{
"packageRules": [
{
"matchPackagePatterns": "^abc",
"assignees": ["importantreviewer"]
}
]
}
```

### Group all packages starting with `abc` together in one PR

As above, but apply a `groupName`:

```json
"packageRules": [
{
"matchPackagePatterns": "^abc",
"groupName": ["abc packages"]
}
]
{
"packageRules": [
{
"matchPackagePatterns": "^abc",
"groupName": ["abc packages"]
}
]
}
```

### Change the default values for branch name, commit message, PR title or PR description
Expand Down
2 changes: 2 additions & 0 deletions docs/usage/golang.md
Expand Up @@ -46,9 +46,11 @@ You can force Renovate to use a specific version of Go by setting a constraint.
As an example, say you want Renovate to use the latest patch version of the `1.16` Go binary, you'd put this in your Renovate config:

```json
{
"constraints": {
"go": "1.16"
}
}
```

We do not support patch level versions for the minimum `go` version.
Expand Down

0 comments on commit c2557f7

Please sign in to comment.