Skip to content

Commit 13e70d0

Browse files
authored
Merge branch 'main' into renovate/typescript-4.x
2 parents 1906391 + 1eee2a4 commit 13e70d0

File tree

86 files changed

+3614
-703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3614
-703
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM containerbase/node:14.20.1@sha256:69979186fe785db329e04387b150a4853bda79653a452724384268b814cfd47c
1+
FROM containerbase/node:14.20.1@sha256:769f1bf127b2c180241cdf2c3cc3726972b7df3fa74bee42cf935cc4271b656c
22

33
USER root
44

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
NODE_VERSION: ${{ matrix.node-version }}
5555

5656
steps:
57-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
57+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
5858
with:
5959
fetch-depth: 2
6060

@@ -100,7 +100,7 @@ jobs:
100100
timeout-minutes: 15
101101

102102
steps:
103-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
103+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
104104
with:
105105
fetch-depth: 2
106106

@@ -143,7 +143,7 @@ jobs:
143143

144144
release:
145145
needs: [lint, test]
146-
if: github.event_name != 'pull_request'
146+
if: github.repository == 'renovatebot/renovate' && github.event_name != 'pull_request'
147147
runs-on: ubuntu-latest
148148
# release shouldn't need more than 5 min
149149
timeout-minutes: 15
@@ -154,7 +154,7 @@ jobs:
154154

155155
steps:
156156
# full checkout for semantic-release
157-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
157+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
158158
with:
159159
fetch-depth: 0
160160

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222

2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
25+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
2626

2727
- name: Delete fixtures to suppress false positives
2828
run: |
2929
find ./lib -type d -name '__fixtures__' -exec rm -rf {} \; || true
3030
3131
# Initializes the CodeQL tools for scanning.
3232
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # tag=v2.1.26
33+
uses: github/codeql-action/init@807578363a7869ca324a79039e6db9c843e0e100 # tag=v2.1.27
3434
with:
3535
languages: javascript
3636

@@ -40,7 +40,7 @@ jobs:
4040
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4141
# If this step fails, then you should remove it and run the build manually (see below)
4242
- name: Autobuild
43-
uses: github/codeql-action/autobuild@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # tag=v2.1.26
43+
uses: github/codeql-action/autobuild@807578363a7869ca324a79039e6db9c843e0e100 # tag=v2.1.27
4444

4545
# ℹ️ Command-line programs to run using the OS shell.
4646
# 📚 https://git.io/JvXDl
@@ -54,4 +54,4 @@ jobs:
5454
# make release
5555

5656
- name: Perform CodeQL Analysis
57-
uses: github/codeql-action/analyze@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # tag=v2.1.26
57+
uses: github/codeql-action/analyze@807578363a7869ca324a79039e6db9c843e0e100 # tag=v2.1.27

.github/workflows/dependency-review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: 'Checkout Repository'
12-
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
12+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
1313

1414
- name: 'Dependency Review'
1515
uses: actions/dependency-review-action@375c5370086bfff256c37f8beec0f437e2e72ae1 # tag=v2.4.0

.github/workflows/release-npm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
echo "NPM_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
3939
fi
4040
41-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
41+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
4242
with:
4343
ref: ${{ env.GIT_SHA }}
4444

.github/workflows/update-data.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
update-data:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
18+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
1919

2020
- name: Set up Node.js ${{ env.NODE_VERSION }}
2121
uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # tag=v3.5.0

.github/workflows/ws_scan.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
WS_SCAN:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
14+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
1515

1616
- name: Download UA
1717
run: curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar

