Skip to content

Commit

Permalink
Merge branch 'renovatebot:main' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoettle authored Dec 11, 2024
2 parents f73299a + 098c3e2 commit f54e3ae
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/containerbase/devcontainer:13.2.2
FROM ghcr.io/containerbase/devcontainer:13.2.5
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/init@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
with:
languages: javascript

Expand All @@ -51,7 +51,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@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/autobuild@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/analyze@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/upload-sarif@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
format: 'sarif'
output: 'trivy-results.sarif'

- uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
- uses: github/codeql-action/upload-sarif@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
with:
sarif_file: trivy-results.sarif
category: 'docker-image-${{ matrix.tag }}'
17 changes: 17 additions & 0 deletions docs/usage/nuget.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@ If you use Azure DevOps:
The username of the PAT must match the username of the _user of the PAT_.
The generated `nuget.config` forces the basic authentication, which cannot be overridden externally!

## Ignoring package files when using presets

Because `nuget` manager has a dedicated `ignorePaths` entry in the `:ignoreModulesAndTests` preset, if you're using any presets that extend it (like `config:recommended`), you need to put your `ignorePaths` inside the `nuget` section for it to be merged.
For example:

```json
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"nuget": {
"ignorePaths": ["IgnoreThisPackage/**"]
}
}
```

Otherwise, all `nuget.ignorePaths` values in `:ignoreModulesAndTests` will override values you put inside `ignorePaths` at the top-level config.

## Future work

