Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/containerbase/devcontainer:13.8.22
FROM ghcr.io/containerbase/devcontainer:13.8.23

# https://github.com/pnpm/pnpm/issues/8971
# renovate: datasource=npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ jobs:
show-progress: false

- name: docker-config
uses: containerbase/internal-tools@29a8cfb9ef1404f159215a36951cee61a52bd937 # v3.10.30
uses: containerbase/internal-tools@cd020e899735bd0a12785b8615d98d1d5036a6ff # v3.10.31
with:
command: docker-config

Expand Down
1 change: 0 additions & 1 deletion lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ const options: RenovateOptions[] = [
'The semver level to use when bumping versions. This is used by the `bumpVersions` feature.',
type: 'string',
default: 'patch',
allowedValues: ['major', 'minor', 'patch', 'prerelease'],
parents: ['bumpVersions'],
},
{
Expand Down
1 change: 1 addition & 0 deletions lib/modules/datasource/maven/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function isUnsupportedHostError(err: HttpError): boolean {
const cacheProvider = new PackageHttpCacheProvider({
namespace: 'datasource-maven:cache-provider',
ttlMinutes: 7 * 24 * 60,
checkAuthorizationHeader: true,
checkCacheControlHeader: false, // Maven doesn't respond with `cache-control` headers
});

Expand Down
3 changes: 2 additions & 1 deletion lib/modules/datasource/npm/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export async function getDependency(
try {
const cacheProvider = new PackageHttpCacheProvider({
namespace: 'datasource-npm:cache-provider',
checkAuthorizationHeader: false,
checkAuthorizationHeader: false, // We don't rely on whether user token is provided or not
checkCacheControlHeader: true,
});
const options: HttpOptions = { cacheProvider };

Expand Down
16 changes: 16 additions & 0 deletions lib/util/http/cache/package-http-cache-provider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ describe('util/http/cache/package-http-cache-provider', () => {
const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
ttlMinutes: 0,
checkAuthorizationHeader: false,
checkCacheControlHeader: false,
});
httpMock.scope(url).get('').reply(200, 'new response');

Expand All @@ -69,6 +71,8 @@ describe('util/http/cache/package-http-cache-provider', () => {
};
const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: false,
});

const res = await http.getText(url, { cacheProvider });
Expand All @@ -90,6 +94,8 @@ describe('util/http/cache/package-http-cache-provider', () => {
it('handles cache miss', async () => {
const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: false,
});
httpMock.scope(url).get('').reply(200, 'fetched response', {
etag: 'foobar',
Expand Down Expand Up @@ -118,6 +124,8 @@ describe('util/http/cache/package-http-cache-provider', () => {

const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: true,
});

httpMock.scope(url).get('').reply(200, 'private response', {
Expand All @@ -135,6 +143,8 @@ describe('util/http/cache/package-http-cache-provider', () => {

const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: true,
checkCacheControlHeader: false,
});

httpMock.scope(url).get('').reply(200, 'private response');
Expand All @@ -155,6 +165,7 @@ describe('util/http/cache/package-http-cache-provider', () => {

const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: false,
});

Expand All @@ -174,6 +185,7 @@ describe('util/http/cache/package-http-cache-provider', () => {

const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: false,
});

Expand All @@ -198,6 +210,8 @@ describe('util/http/cache/package-http-cache-provider', () => {
};
const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: false,
});
httpMock.scope(url).get('').reply(500);

Expand Down Expand Up @@ -299,6 +313,8 @@ describe('util/http/cache/package-http-cache-provider', () => {

const cacheProvider = new PackageHttpCacheProvider({
namespace: '_test-namespace',
checkAuthorizationHeader: false,
checkCacheControlHeader: true,
});

const response = {
Expand Down
8 changes: 4 additions & 4 deletions lib/util/http/cache/package-http-cache-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import type { HttpCache } from './schema';
export interface PackageHttpCacheProviderOptions {
namespace: PackageCacheNamespace;
ttlMinutes?: number;
checkCacheControlHeader?: boolean;
checkAuthorizationHeader?: boolean;
checkCacheControlHeader: boolean;
checkAuthorizationHeader: boolean;
}

export class PackageHttpCacheProvider extends AbstractHttpCacheProvider {
Expand All @@ -29,8 +29,8 @@ export class PackageHttpCacheProvider extends AbstractHttpCacheProvider {
constructor({
namespace,
ttlMinutes = 15,
checkCacheControlHeader = true,
checkAuthorizationHeader = true,
checkCacheControlHeader = false,
checkAuthorizationHeader = false,
}: PackageHttpCacheProviderOptions) {
super();
this.namespace = namespace;
Expand Down
Loading