data/kubernetes-api.json5

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-16
3+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#networkpolicy-v116
4+
NetworkPolicy: ['extensions/v1beta1', 'networking.k8s.io/v1'],
5+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#daemonset-v116
6+
DaemonSet: ['extensions/v1beta1', 'apps/v1beta2', 'apps/v1'],
7+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#deployment-v116
8+
Deployment: ['extensions/v1beta1', 'apps/v1beta1', 'apps/v1beta2', 'apps/v1'],
9+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#statefulset-v116
10+
StatefulSet: ['apps/v1beta1', 'apps/v1beta2', 'apps/v1'],
11+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#replicaset-v116
12+
ReplicaSet: ['extensions/v1beta1', 'apps/v1beta1', 'apps/v1beta2', 'apps/v1'],
13+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#psp-v116
14+
PodSecurityPolicy: ['extensions/v1beta1', 'policy/v1beta1'],
15+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22
16+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#webhook-resources-v122
17+
MutatingWebhookConfiguration: [
18+
'admissionregistration.k8s.io/v1beta1',
19+
'admissionregistration.k8s.io/v1',
20+
],
21+
ValidatingWebhookConfiguration: [
22+
'admissionregistration.k8s.io/v1beta1',
23+
'admissionregistration.k8s.io/v1',
24+
],
25+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122
26+
CustomResourceDefinition: [
27+
'apiextensions.k8s.io/v1beta1',
28+
'apiextensions.k8s.io/v1',
29+
],
30+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#apiservice-v122
31+
APIService: ['apiregistration.k8s.io/v1beta1', 'apiregistration.k8s.io/v1'],
32+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#tokenreview-v122
33+
TokenReview: ['authentication.k8s.io/v1beta1', 'authentication.k8s.io/v1'],
34+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#subjectaccessreview-resources-v122
35+
LocalSubjectAccessReview: [
36+
'authorization.k8s.io/v1beta1',
37+
'authorization.k8s.io/v1',
38+
],
39+
SelfSubjectAccessReview: [
40+
'authorization.k8s.io/v1beta1',
41+
'authorization.k8s.io/v1',
42+
],
43+
SubjectAccessReview: [
44+
'authorization.k8s.io/v1beta1',
45+
'authorization.k8s.io/v1',
46+
],
47+
SelfSubjectRulesReview: [
48+
'authorization.k8s.io/v1beta1',
49+
'authorization.k8s.io/v1',
50+
],
51+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#certificatesigningrequest-v122
52+
CertificateSigningRequest: [
53+
'certificates.k8s.io/v1beta1',
54+
'certificates.k8s.io/v1',
55+
],
56+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#lease-v122
57+
Lease: ['coordination.k8s.io/v1beta1', 'coordination.k8s.io/v1'],
58+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122
59+
Ingress: [
60+
'extensions/v1beta1',
61+
'networking.k8s.io/v1beta1',
62+
'networking.k8s.io/v1',
63+
],
64+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingressclass-v122
65+
IngressClass: ['networking.k8s.io/v1beta1', 'networking.k8s.io/v1'],
66+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#rbac-resources-v122
67+
ClusterRole: [
68+
'rbac.authorization.k8s.io/v1beta1',
69+
'rbac.authorization.k8s.io/v1',
70+
],
71+
ClusterRoleBinding: [
72+
'rbac.authorization.k8s.io/v1beta1',
73+
'rbac.authorization.k8s.io/v1',
74+
],
75+
Role: ['rbac.authorization.k8s.io/v1beta1', 'rbac.authorization.k8s.io/v1'],
76+
RoleBinding: [
77+
'rbac.authorization.k8s.io/v1beta1',
78+
'rbac.authorization.k8s.io/v1',
79+
],
80+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#priorityclass-v122
81+
PriorityClass: ['scheduling.k8s.io/v1beta1', 'scheduling.k8s.io/v1'],
82+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#storage-resources-v122
83+
CSIDriver: ['storage.k8s.io/v1beta1', 'storage.k8s.io/v1'],
84+
CSINode: ['storage.k8s.io/v1beta1', 'storage.k8s.io/v1'],
85+
StorageClass: ['storage.k8s.io/v1beta1', 'storage.k8s.io/v1'],
86+
VolumeAttachment: ['storage.k8s.io/v1beta1', 'storage.k8s.io/v1'],
87+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25
88+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125
89+
CronJob: ['batch/v1beta1', 'batch/v1'],
90+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#endpointslice-v125
91+
EndpointSlice: ['discovery.k8s.io/v1beta1', 'discovery.k8s.io/v1'],
92+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#event-v125
93+
Event: ['events.k8s.io/v1beta1', 'events.k8s.io/v1'],
94+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#horizontalpodautoscaler-v125
95+
HorizontalPodAutoscaler: ['autoscaling/v2beta1', 'autoscaling/v2'],
96+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#poddisruptionbudget-v125
97+
PodDisruptionBudget: ['policy/v1beta1', 'policy/v1'],
98+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#runtimeclass-v125
99+
RuntimeClass: ['node.k8s.io/v1beta1', 'node.k8s.io/v1'],
100+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-26
101+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#flowcontrol-resources-v126
102+
FlowSchema: [
103+
'flowcontrol.apiserver.k8s.io/v1beta1',
104+
'flowcontrol.apiserver.k8s.io/v1beta2',
105+
],
106+
PriorityLevelConfiguration: [
107+
'flowcontrol.apiserver.k8s.io/v1beta1',
108+
'flowcontrol.apiserver.k8s.io/v1beta2',
109+
],
110+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-27
111+
// https://kubernetes.io/docs/reference/using-api/deprecation-guide/#csistoragecapacity-v127
112+
CSIStorageCapacity: ['storage.k8s.io/v1beta1', 'storage.k8s.io/v1'],
113+
}