We welcome contributions or feature requests to support more patterns or use cases.
2 changes: 1 addition & 1 deletion lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ const options: RenovateOptions[] = [
description:
'Change this value to override the default Renovate sidecar image.',
type: 'string',
default: 'ghcr.io/containerbase/sidecar:13.2.2',
default: 'ghcr.io/containerbase/sidecar:13.2.4',
globalOnly: true,
},
{
Expand Down
3 changes: 2 additions & 1 deletion lib/config/presets/internal/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ export const presets: Record<string, Preset> = {
},
react: {
description: 'All React packages.',
matchPackageNames: ['@types/react', 'react**'],
matchDatasources: ['npm'],
matchPackageNames: ['@types/react**', 'react**'],
},
stylelint: {
description: 'All Stylelint packages.',
Expand Down
4 changes: 4 additions & 0 deletions lib/data/monorepo.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,12 @@
"istanbuljs": "https://github.com/istanbuljs/istanbuljs",
"jackson": [
"https://github.com/FasterXML/jackson",
"https://github.com/FasterXML/jackson-annotations",
"https://github.com/FasterXML/jackson-core",
"https://github.com/FasterXML/jackson-databind",
"https://github.com/FasterXML/jackson-dataformats-binary",
"https://github.com/FasterXML/jackson-dataformats-text",
"https://github.com/FasterXML/jackson-jaxrs-providers",
"https://github.com/FasterXML/jackson-module-kotlin"
],
"jasmine": "https://github.com/jasmine/jasmine",
Expand Down Expand Up @@ -543,6 +546,7 @@
"unhead": "https://github.com/unjs/unhead",
"unocss": "https://github.com/unocss/unocss",
"uppy": "https://github.com/transloadit/uppy",
"utopia": "https://github.com/juhaku/utoipa",
"vaadin-hilla": "https://github.com/vaadin/hilla",
"vaadinWebComponents": "https://github.com/vaadin/web-components",
"visx": "https://github.com/airbnb/visx",
Expand Down
2 changes: 2 additions & 0 deletions lib/modules/manager/mix/__fixtures__/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ defmodule MyProject.MixProject do
optional: true},
{:hammer_backend_redis, "~> 6.1"},
{:public, "== 1.6.14"},
{:gun, "~> 2.0.0", hex: "grpc_gun"},
{:another_gun, "~> 1.0.0", hex: :gun_atom},
]
end
end
4 changes: 3 additions & 1 deletion lib/modules/manager/mix/__fixtures__/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
"mason": {:hex, :mason, "1.1.0", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"},
"hammer_backend_redis": {:hex, :hammer_backend_redis, "6.1.5", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"},
"public": {:hex, :public, "1.6.14", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"},
"a_transient_dependency": {:hex, :a_transient_dependency, "1.6.14", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"}
"a_transient_dependency": {:hex, :a_transient_dependency, "1.6.14", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"},
"gun": {:hex, :grpc_gun, "2.0.0", "f99678a2ab975e74372a756c86ec30a8384d3ac8a8b86c7ed6243ef4e61d2729", [:rebar3], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "03dbbca1a9c604a0267a40ea1d69986225091acb822de0b2dbea21d5815e410b"},
"another_gun": {:hex, :gun_atom, "1.0.0", "344dbbf6610d205760ec37e2848bff2aab5a2de182bb5cdaa72cc2fd19d74535", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "19c205c8de0e2e5817f2250100281c58e717cb11ff1bb410bf661ee78c24e79b"}
}
26 changes: 26 additions & 0 deletions lib/modules/manager/mix/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ describe('modules/manager/mix/extract', () => {
depName: 'public',
packageName: 'public',
},
{
currentValue: '~> 2.0.0',
datasource: 'hex',
depName: 'gun',
packageName: 'grpc_gun',
},
{
currentValue: '~> 1.0.0',
datasource: 'hex',
depName: 'another_gun',
packageName: 'gun_atom',
},
]);
});

Expand Down Expand Up @@ -188,6 +200,20 @@ describe('modules/manager/mix/extract', () => {
packageName: 'public',
lockedVersion: '1.6.14',
},
{
currentValue: '~> 2.0.0',
datasource: 'hex',
depName: 'gun',
packageName: 'grpc_gun',
lockedVersion: '2.0.0',
},
{
currentValue: '~> 1.0.0',
datasource: 'hex',
depName: 'another_gun',
packageName: 'gun_atom',
lockedVersion: '1.0.0',
},
]);
});
});
Expand Down
11 changes: 10 additions & 1 deletion lib/modules/manager/mix/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const commentMatchRegExp = regEx(/#.*$/);
const lockedVersionRegExp = regEx(
/^\s+"(?<app>\w+)".*?"(?<lockedVersion>\d+\.\d+\.\d+)"/,
);
const hexRegexp = regEx(/hex:\s*(?:"(?<strValue>[^"]+)"|:(?<atomValue>\w+))/);

export async function extractPackageFile(
content: string,
Expand All @@ -44,6 +45,8 @@ export async function extractPackageFile(
const ref = refRegexp.exec(opts)?.groups?.value;
const branchOrTag = branchOrTagRegexp.exec(opts)?.groups?.value;
const organization = organizationRegexp.exec(opts)?.groups?.value;
const hexGroups = hexRegexp.exec(opts)?.groups;
const hex = hexGroups?.strValue ?? hexGroups?.atomValue;

let dep: PackageDependency;

Expand All @@ -60,8 +63,14 @@ export async function extractPackageFile(
depName: app,
currentValue: requirement,
datasource: HexDatasource.id,
packageName: organization ? `${app}:${organization}` : app,
};
if (organization) {
dep.packageName = `${app}:${organization}`;
} else if (hex) {
dep.packageName = hex;
} else {
dep.packageName = app;
}
if (requirement?.startsWith('==')) {
dep.currentVersion = requirement.replace(regEx(/^==\s*/), '');
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
"p-queue": "6.6.2",
"p-throttle": "4.1.1",
"parse-link-header": "2.0.0",
"prettier": "3.4.1",
"prettier": "3.4.2",
"protobufjs": "7.4.0",
"punycode": "2.3.1",
"redis": "4.7.0",
Expand Down Expand Up @@ -269,7 +269,7 @@
"@openpgp/web-stream-tools": "0.1.3",
"@renovate/eslint-plugin": "file:tools/eslint",
"@semantic-release/exec": "6.0.3",
"@swc/core": "1.9.3",
"@swc/core": "1.10.0",
"@types/auth-header": "1.0.6",
"@types/aws4": "1.11.6",
"@types/better-sqlite3": "7.6.12",
Expand Down
Loading

0 comments on commit f54e3ae

Please sign in to comment.