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.42
FROM ghcr.io/containerbase/devcontainer:13.8.44

# https://github.com/pnpm/pnpm/issues/8971
# renovate: datasource=npm
Expand Down
32 changes: 32 additions & 0 deletions lib/modules/datasource/nuget/__fixtures__/proxykit/v3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>ProxyKit</id>
<version>2.3.4+build.119</version>
<authors>Damian Hickey</authors>
<owners>Damian Hickey</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
<icon>icon.png</icon>
<projectUrl>https://github.com/ProxyKit/ProxyKit</projectUrl>
<description>An AspNet core middleware toolkit to create proxy servers. Can be embedded in applications or used as a standalone proxy.</description>
<releaseNotes>See https://github.com/ProxyKit/ProxyKit/releases for release notes.</releaseNotes>
<tags>aspnetcore proxy http</tags>
<repository type="git" url="https://github.com/ProxyKit/ProxyKit" commit="5ce814152311938d323762474c8a3307d2beb2cf" />
<dependencies>
<group targetFramework=".NETCoreApp3.1" />
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.AspNetCore.Http" version="2.1.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.AspNetCore.Http.Extensions" version="2.1.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.AspNetCore.HttpOverrides" version="2.1.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Http" version="2.1.0" exclude="Build,Analyzers" />
</group>
</dependencies>
<frameworkReferences>
<group targetFramework=".NETCoreApp3.1">
<frameworkReference name="Microsoft.AspNetCore.App" />
</group>
</frameworkReferences>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
{
"@id": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/index.json",
"@type": [
"catalog:CatalogRoot",
"PackageRegistration",
"catalog:Permalink"
],
"commitId": "87fbae2e-a1be-4fd2-ab55-bfa4afb0b86a",
"commitTimeStamp": "2024-11-13T10:18:14.1126201+00:00",
"count": 1,
"items": [
{
"@id": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/index.json#page/1.0.0-alpha.1/2.3.4",
"@type": "catalog:CatalogPage",
"commitId": "87fbae2e-a1be-4fd2-ab55-bfa4afb0b86a",
"commitTimeStamp": "2024-11-13T10:18:14.1126201+00:00",
"count": 24,
"items": [
{
"@id": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/1.0.0.json",
"@type": "Package",
"commitId": "b8608975-ebf6-4185-8e46-ae676b218a2b",
"commitTimeStamp": "2024-11-13T10:16:09.6743205+00:00",
"catalogEntry": {
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json",
"@type": "PackageDetails",
"authors": "Damian Hickey",
"dependencyGroups": [
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json#dependencygroup/.netstandard2.0",
"@type": "PackageDependencyGroup",
"dependencies": [
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json#dependencygroup/.netstandard2.0/microsoft.aspnetcore.http",
"@type": "PackageDependency",
"id": "Microsoft.AspNetCore.Http",
"range": "[2.2.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.aspnetcore.http/index.json"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json#dependencygroup/.netstandard2.0/microsoft.aspnetcore.http.extensions",
"@type": "PackageDependency",
"id": "Microsoft.AspNetCore.Http.Extensions",
"range": "[2.2.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.aspnetcore.http.extensions/index.json"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json#dependencygroup/.netstandard2.0/microsoft.aspnetcore.httpoverrides",
"@type": "PackageDependency",
"id": "Microsoft.AspNetCore.HttpOverrides",
"range": "[2.2.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.aspnetcore.httpoverrides/index.json"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json#dependencygroup/.netstandard2.0/microsoft.extensions.http",
"@type": "PackageDependency",
"id": "Microsoft.Extensions.Http",
"range": "[2.2.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.extensions.http/index.json"
}
],
"targetFramework": ".NETStandard2.0"
}
],
"deprecation": {
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.1.0.0.json#deprecation",
"@type": "deprecation",
"reasons": [
"Legacy"
]
},
"description": "An AspNet core middleware toolkit to create proxy servers. Can\n be used in applications or used as a standalone proxy (i.e. containerised system).",
"iconUrl": "",
"id": "ProxyKit",
"language": "",
"licenseExpression": "",
"licenseUrl": "https://github.com/damianh/ProxyKit/blob/master/LICENSE",
"listed": false,
"minClientVersion": "",
"packageContent": "https://api.nuget.org/v3-flatcontainer/proxykit/1.0.0/proxykit.1.0.0.nupkg",
"projectUrl": "https://github.com/damianh/ProxyKit",
"published": "1900-01-01T00:00:00+00:00",
"requireLicenseAcceptance": false,
"summary": "",
"tags": [
"aspnetcore",
"proxy",
"http"
],
"title": "",
"version": "1.0.0+build.118"
},
"packageContent": "https://api.nuget.org/v3-flatcontainer/proxykit/1.0.0/proxykit.1.0.0.nupkg",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/index.json"
},
{
"@id": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/2.3.4.json",
"@type": "Package",
"commitId": "b8608975-ebf6-4185-8e46-ae676b218a2b",
"commitTimeStamp": "2024-11-13T10:16:09.6743205+00:00",
"catalogEntry": {
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json",
"@type": "PackageDetails",
"authors": "Damian Hickey",
"dependencyGroups": [
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#dependencygroup/.netcoreapp3.1",
"@type": "PackageDependencyGroup",
"targetFramework": ".NETCoreApp3.1"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#dependencygroup/.netstandard2.0",
"@type": "PackageDependencyGroup",
"dependencies": [
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#dependencygroup/.netstandard2.0/microsoft.aspnetcore.http",
"@type": "PackageDependency",
"id": "Microsoft.AspNetCore.Http",
"range": "[2.1.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.aspnetcore.http/index.json"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#dependencygroup/.netstandard2.0/microsoft.aspnetcore.http.extensions",
"@type": "PackageDependency",
"id": "Microsoft.AspNetCore.Http.Extensions",
"range": "[2.1.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.aspnetcore.http.extensions/index.json"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#dependencygroup/.netstandard2.0/microsoft.aspnetcore.httpoverrides",
"@type": "PackageDependency",
"id": "Microsoft.AspNetCore.HttpOverrides",
"range": "[2.1.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.aspnetcore.httpoverrides/index.json"
},
{
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#dependencygroup/.netstandard2.0/microsoft.extensions.http",
"@type": "PackageDependency",
"id": "Microsoft.Extensions.Http",
"range": "[2.1.0, )",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/microsoft.extensions.http/index.json"
}
],
"targetFramework": ".NETStandard2.0"
}
],
"deprecation": {
"@id": "https://api.nuget.org/v3/catalog0/data/2024.11.13.10.15.11/proxykit.2.3.4.json#deprecation",
"@type": "deprecation",
"reasons": [
"Legacy"
]
},
"description": "An AspNet core middleware toolkit to create proxy servers. Can be embedded in applications or used as a standalone proxy.",
"iconUrl": "https://api.nuget.org/v3-flatcontainer/proxykit/2.3.4/icon",
"id": "ProxyKit",
"language": "",
"licenseExpression": "Apache-2.0",
"licenseUrl": "https://www.nuget.org/packages/ProxyKit/2.3.4/license",
"listed": false,
"minClientVersion": "",
"packageContent": "https://api.nuget.org/v3-flatcontainer/proxykit/2.3.4/proxykit.2.3.4.nupkg",
"projectUrl": "https://github.com/ProxyKit/ProxyKit",
"published": "1900-01-01T00:00:00+00:00",
"requireLicenseAcceptance": false,
"summary": "",
"tags": [
"aspnetcore",
"proxy",
"http"
],
"title": "",
"version": "2.3.4+build.119"
},
"packageContent": "https://api.nuget.org/v3-flatcontainer/proxykit/2.3.4/proxykit.2.3.4.nupkg",
"registration": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/index.json"
}
],
"parent": "https://api.nuget.org/v3/registration5-gz-semver2/proxykit/index.json",
"lower": "1.0.0-alpha.1",
"upper": "2.3.4"
}
],
"@context": {
"@vocab": "http://schema.nuget.org/schema#",
"catalog": "http://schema.nuget.org/catalog#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"items": {
"@id": "catalog:item",
"@container": "@set"
},
"commitTimeStamp": {
"@id": "catalog:commitTimeStamp",
"@type": "xsd:dateTime"
},
"commitId": {
"@id": "catalog:commitId"
},
"count": {
"@id": "catalog:count"
},
"parent": {
"@id": "catalog:parent",
"@type": "@id"
},
"tags": {
"@id": "tag",
"@container": "@set"
},
"reasons": {
"@container": "@set"
},
"packageTargetFrameworks": {
"@id": "packageTargetFramework",
"@container": "@set"
},
"dependencyGroups": {
"@id": "dependencyGroup",
"@container": "@set"
},
"dependencies": {
"@id": "dependency",
"@container": "@set"
},
"packageContent": {
"@type": "@id"
},
"published": {
"@type": "xsd:dateTime"
},
"registration": {
"@type": "@id"
}
}
}
18 changes: 18 additions & 0 deletions lib/modules/datasource/nuget/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1986,3 +1986,21 @@ exports[`modules/datasource/nuget/index > getReleases > returns deduplicated res
"sourceUrl": "https://github.com/nunit/nunit",
}
`;

exports[`modules/datasource/nuget/index > getReleases > should return deprecated 1`] = `
{
"deprecationMessage": "The package \`ProxyKit\` is deprecated.",
"registryUrl": "https://api.nuget.org/v3/index.json",
"releases": [
{
"isDeprecated": true,
"version": "1.0.0",
},
{
"isDeprecated": true,
"version": "2.3.4",
},
],
"sourceUrl": "https://github.com/ProxyKit/ProxyKit",
}
`;
27 changes: 27 additions & 0 deletions lib/modules/datasource/nuget/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const packageCache = vi.mocked(_packageCache);
const pkgInfoV3FromNuget = Fixtures.get('nunit/v3_nuget_org.xml');
const pkgListV3Registration = Fixtures.get('nunit/v3_registration.json');

const pkgInfoV3Deprecated = Fixtures.get('proxykit/v3.xml');
const pkgListV3Deprecated = Fixtures.get('proxykit/v3_registration.json');

const pkgListV2 = Fixtures.get('nunit/v2.xml');
const pkgListV2NoGitHubProjectUrl = Fixtures.get(
'nunit/v2_noGitHubProjectUrl.xml',
Expand Down Expand Up @@ -108,6 +111,13 @@ const configV3AzureDevOps = {
],
};

const configV3Deprecated = {
datasource,
versioning,
packageName: 'ProxyKit',
registryUrls: ['https://api.nuget.org/v3/index.json'],
};

describe('modules/datasource/nuget/index', () => {
beforeEach(() => {
GlobalConfig.reset();
Expand Down Expand Up @@ -820,5 +830,22 @@ describe('modules/datasource/nuget/index', () => {
expect(res).not.toBeNull();
expect(res).toMatchSnapshot();
});

it('should return deprecated', async () => {
httpMock
.scope('https://api.nuget.org')
.get('/v3/index.json')
.twice()
.reply(200, nugetIndexV3)
.get('/v3/registration5-gz-semver2/proxykit/index.json')
.reply(200, pkgListV3Deprecated)
.get('/v3-flatcontainer/proxykit/2.3.4/proxykit.nuspec')
.reply(200, pkgInfoV3Deprecated);
const res = await getPkgReleases({
...configV3Deprecated,
});
expect(res).not.toBeNull();
expect(res).toMatchSnapshot();
});
});
});
5 changes: 5 additions & 0 deletions lib/modules/datasource/nuget/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export interface CatalogEntry {
projectUrl?: string;
listed?: boolean;
packageContent?: string;
deprecation?: Deprecation;
}

export interface Deprecation {
reasons: string[];
}

export interface CatalogPage {
Expand Down
Loading
Loading