Skip to content

Commit

Permalink
Merge branch 'main' into refactor/enum-final
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh authored Nov 16, 2022
2 parents c8ecd8a + a9600ad commit 1fc3d38
Show file tree
Hide file tree
Showing 133 changed files with 3,704 additions and 3,227 deletions.
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
## Context

<!-- Describe why you're making these changes if it's not already explained in a corresponding issue. -->
<!-- If you're closing an existing issue with this pull request, use the keyword Closes #issue_number -->
<!-- If you're closing an existing issue with this pull request, use the keyword Closes #issue_number. -->
<!-- If you're referencing an issue with this pull request, put it in a Markdown list like this: - #issue_number. -->

## Documentation (please check one with an [x])

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # tag=v2.1.31
uses: github/codeql-action/init@4238421316c33d73aeea2801274dd286f157c2bb # v2.1.32
with:
languages: javascript

Expand All @@ -40,7 +40,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # tag=v2.1.31
uses: github/codeql-action/autobuild@4238421316c33d73aeea2801274dd286f157c2bb # v2.1.32

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # tag=v2.1.31
uses: github/codeql-action/analyze@4238421316c33d73aeea2801274dd286f157c2bb # v2.1.32
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0

- name: 'Dependency Review'
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # tag=v2.5.1
uses: actions/dependency-review-action@11310527b429536e263dc6cc47873e608189ba21 # v3.0.1
2 changes: 1 addition & 1 deletion docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ This is an advance field and it's recommend you seek a config review before appl

## bumpVersion

Currently this setting supports `helmv3`, `npm`, 'nuget', `maven` and `sbt` only, so raise a feature request if you have a use for it with other package managers.
Currently this setting supports `helmv3`, `npm`, `nuget`, `maven` and `sbt` only, so raise a feature request if you have a use for it with other package managers.
Its purpose is if you want Renovate to update the `version` field within your package file any time it updates dependencies within.
Usually this is for automatic release purposes, so that you don't need to add another step after Renovate before you can release a new version.

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,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:34.20.0
FROM renovate/renovate:34.24.0
# Include the "Docker tip" which you can find here https://cloud.google.com/sdk/docs/install
# under "Installation" for "Debian/Ubuntu"
RUN ...
Expand Down
12 changes: 6 additions & 6 deletions docs/usage/examples/self-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ For example, all the following are valid tags:

```sh
docker run --rm renovate/renovate
docker run --rm renovate/renovate:32
docker run --rm renovate/renovate:32.64
docker run --rm renovate/renovate:32.64.4
docker run --rm renovate/renovate:34
docker run --rm renovate/renovate:34.24
docker run --rm renovate/renovate:34.24.0
```

<!-- prettier-ignore -->
Expand Down Expand Up @@ -64,7 +64,7 @@ spec:
- name: renovate
# Update this to the latest available and then enable Renovate on
# the manifest
image: renovate/renovate:31.14.0
image: renovate/renovate:34.24.0
args:
- user/repo
# Environment Variables
Expand Down Expand Up @@ -123,7 +123,7 @@ spec:
template:
spec:
containers:
- image: renovate/renovate:31.14.0
- image: renovate/renovate:34.24.0
name: renovate-bot
env: # For illustration purposes, please use secrets.
- name: RENOVATE_PLATFORM
Expand Down Expand Up @@ -368,7 +368,7 @@ spec:
containers:
- name: renovate
# Update this to the latest available and then enable Renovate on the manifest
image: renovate/renovate:31.14.0
image: renovate/renovate:34.24.0
volumeMounts:
- name: ssh-key-volume
readOnly: true
Expand Down
23 changes: 16 additions & 7 deletions docs/usage/nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,26 @@ You can set alternative feeds:

In the example above we've set three NuGet feeds.
The package resolving process uses the `merge` strategy to handle the three feeds.
All feeds are checked for dependency updates, and duplicate updates are merged/joined together into a single dependency update.
All feeds are checked for dependency updates, and duplicate updates are merged into a single dependency update.

If your project uses lockfiles (a `package.lock.json` exists), alternate feed settings must be defined in a `NuGet.config` only, as `registryUrls` are not passed through to the NuGet commands used.
<!-- prettier-ignore -->
!!! warning
If your project has lockfile(s), for example a `package.lock.json` file, then you must set alternate feed settings in the `NuGet.config` file only.
`registryUrls` set in other files are **not** passed to the NuGet commands.

### Protocol versions

NuGet supports two protocol versions, `v2` and `v3`.
The NuGet client and server must use the same version.
When Renovate acts as the client, it can use the `v2` and `v3` protocols.