docs/development/best-practices.md

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ Use `UTC` to be time zone independent.
233233

234234
## Unit testing
235235

236+
- Separate _Arrange_, _Act_ and _Assert_ phases with empty line
236237
- Use `it.each` rather than `test.each`
237238
- Prefer [Tagged Template Literal](https://jestjs.io/docs/api#2-testeachtablename-fn-timeout) style for `it.each`, Prettier will help with formatting
238239
- See [Example](https://github.com/renovatebot/renovate/blob/768e178419437a98f5ce4996bafd23f169e530b4/lib/modules/platform/util.spec.ts#L8-L18)

docs/development/issue-labeling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ Add the `breaking` label for Issues or PRs which have changes that are not backw
8181
</details>
8282

8383
Use these to assign a priority level to an issue.
84-
Incoming issues are labeled `priority-5-triage` by default, this label should be replaced with a proper priority (low/normal/important/critical).
84+
Incoming issues are labeled `priority-5-triage` by default, this label should be replaced with a proper priority (low/medium/high/critical).
8585
Try to select the proper priority.
8686
Nothing bad will happen if you select a "wrong" priority.
87-
At a high level: critical = needs immediate fix, important = to be prioritized ahead of others, normal = default priority, low = trivial issue, or impacts a very small % of the user base.
87+
At a high level: critical = needs immediate fix, high = to be prioritized ahead of others, medium = default priority, low = trivial issue, or impacts a very small percentage of the user base.
8888

8989
Use [this search](https://github.com/renovatebot/renovate/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+-label%3Apriority-1-critical+-label%3Apriority-2-high+-label%3Apriority-3-medium+-label%3Apriority-4-low++-label%3Apriority-5-triage) to find any issues which are missing a priority label.
9090

docs/usage/java.md

+14
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ description: Java versions support in Renovate
88
Renovate can update Gradle and Maven dependencies.
99
This includes libraries and plugins as well as the Gradle Wrapper.
1010

11+
## LTS releases
12+
13+
The `config:base` preset includes the `workarounds:javaLTSVersions` preset.
14+
The workaround limits Renovate to upgrade to LTS versions of the Java runtime only.
15+
16+
If you want Renovate to offer all `major` Java updates then add `workarounds:javaLTSVersions` to the `ignorePreset` array:
17+
18+
```json
19+
{
20+
"extends": ["config:base"],
21+
"ignorePresets": ["workarounds:javaLTSVersions"]
22+
}
23+
```
24+
1125
## Gradle
1226

1327
Renovate detects versions that are specified in a string `'group:artifact:version'` and those specified in a map `(group:groupName, name:ArtifactName, version:Version)`.
+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Pull requests
3+
description: Learn about Renovate pull requests
4+
---
5+
6+
This page describes how Renovate pull requests work.
7+
8+
## How Renovate finds existing PRs
9+
10+
Renovate does not keep any kind of database/state of its own about open or closed Pull Requests.
11+
Instead, it uses the code platform's APIs to search and find such PRs.
12+
13+
Locating of existing PRs - whether open or closed - is done by matching both the branch name (e.g. `renovate/lodash-4.x`) and Pull Request title (e.g. `Update lodash to v4.17.21`).
14+
15+
In cases like the above, there is typically at most one existing PR with the desired branch + title combination.
16+
When grouping is enabled by users, and PRs have titles like "All non-major updates", then there may be multiple past PRs which match.
17+
18+
## Normal PRs
19+
20+
As described above, Renovate PRs normally have some uniqueness in their title relating to the version in the upgrade.
21+
In such cases, if a user closes such a PR, it can be inferred that they don't want to see it again in future.
22+
For example, they wish to ignore `[email protected]`.
23+
24+
In such cases, new PRs won't be created until the branch+title uniqueness exists again, such as if there is a `[email protected]`.
25+
26+
Similarly in the case of major updates (such as "Update lodash to v4") then it can be inferred that the user wishes to ignore all of v4 of `lodash`, even when newer v4 versions are available.
27+
28+
## Immortal PRs
29+
30+
Some Renovate pull requests have a section like this:
31+
32+
> 👻 **Immortal:** This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.
33+
34+
A **immortal** PRs keeps popping up again after you close it.
35+
36+
This document explains why we have immortal PRs, and how you can fix them.
37+
38+
### Why we have immortal PRs
39+
40+
First off, we don't have immortal PRs for some philosphical reason like: "don't ignore this update, it's good for you!".
41+
We just have no way to ignore some PRs after they're closed.
42+
43+
#### Branch name and PR title are cache keys
44+
45+
Renovate uses the branch name and PR title like a cache key.
46+
If the same key exists _and_ the PR was closed, then we ignore the PR.
47+
48+
##### Cache keys can cause problems
49+
50+
Let's say you have an "All non-major updates" PR.
51+
If you close the PR, and Renovate ignores it based on the PR title, then you would never get a non-major update again.
52+
53+
#### Only unique version PRs can be ignored
54+
55+
Renovate can only ignore PRs if they have a unique version, like "to v16.1.2" or "to v16" in the title.
56+
57+
#### Grouped updates with different versions
58+
59+
The problem comes when there are groups of updates which have different versions.
60+
Then the update becomes "Update react (major)", which is not safely ignorable, instead of "Update react to v16".
61+
62+
### Future plans for immortal PRs
63+
64+
In the future we may embed metadata in each PR identifying the exact files and packages + versions that PR contains.
65+
Then we could allow such PRs to be closed/ignored but then as soon as there's any chance to files/packages/versions being updated then we'd be cached busted and create a new PR.
66+
If you regularly wish to close immortal PRs, it's an indication that you may be grouping too widely.
67+
68+
### How to fix immortal PRs
69+
70+
Avoid grouping dependencies together which have different versions, or which you have a high chance of wanting to ignore.
71+
72+
#### Major updates require Dependency Dashboard approval
73+
74+
Avoid grouping major upgrades together unless they are related dependencies.
75+
Instead, set `"dependencyDashboardApproval": true` for major updates so that you have control about when they are created.
76+
77+
## Ignoring PRs
78+
79+
To ignore a PR you just close it unmerged.
80+
81+
<!-- prettier-ignore -->
82+
!!! note
83+
Renovate will re-create any PRs that is marked "immortal".
84+
What this means is that any immortal PR you close, will pop up again the next time Renovate runs.
85+
To ignore immortal PRs, follow the advice in the [How to fix immortal PRs](#how-to-fix-immortal-prs) section.

lib/config/options/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ const options: RenovateOptions[] = [
382382
globalOnly: true,
383383
type: 'string',
384384
default: null,
385+
stage: 'global',
385386
},
386387
// Onboarding
387388
{

0 commit comments

Comments
 (0)