By default, Renovate uses the `v2` protocol.
If the configured feed URL ends with `index.json`, Renovate uses the `v3` protocol.
So Renovate behaves like the official NuGet client.

Renovate as a NuGet client supports both `v2` and `v3` protocols, and will use `v2` unless the configured feed URL ends with `index.json`.
This mirrors the behavior of the official NuGet client.
#### v3 feed URL not ending with index.json

If you have a `v3` feed that doesn't end with `index.json`, like for example on the JFrog Artifactory, then you must append `#protocolVersion=3` to the registry URL:
If a `v3` feed URL does not end with `index.json`, you must append `#protocolVersion=3` to the registry URL:

```json
{
Expand All @@ -81,6 +88,8 @@ If you have a `v3` feed that doesn't end with `index.json`, like for example on
}
```

You may need this workaround when you use the JFrog Artifactory.

## Authenticated feeds

Credentials for authenticated/private feeds can be given via host rules in the configuration options (file or command line parameter).
Expand All @@ -98,12 +107,12 @@ Credentials for authenticated/private feeds can be given via host rules in the c
}
```

When using Azure DevOps, you can use `pkgs.dev.azure.com` as `matchHost` value.
If you're using Azure DevOps, you can set `matchHost` to `pkgs.dev.azure.com`.

<!-- prettier-ignore -->
!!! note
Only Basic HTTP authentication (via username and password) is supported.
For Azure DevOps, you can use a Personal Access Token (PAT) with read permissions on `Packaging` along with an empty username.
For Azure DevOps, you can use a PAT with `read` permissions on `Packaging` plus an empty username.

## Future work

Expand Down
1 change: 1 addition & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function jestGithubRunnerSpecs(): JestConfig {

const config: JestConfig = {
cacheDirectory: '.cache/jest',
clearMocks: true,
coverageDirectory: './coverage',
collectCoverage: true,
collectCoverageFrom: [
Expand Down
1 change: 0 additions & 1 deletion lib/config/presets/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ describe('config/presets/index', () => {

beforeEach(() => {
config = {};
jest.clearAllMocks();
memCache.init();
});

Expand Down
4 changes: 0 additions & 4 deletions lib/instrumentation/decorator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ afterAll(disableInstrumentations);
describe('instrumentation/decorator', () => {
const spy = jest.fn(() => Promise.resolve());

beforeEach(() => {
jest.clearAllMocks();
});

it('should instrument async function', async () => {
class MyClass {
@instrument({ name: 'getNumber' })
Expand Down
1 change: 0 additions & 1 deletion lib/instrumentation/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ describe('instrumentation/index', () => {
const oldEnv = process.env;

beforeEach(() => {
jest.clearAllMocks();
api.trace.disable(); // clear global components
process.env = { ...oldEnv };
});
Expand Down
4 changes: 0 additions & 4 deletions lib/modules/datasource/cdnjs/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ const pathFor = (s: string): string =>

describe('modules/datasource/cdnjs/index', () => {
describe('getReleases', () => {
beforeEach(() => {
jest.clearAllMocks();
});

it('throws for empty result', async () => {
httpMock.scope(baseUrl).get(pathFor('foo/bar')).reply(200, '}');
await expect(
Expand Down
1 change: 0 additions & 1 deletion lib/modules/datasource/gradle-version/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('modules/datasource/gradle-version/index', () => {
versioning,
depName: 'abc',
};
jest.clearAllMocks();
});

it('processes real data', async () => {
Expand Down
1 change: 0 additions & 1 deletion lib/modules/datasource/npm/get.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const http = new Http('npm');

describe('modules/datasource/npm/get', () => {
beforeEach(() => {
jest.clearAllMocks();
hostRules.clear();
setNpmrc();
});
Expand Down
4 changes: 0 additions & 4 deletions lib/modules/datasource/orb/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ const datasource = OrbDatasource.id;

describe('modules/datasource/orb/index', () => {
describe('getReleases', () => {
beforeEach(() => {
jest.clearAllMocks();
});

it('returns null for empty result', async () => {
httpMock.scope(baseUrl).post('/graphql-unstable').reply(200, {});
expect(
Expand Down
4 changes: 0 additions & 4 deletions lib/modules/datasource/terraform-module/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ const localTerraformEnterprisebaseUrl = 'https://terraform.foo.bar';

describe('modules/datasource/terraform-module/index', () => {
describe('getReleases', () => {
beforeEach(() => {
jest.clearAllMocks();
});

it('returns null for empty result', async () => {
httpMock
.scope(baseUrl)
Expand Down
Loading

0 comments on commit 1fc3d38

Please sign in to comment.