diff --git a/lib/datasource/nuget/get.js b/lib/datasource/nuget/get.js new file mode 100644 index 0000000000000000000000000000000000000000..cdb2e735f5198323ef0b7a66c926cf5f9de5a7dd --- /dev/null +++ b/lib/datasource/nuget/get.js @@ -0,0 +1,21 @@ +const got = require('../../util/got'); +const hostRules = require('../../util/host-rules'); + +module.exports = get; + +function get(url, options) { + const finalOptions = options || {}; + const hostRule = hostRules.find({ platform: 'nuget', endpoint: url }); + if (hostRule && hostRule.username && hostRule.password) { + const auth = Buffer.from( + `${hostRule.username}:${hostRule.password}` + ).toString('base64'); + finalOptions.headers = finalOptions.headers || {}; + finalOptions.headers.Authorization = `Basic ${auth}`; + logger.debug( + { url }, + `Setting basic auth header as configured via host rule` + ); + } + return got(url, finalOptions); +} diff --git a/lib/datasource/nuget/index.js b/lib/datasource/nuget/index.js index 1bbbd0b1e8116be998d40b53c23fcc01184435f9..09ed6a8557c6e817105443439744dc8ce34290fc 100644 --- a/lib/datasource/nuget/index.js +++ b/lib/datasource/nuget/index.js @@ -1,167 +1,35 @@ -const parse = require('github-url-from-git'); -const { XmlDocument } = require('xmldoc'); const urlApi = require('url'); -const got = require('../../util/got'); +const v2 = require('./v2'); +const v3 = require('./v3'); module.exports = { getPkgReleases, }; -const defaultNugetFeed = 'https://api.nuget.org/v3/index.json'; - async function getPkgReleases({ lookupName, registryUrls }) { logger.trace(`nuget.getPkgReleases(${lookupName})`); let dep = null; - // https://api.nuget.org/v3/index.json is a default official nuget feed - const feeds = registryUrls === null ? [defaultNugetFeed] : registryUrls; - for (const feed of feeds) { - if (dep != null) break; - + for (const feed of registryUrls || [v3.getDefaultFeed()]) { const feedVersion = detectFeedVersion(feed); - if (feedVersion !== null) { - if (feedVersion === 3) { - const queryUrl = await getQueryUrlForV3Feed(feed); - if (queryUrl !== null) { - dep = await getPkgReleasesFromV3Feed(feed, queryUrl, lookupName); - } - } else if (feedVersion === 2) { - dep = await getPkgReleasesFromV2Feed(feed, lookupName); + if (feedVersion === 2) { + dep = await v2.getPkgReleases(feed, lookupName); + } else if (feedVersion === 3) { + const queryUrl = await v3.getQueryUrl(feed); + if (queryUrl !== null) { + dep = await v3.getPkgReleases(feed, queryUrl, lookupName); } } - } - if (dep != null) { - return dep; - } - - logger.info( - { lookupName }, - `Dependency lookup failure: not found in all feeds` - ); - return null; -} - -async function getPkgReleasesFromV3Feed(registryUrl, feedUrl, pkgName) { - const queryUrl = `${feedUrl}?q=PackageId:${pkgName}`; - const dep = { - pkgName, - }; - try { - const pkgUrlListRaw = await got(queryUrl, { retry: 5, json: true }); - if (pkgUrlListRaw.statusCode !== 200) { - logger.debug( - { dependency: pkgName, pkgUrlListRaw }, - `nuget registry failure: status code != 200` - ); - return null; - } - - // There are no pkgName is current feed - if (pkgUrlListRaw.body.totalHits === 0) { - return null; - } - - dep.releases = (pkgUrlListRaw.body.data[0].versions || []).map(item => ({ - version: item.version, - })); - - try { - // For nuget.org we have a way to get nuspec file - if (registryUrl.toLowerCase() === defaultNugetFeed.toLowerCase()) { - const nugetOrgApi = `https://api.nuget.org/v3-flatcontainer/${pkgName.toLowerCase()}/${ - [...dep.releases].pop().version - }/${pkgName.toLowerCase()}.nuspec`; - const result = await got(nugetOrgApi); - const nuspec = new XmlDocument(result.body); - if (nuspec) { - const sourceUrl = parse( - nuspec.valueWithPath('metadata.repository@url') - ); - if (sourceUrl) { - dep.sourceUrl = sourceUrl; - } - } - } else if ( - Object.prototype.hasOwnProperty.call( - pkgUrlListRaw.body.data[0], - 'projectUrl' - ) - ) { - dep.sourceUrl = parse(pkgUrlListRaw.body.data[0].projectUrl); - } - } catch (err) /* istanbul ignore next */ { - logger.debug( - { err, pkgName, feedUrl }, - `nuget registry failure: can't parse pkg info for project url` - ); + if (dep != null) { + break; } - - return dep; - } catch (err) { - logger.debug( - { err, pkgName, feedUrl }, - 'nuget registry failure: Unknown error' - ); - return null; } -} - -async function getPkgReleasesFromV2Feed(feedUrl, pkgName) { - const pkgUrlList = `${feedUrl}/FindPackagesById()?id=%27${pkgName}%27&$orderby=LastUpdated%20desc&$select=Version`; - const pkgUrl = `${feedUrl}/FindPackagesById()?id=%27${pkgName}%27&$orderby=LastUpdated%20desc&$top=1`; - const dep = { - pkgName, - }; - try { - const pkgVersionsListRaw = await got(pkgUrlList, { retry: 5 }); - const pkgLatestRaw = await got(pkgUrl, { retry: 5 }); - if (pkgVersionsListRaw.statusCode !== 200) { - logger.debug( - { dependency: pkgName, pkgVersionsListRaw }, - `nuget registry failure: status code != 200` - ); - return null; - } - if (pkgLatestRaw.statusCode !== 200) { - logger.debug( - { dependency: pkgName, pkgVersionsListRaw }, - `nuget registry failure: status code != 200` - ); - return null; - } - const pkgInfoList = new XmlDocument( - pkgVersionsListRaw.body - ).children.filter(node => node.name === 'entry'); - - dep.releases = (pkgInfoList || []) - .map(info => info.children.find(child => child.name === 'm:properties')) - .map(item => ({ - version: item.children.find(child => child.name === 'd:Version').val, - })); - - try { - const pkgInfo = new XmlDocument(pkgLatestRaw.body).children.filter( - node => node.name === 'entry' - )[0]; - dep.sourceUrl = parse( - pkgInfo.children - .filter(child => child.name === 'm:properties')[0] - .children.filter(child => child.name === 'd:ProjectUrl')[0].val - ); - } catch (err) /* istanbul ignore next */ { - logger.debug( - { err, pkgName, feedUrl }, - `nuget registry failure: can't parse pkg info for project url` - ); - } - - return dep; - } catch (err) { - logger.debug( - { err, pkgName, feedUrl }, - 'nuget registry failure: Unknown error' + if (dep === null) { + logger.info( + { lookupName }, + `Dependency lookup failure: not found in all feeds` ); - return null; } + return dep; } function detectFeedVersion(url) { @@ -177,27 +45,3 @@ function detectFeedVersion(url) { return null; } } - -async function getQueryUrlForV3Feed(url) { - // https://docs.microsoft.com/en-us/nuget/api/search-query-service-resource - try { - const servicesIndexRaw = await got(url, { retry: 5, json: true }); - if (servicesIndexRaw.statusCode !== 200) { - logger.debug( - { dependency: url, servicesIndexRaw }, - `nuget registry failure: status code != 200` - ); - return null; - } - const searchQueryService = servicesIndexRaw.body.resources.find( - resource => resource['@type'] === 'SearchQueryService' - ); - return searchQueryService['@id']; - } catch (e) { - logger.debug( - { e }, - `nuget registry failure: can't get SearchQueryService form ${url}` - ); - return null; - } -} diff --git a/lib/datasource/nuget/v2.js b/lib/datasource/nuget/v2.js new file mode 100644 index 0000000000000000000000000000000000000000..4c51e93800f10b7e62f2ef75e54e0f113c3339e3 --- /dev/null +++ b/lib/datasource/nuget/v2.js @@ -0,0 +1,61 @@ +const parse = require('github-url-from-git'); +const { XmlDocument } = require('xmldoc'); +const get = require('./get'); + +module.exports = { + getPkgReleases, +}; + +async function getPkgReleases(feedUrl, pkgName) { + const pkgUrlList = `${feedUrl}/FindPackagesById()?id=%27${pkgName}%27&$select=Version,IsLatestVersion,ProjectUrl`; + const dep = { + pkgName, + }; + try { + const pkgVersionsListRaw = await get(pkgUrlList, { retry: 5 }); + if (pkgVersionsListRaw.statusCode !== 200) { + logger.debug( + { dependency: pkgName, pkgVersionsListRaw }, + `nuget registry failure: status code != 200` + ); + return null; + } + const pkgInfoList = new XmlDocument( + pkgVersionsListRaw.body + ).children.filter(node => node.name === 'entry'); + + dep.releases = []; + + for (const pkgInfo of pkgInfoList || []) { + const pkgVersion = getPkgProp(pkgInfo, 'Version'); + dep.releases.push({ + version: pkgVersion, + }); + try { + const pkgIsLatestVersion = getPkgProp(pkgInfo, 'IsLatestVersion'); + if (pkgIsLatestVersion === 'true') { + dep.sourceUrl = parse(getPkgProp(pkgInfo, 'ProjectUrl')); + } + } catch (err) /* istanbul ignore next */ { + logger.debug( + { err, pkgName, feedUrl }, + `nuget registry failure: can't parse pkg info for project url` + ); + } + } + + return dep; + } catch (err) { + logger.debug( + { err, pkgName, feedUrl }, + 'nuget registry failure: Unknown error' + ); + return null; + } +} + +function getPkgProp(pkgInfo, propName) { + return pkgInfo.children + .find(child => child.name === 'm:properties') + .children.find(child => child.name === `d:${propName}`).val; +} diff --git a/lib/datasource/nuget/v3.js b/lib/datasource/nuget/v3.js new file mode 100644 index 0000000000000000000000000000000000000000..5c8528e3c749c5c156d808b895e19f301304359d --- /dev/null +++ b/lib/datasource/nuget/v3.js @@ -0,0 +1,111 @@ +const parse = require('github-url-from-git'); +const { XmlDocument } = require('xmldoc'); +const get = require('./get'); + +module.exports = { + getQueryUrl, + getPkgReleases, + getDefaultFeed, +}; + +// https://api.nuget.org/v3/index.json is a default official nuget feed +const defaultNugetFeed = 'https://api.nuget.org/v3/index.json'; + +function getDefaultFeed() { + return defaultNugetFeed; +} + +async function getQueryUrl(url) { + // https://docs.microsoft.com/en-us/nuget/api/search-query-service-resource + try { + const servicesIndexRaw = await get(url, { + retry: 5, + json: true, + }); + if (servicesIndexRaw.statusCode !== 200) { + logger.debug( + { dependency: url, servicesIndexRaw }, + `nuget registry failure: status code != 200` + ); + return null; + } + const searchQueryService = servicesIndexRaw.body.resources.find( + resource => resource['@type'] === 'SearchQueryService' + ); + return searchQueryService['@id']; + } catch (e) { + logger.debug( + { e }, + `nuget registry failure: can't get SearchQueryService form ${url}` + ); + return null; + } +} + +async function getPkgReleases(registryUrl, feedUrl, pkgName) { + const queryUrl = `${feedUrl}?q=PackageId:${pkgName}`; + const dep = { + pkgName, + }; + try { + const pkgUrlListRaw = await get(queryUrl, { + retry: 5, + json: true, + }); + if (pkgUrlListRaw.statusCode !== 200) { + logger.debug( + { dependency: pkgName, pkgUrlListRaw }, + `nuget registry failure: status code != 200` + ); + return null; + } + + // There are no pkgName is current feed + if (pkgUrlListRaw.body.totalHits === 0) { + return null; + } + + dep.releases = (pkgUrlListRaw.body.data[0].versions || []).map(item => ({ + version: item.version, + })); + + try { + // For nuget.org we have a way to get nuspec file + if (registryUrl.toLowerCase() === defaultNugetFeed.toLowerCase()) { + const nugetOrgApi = `https://api.nuget.org/v3-flatcontainer/${pkgName.toLowerCase()}/${ + [...dep.releases].pop().version + }/${pkgName.toLowerCase()}.nuspec`; + const result = await get(nugetOrgApi); + const nuspec = new XmlDocument(result.body); + if (nuspec) { + const sourceUrl = parse( + nuspec.valueWithPath('metadata.repository@url') + ); + if (sourceUrl) { + dep.sourceUrl = sourceUrl; + } + } + } else if ( + Object.prototype.hasOwnProperty.call( + pkgUrlListRaw.body.data[0], + 'projectUrl' + ) + ) { + dep.sourceUrl = parse(pkgUrlListRaw.body.data[0].projectUrl); + } + } catch (err) /* istanbul ignore next */ { + logger.debug( + { err, pkgName, feedUrl }, + `nuget registry failure: can't parse pkg info for project url` + ); + } + + return dep; + } catch (err) { + logger.debug( + { err, pkgName, feedUrl }, + 'nuget registry failure: Unknown error' + ); + return null; + } +} diff --git a/test/_fixtures/nuget/latestV2.xml b/test/_fixtures/nuget/latestV2.xml deleted file mode 100644 index 4195ee5b4f7cac841c16096839e55e3b7327536b..0000000000000000000000000000000000000000 --- a/test/_fixtures/nuget/latestV2.xml +++ /dev/null @@ -1,54 +0,0 @@ -<feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"> - <id>http://schemas.datacontract.org/2004/07/</id> - <title/> - <updated>2019-02-04T11:39:35Z</updated> - <link rel="self" href="https://www.nuget.org/api/v2/Packages"/> - <entry> - <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')</id> - <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> - <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')"/> - <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')"/> - <title type="text">NUnit</title> - <summary type="text">NUnit is a unit-testing framework for all .NET languages with a strong TDD focus.</summary> - <updated>2018-10-07T01:17:31Z</updated> - <author> - <name>Charlie Poole, Rob Prouse</name> - </author> - <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.11.0"/> - <m:properties> - <d:Id>NUnit</d:Id> - <d:Version>3.11.0</d:Version> - <d:NormalizedVersion>3.11.0</d:NormalizedVersion> - <d:Authors>Charlie Poole, Rob Prouse</d:Authors> - <d:Copyright>Copyright (c) 2018 Charlie Poole, Rob Prouse</d:Copyright> - <d:Created m:type="Edm.DateTime">2018-10-07T01:17:31.31</d:Created> - <d:Dependencies>::net20|::net35|::net40|::net45|NETStandard.Library:[1.6.1, ):netstandard1.4|System.Reflection.TypeExtensions:[4.4.0, ):netstandard1.4|NETStandard.Library:[2.0.0, ):netstandard2.0</d:Dependencies> - <d:Description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible.This package includes the NUnit 3 framework assembly, which is referenced by your tests. You will need to install version 3 of the nunit3-console program or a third-party runner that supports NUnit 3 in order to execute tests. Runners intended for use with NUnit 2.x will not run NUnit 3 tests correctly.Supported platforms:- .NET Framework 2.0+- .NET Standard 1.4+- .NET Core</d:Description> - <d:DownloadCount m:type="Edm.Int32">34501529</d:DownloadCount> - <d:GalleryDetailsUrl>https://www.nuget.org/packages/NUnit/3.11.0</d:GalleryDetailsUrl> - <d:IconUrl>https://cdn.rawgit.com/nunit/resources/master/images/icon/nunit_256.png</d:IconUrl> - <d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion> - <d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion> - <d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease> - <d:Language>en-US</d:Language> - <d:LastUpdated m:type="Edm.DateTime">2018-10-07T01:17:31.31</d:LastUpdated> - <d:Published m:type="Edm.DateTime">2018-10-07T01:17:31.31</d:Published> - <d:PackageHash>zecrYxUA5p5w8AZ2bvbBbiUIcrQnZAVPrziNMSWMdcOi0D2Oe7yKUNivWPIQMcUwQDHmWtS/ijnD48ubU/eHZQ==</d:PackageHash> - <d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm> - <d:PackageSize m:type="Edm.Int64">4124503</d:PackageSize> - <d:ProjectUrl>https://github.com/nunit/nunit</d:ProjectUrl> - <d:ReportAbuseUrl>https://www.nuget.org/packages/NUnit/3.11.0/ReportAbuse</d:ReportAbuseUrl> - <d:ReleaseNotes>This package includes the NUnit 3 framework assembly, which is referenced by your tests. You will need to install version 3 of the nunit3-console program or a third-party runner that supports NUnit 3 in order to execute tests. Runners intended for use with NUnit 2.x will not run NUnit 3 tests correctly.</d:ReleaseNotes> - <d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance> - <d:Summary>NUnit is a unit-testing framework for all .NET languages with a strong TDD focus.</d:Summary> - <d:Tags>nunit test testing tdd framework fluent assert theory plugin addin</d:Tags> - <d:Title>NUnit</d:Title> - <d:VersionDownloadCount m:type="Edm.Int32">1282250</d:VersionDownloadCount> - <d:MinClientVersion>2.12</d:MinClientVersion> - <d:LastEdited m:type="Edm.DateTime">2018-10-07T01:21:48.043</d:LastEdited> - <d:LicenseUrl>https://raw.githubusercontent.com/nunit/nunit/master/LICENSE.txt</d:LicenseUrl> - <d:LicenseNames m:null="true"/> - <d:LicenseReportUrl m:null="true"/> - </m:properties> - </entry> -</feed> diff --git a/test/_fixtures/nuget/latestV2_withoutProjectUrl.xml b/test/_fixtures/nuget/latestV2_withoutProjectUrl.xml deleted file mode 100644 index bb8e407a4c34d99782dfefe160cd6ebeab6bc227..0000000000000000000000000000000000000000 --- a/test/_fixtures/nuget/latestV2_withoutProjectUrl.xml +++ /dev/null @@ -1,54 +0,0 @@ -<feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"> - <id>http://schemas.datacontract.org/2004/07/</id> - <title/> - <updated>2019-02-04T11:39:35Z</updated> - <link rel="self" href="https://www.nuget.org/api/v2/Packages"/> - <entry> - <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')</id> - <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> - <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')"/> - <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')"/> - <title type="text">NUnit</title> - <summary type="text">NUnit is a unit-testing framework for all .NET languages with a strong TDD focus.</summary> - <updated>2018-10-07T01:17:31Z</updated> - <author> - <name>Charlie Poole, Rob Prouse</name> - </author> - <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.11.0"/> - <m:properties> - <d:Id>NUnit</d:Id> - <d:Version>3.11.0</d:Version> - <d:NormalizedVersion>3.11.0</d:NormalizedVersion> - <d:Authors>Charlie Poole, Rob Prouse</d:Authors> - <d:Copyright>Copyright (c) 2018 Charlie Poole, Rob Prouse</d:Copyright> - <d:Created m:type="Edm.DateTime">2018-10-07T01:17:31.31</d:Created> - <d:Dependencies>::net20|::net35|::net40|::net45|NETStandard.Library:[1.6.1, ):netstandard1.4|System.Reflection.TypeExtensions:[4.4.0, ):netstandard1.4|NETStandard.Library:[2.0.0, ):netstandard2.0</d:Dependencies> - <d:Description>NUnit features a fluent assert syntax, parameterized, generic and theory tests and is user-extensible.This package includes the NUnit 3 framework assembly, which is referenced by your tests. You will need to install version 3 of the nunit3-console program or a third-party runner that supports NUnit 3 in order to execute tests. Runners intended for use with NUnit 2.x will not run NUnit 3 tests correctly.Supported platforms:- .NET Framework 2.0+- .NET Standard 1.4+- .NET Core</d:Description> - <d:DownloadCount m:type="Edm.Int32">34501529</d:DownloadCount> - <d:GalleryDetailsUrl>https://www.nuget.org/packages/NUnit/3.11.0</d:GalleryDetailsUrl> - <d:IconUrl>https://cdn.rawgit.com/nunit/resources/master/images/icon/nunit_256.png</d:IconUrl> - <d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion> - <d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion> - <d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease> - <d:Language>en-US</d:Language> - <d:LastUpdated m:type="Edm.DateTime">2018-10-07T01:17:31.31</d:LastUpdated> - <d:Published m:type="Edm.DateTime">2018-10-07T01:17:31.31</d:Published> - <d:PackageHash>zecrYxUA5p5w8AZ2bvbBbiUIcrQnZAVPrziNMSWMdcOi0D2Oe7yKUNivWPIQMcUwQDHmWtS/ijnD48ubU/eHZQ==</d:PackageHash> - <d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm> - <d:PackageSize m:type="Edm.Int64">4124503</d:PackageSize> - <d:ProjectUrl/> - <d:ReportAbuseUrl>https://www.nuget.org/packages/NUnit/3.11.0/ReportAbuse</d:ReportAbuseUrl> - <d:ReleaseNotes>This package includes the NUnit 3 framework assembly, which is referenced by your tests. You will need to install version 3 of the nunit3-console program or a third-party runner that supports NUnit 3 in order to execute tests. Runners intended for use with NUnit 2.x will not run NUnit 3 tests correctly.</d:ReleaseNotes> - <d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance> - <d:Summary>NUnit is a unit-testing framework for all .NET languages with a strong TDD focus.</d:Summary> - <d:Tags>nunit test testing tdd framework fluent assert theory plugin addin</d:Tags> - <d:Title>NUnit</d:Title> - <d:VersionDownloadCount m:type="Edm.Int32">1282250</d:VersionDownloadCount> - <d:MinClientVersion>2.12</d:MinClientVersion> - <d:LastEdited m:type="Edm.DateTime">2018-10-07T01:21:48.043</d:LastEdited> - <d:LicenseUrl>https://raw.githubusercontent.com/nunit/nunit/master/LICENSE.txt</d:LicenseUrl> - <d:LicenseNames m:null="true"/> - <d:LicenseReportUrl m:null="true"/> - </m:properties> - </entry> -</feed> diff --git a/test/_fixtures/nuget/nunitV2.xml b/test/_fixtures/nuget/nunitV2.xml index 9dc7307fedbf92192b4e18d6eb2c6920bf59aef0..77941e507c7c963eab30f2cb5c12e6f20b06e1a4 100644 --- a/test/_fixtures/nuget/nunitV2.xml +++ b/test/_fixtures/nuget/nunitV2.xml @@ -16,6 +16,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.11.0"/> <m:properties> <d:Version>3.11.0</d:Version> + <d:IsLatestVersion>true</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit</d:ProjectUrl> </m:properties> </entry> <entry> @@ -31,6 +33,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.7.0"/> <m:properties> <d:Version>2.7.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -46,6 +50,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.7"/> <m:properties> <d:Version>2.6.7</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -61,6 +67,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.6"/> <m:properties> <d:Version>2.6.6</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -76,6 +84,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.5"/> <m:properties> <d:Version>2.6.5</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -91,6 +101,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.10.1"/> <m:properties> <d:Version>3.10.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -106,6 +118,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.10.0"/> <m:properties> <d:Version>3.10.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -121,6 +135,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.9.0"/> <m:properties> <d:Version>3.9.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -136,6 +152,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.8.1"/> <m:properties> <d:Version>3.8.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -151,6 +169,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.8.0"/> <m:properties> <d:Version>3.8.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -166,6 +186,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.7.1"/> <m:properties> <d:Version>3.7.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -181,6 +203,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.7.0"/> <m:properties> <d:Version>3.7.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -196,6 +220,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.6.1"/> <m:properties> <d:Version>3.6.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -211,6 +237,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.6.0"/> <m:properties> <d:Version>3.6.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -226,6 +254,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.5.0"/> <m:properties> <d:Version>3.5.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -241,6 +271,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.4.1"/> <m:properties> <d:Version>3.4.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -256,6 +288,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.4.0"/> <m:properties> <d:Version>3.4.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -271,6 +305,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.2.1"/> <m:properties> <d:Version>3.2.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -301,6 +337,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.1"/> <m:properties> <d:Version>3.0.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -316,6 +354,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0"/> <m:properties> <d:Version>3.0.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -331,6 +371,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.4"/> <m:properties> <d:Version>2.6.4</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -346,6 +388,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-rc-3"/> <m:properties> <d:Version>3.0.0-rc-3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -361,6 +405,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-rc-2"/> <m:properties> <d:Version>3.0.0-rc-2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -376,6 +422,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-rc"/> <m:properties> <d:Version>3.0.0-rc</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -391,6 +439,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-5"/> <m:properties> <d:Version>3.0.0-beta-5</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -406,6 +456,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-4"/> <m:properties> <d:Version>3.0.0-beta-4</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -421,6 +473,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.3"/> <m:properties> <d:Version>2.6.3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -436,6 +490,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.2"/> <m:properties> <d:Version>2.6.2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -451,6 +507,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha"/> <m:properties> <d:Version>3.0.0-alpha</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -466,6 +524,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.0.12054"/> <m:properties> <d:Version>2.6.0.12054</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -481,6 +541,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.1"/> <m:properties> <d:Version>2.6.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -496,6 +558,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-2"/> <m:properties> <d:Version>3.0.0-beta-2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -511,6 +575,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-3"/> <m:properties> <d:Version>3.0.0-beta-3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -526,6 +592,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.5.10.11092"/> <m:properties> <d:Version>2.5.10.11092</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -541,6 +609,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.5.7.10213"/> <m:properties> <d:Version>2.5.7.10213</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -556,6 +626,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.0.12051"/> <m:properties> <d:Version>2.6.0.12051</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -571,6 +643,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-3"/> <m:properties> <d:Version>3.0.0-alpha-3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -586,6 +660,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-1"/> <m:properties> <d:Version>3.0.0-beta-1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -601,6 +677,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-4"/> <m:properties> <d:Version>3.0.0-alpha-4</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -616,6 +694,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.5.9.10348"/> <m:properties> <d:Version>2.5.9.10348</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -631,6 +711,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-2"/> <m:properties> <d:Version>3.0.0-alpha-2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> <entry> @@ -646,6 +728,8 @@ <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-5"/> <m:properties> <d:Version>3.0.0-alpha-5</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> </m:properties> </entry> </feed> diff --git a/test/_fixtures/nuget/nunitV2_withoutProjectUrl.xml b/test/_fixtures/nuget/nunitV2_withoutProjectUrl.xml new file mode 100644 index 0000000000000000000000000000000000000000..a3b1cefd70dbe085ac213877f12740bce2f3557a --- /dev/null +++ b/test/_fixtures/nuget/nunitV2_withoutProjectUrl.xml @@ -0,0 +1,734 @@ +<feed xml:base="https://www.nuget.org/api/v2" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"> + <id>http://schemas.datacontract.org/2004/07/</id> + <title/> + <updated>2019-02-04T12:51:36Z</updated> + <link rel="self" href="https://www.nuget.org/api/v2/Packages"/> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.11.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.11.0"/> + <m:properties> + <d:Version>3.11.0</d:Version> + <d:IsLatestVersion>true</d:IsLatestVersion> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.7.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.7.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.7.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.7.0"/> + <m:properties> + <d:Version>2.7.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.7')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.7')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.7')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.7"/> + <m:properties> + <d:Version>2.6.7</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.6')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.6')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.6')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.6"/> + <m:properties> + <d:Version>2.6.6</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.5')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.5')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.5')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.5"/> + <m:properties> + <d:Version>2.6.5</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.10.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.10.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.10.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.10.1"/> + <m:properties> + <d:Version>3.10.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.10.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.10.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.10.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.10.0"/> + <m:properties> + <d:Version>3.10.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.9.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.9.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.9.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.9.0"/> + <m:properties> + <d:Version>3.9.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.8.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.8.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.8.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.8.1"/> + <m:properties> + <d:Version>3.8.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.8.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.8.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.8.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.8.0"/> + <m:properties> + <d:Version>3.8.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.7.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.7.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.7.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.7.1"/> + <m:properties> + <d:Version>3.7.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.7.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.7.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.7.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.7.0"/> + <m:properties> + <d:Version>3.7.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.6.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.6.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.6.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.6.1"/> + <m:properties> + <d:Version>3.6.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.6.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.6.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.6.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.6.0"/> + <m:properties> + <d:Version>3.6.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.5.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.5.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.5.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.5.0"/> + <m:properties> + <d:Version>3.5.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.4.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.4.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.4.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.4.1"/> + <m:properties> + <d:Version>3.4.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.4.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.4.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.4.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.4.0"/> + <m:properties> + <d:Version>3.4.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.2.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.2.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.2.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.2.1"/> + <m:properties> + <d:Version>3.2.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.2.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.2.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.2.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.2.0"/> + <m:properties> + <d:Version>3.2.0</d:Version> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.1"/> + <m:properties> + <d:Version>3.0.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0"/> + <m:properties> + <d:Version>3.0.0</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.4')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.4')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.4')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.4"/> + <m:properties> + <d:Version>2.6.4</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc-3')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc-3')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc-3')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-rc-3"/> + <m:properties> + <d:Version>3.0.0-rc-3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc-2')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc-2')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc-2')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-rc-2"/> + <m:properties> + <d:Version>3.0.0-rc-2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-rc')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-rc"/> + <m:properties> + <d:Version>3.0.0-rc</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-5')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-5')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-5')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-5"/> + <m:properties> + <d:Version>3.0.0-beta-5</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-4')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-4')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-4')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-4"/> + <m:properties> + <d:Version>3.0.0-beta-4</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.3')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.3')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.3')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.3"/> + <m:properties> + <d:Version>2.6.3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.2')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.2')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.2')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.2"/> + <m:properties> + <d:Version>2.6.2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha"/> + <m:properties> + <d:Version>3.0.0-alpha</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.0.12054')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.0.12054')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.0.12054')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.0.12054"/> + <m:properties> + <d:Version>2.6.0.12054</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.1"/> + <m:properties> + <d:Version>2.6.1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-2')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-2')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-2')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-2"/> + <m:properties> + <d:Version>3.0.0-beta-2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-3')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-3')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-3')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-3"/> + <m:properties> + <d:Version>3.0.0-beta-3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.10.11092')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.10.11092')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.10.11092')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.5.10.11092"/> + <m:properties> + <d:Version>2.5.10.11092</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.7.10213')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.7.10213')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.7.10213')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.5.7.10213"/> + <m:properties> + <d:Version>2.5.7.10213</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.0.12051')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.0.12051')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.6.0.12051')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.6.0.12051"/> + <m:properties> + <d:Version>2.6.0.12051</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-3')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-3')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-3')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-3"/> + <m:properties> + <d:Version>3.0.0-alpha-3</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-1')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-1')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-beta-1')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-beta-1"/> + <m:properties> + <d:Version>3.0.0-beta-1</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-4')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-4')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-4')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-4"/> + <m:properties> + <d:Version>3.0.0-alpha-4</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.9.10348')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.9.10348')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='2.5.9.10348')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/2.5.9.10348"/> + <m:properties> + <d:Version>2.5.9.10348</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-2')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-2')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-2')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-2"/> + <m:properties> + <d:Version>3.0.0-alpha-2</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> + <entry> + <id>https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-5')</id> + <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> + <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-5')"/> + <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='NUnit',Version='3.0.0-alpha-5')"/> + <title type="text">NUnit</title> + <updated>2019-02-04T12:51:36Z</updated> + <author> + <name/> + </author> + <content type="application/zip" src="https://www.nuget.org/api/v2/package/NUnit/3.0.0-alpha-5"/> + <m:properties> + <d:Version>3.0.0-alpha-5</d:Version> + <d:IsLatestVersion>false</d:IsLatestVersion> + <d:ProjectUrl>https://github.com/nunit/nunit-old</d:ProjectUrl> + </m:properties> + </entry> +</feed> diff --git a/test/datasource/nuget.spec.js b/test/datasource/nuget.spec.js index d8ba31083bbb9f06acb120f5bfedfbc0d610da8f..4e39ae9069d59b7a61faa0d938eb4b6d0ebe6c65 100644 --- a/test/datasource/nuget.spec.js +++ b/test/datasource/nuget.spec.js @@ -1,8 +1,10 @@ const fs = require('fs'); const got = require('../../lib/util/got'); const datasource = require('../../lib/datasource'); +const hostRules = require('../../lib/util/host-rules'); jest.mock('../../lib/util/got'); +jest.mock('../../lib/util/host-rules'); const pkgListV3 = fs.readFileSync('test/_fixtures/nuget/nunitV3.json', 'utf8'); const pkgListV3WithoutProkjectUrl = fs.readFileSync( @@ -15,13 +17,8 @@ const pkgInfoV3FromNuget = fs.readFileSync( ); const pkgListV2 = fs.readFileSync('test/_fixtures/nuget/nunitV2.xml', 'utf8'); - -const pkgLatestV2 = fs.readFileSync( - 'test/_fixtures/nuget/latestV2.xml', - 'utf8' -); -const pkgLatestV2WithoutProkjectUrl = fs.readFileSync( - 'test/_fixtures/nuget/latestV2_withoutProjectUrl.xml', +const pkgListV2WithoutProjectUrl = fs.readFileSync( + 'test/_fixtures/nuget/nunitV2_withoutProjectUrl.xml', 'utf8' ); @@ -30,6 +27,11 @@ const nugetIndexV3 = fs.readFileSync( 'utf8' ); +const configNoRegistryUrls = { + datasource: 'nuget', + lookupName: 'nunit', +}; + const configV3V2 = { datasource: 'nuget', lookupName: 'nunit', @@ -60,6 +62,7 @@ const configV3NotNugetOrg = { describe('datasource/nuget', () => { describe('getPkgReleases', () => { beforeEach(() => { + jest.resetAllMocks(); global.repoCache = {}; }); @@ -77,6 +80,39 @@ describe('datasource/nuget', () => { ).toBeNull(); }); + it('supports basic authentication', async () => { + got.mockReturnValueOnce({ + body: JSON.parse(nugetIndexV3), + statusCode: 200, + }); + got.mockReturnValueOnce({ + body: JSON.parse('{"totalHits": 0}'), + statusCode: 200, + }); + + hostRules.find.mockReturnValue({ + username: 'some-username', + password: 'some-password', + }); + + await datasource.getPkgReleases({ + ...configV3, + }); + + expect(got.mock.calls[0][1].headers.Authorization).toBe( + 'Basic c29tZS11c2VybmFtZTpzb21lLXBhc3N3b3Jk' + ); + }); + + it('queries the default nuget feed if no registries are supplied', async () => { + await datasource.getPkgReleases({ + ...configNoRegistryUrls, + }); + expect(got.mock.calls[0][0]).toEqual( + 'https://api.nuget.org/v3/index.json' + ); + }); + it(`can't get packages list (v3)`, async () => { got.mockReturnValueOnce({ body: JSON.parse(nugetIndexV3), @@ -106,21 +142,6 @@ describe('datasource/nuget', () => { expect(res).toBeNull(); }); - it(`can't get package info (v2)`, async () => { - got.mockReturnValueOnce({ - body: pkgListV2, - statusCode: 200, - }); - got.mockReturnValueOnce({ - body: pkgLatestV2, - statusCode: 500, - }); - expect( - await datasource.getPkgReleases({ - ...configV2, - }) - ).toBeNull(); - }); it('returns null for empty result (v3v2)', async () => { got.mockReturnValueOnce({}); @@ -286,10 +307,6 @@ describe('datasource/nuget', () => { body: pkgListV2, statusCode: 200, }); - got.mockReturnValueOnce({ - body: pkgLatestV2, - statusCode: 200, - }); const res = await datasource.getPkgReleases({ ...configV2, }); @@ -299,11 +316,7 @@ describe('datasource/nuget', () => { }); it('processes real data without project url (v2)', async () => { got.mockReturnValueOnce({ - body: pkgListV2, - statusCode: 200, - }); - got.mockReturnValueOnce({ - body: pkgLatestV2WithoutProkjectUrl, + body: pkgListV2WithoutProjectUrl, statusCode: 200, }); const res = await datasource.getPkgReleases({ diff --git a/test/util/__snapshots__/host-rules.spec.js.snap b/test/util/__snapshots__/host-rules.spec.js.snap index 8504cee9c6acbf13a3e7cd70845d843ce91b0f17..038ccb41b7d477d746ff34bb71d6a74027e73083 100644 --- a/test/util/__snapshots__/host-rules.spec.js.snap +++ b/test/util/__snapshots__/host-rules.spec.js.snap @@ -22,6 +22,34 @@ Object { } `; +exports[`util/host-rules find() matches on endpoint 1`] = ` +Object { + "endpoint": "https://nuget.local/api/", + "platform": "nuget", +} +`; + +exports[`util/host-rules find() matches on endpoint subresource 1`] = ` +Object { + "endpoint": "https://nuget.local/api/", + "platform": "nuget", +} +`; + +exports[`util/host-rules find() needs exact host matches 1`] = ` +Object { + "endpoint": "endpoint/", + "host": "nuget.org", + "password": "p4$$w0rd", + "platform": "nuget", + "username": "root", +} +`; + +exports[`util/host-rules find() needs exact host matches 2`] = `null`; + +exports[`util/host-rules find() needs exact host matches 3`] = `null`; + exports[`util/host-rules update() supports endpoint-only 1`] = ` Object { "endpoint": "https://some.endpoint", diff --git a/test/util/host-rules.spec.js b/test/util/host-rules.spec.js index 478587e5a49d5c6d831c494020e162b494d94441..baed5756744eda31233718188901bc9b295c5f9b 100644 --- a/test/util/host-rules.spec.js +++ b/test/util/host-rules.spec.js @@ -65,5 +65,42 @@ describe('util/host-rules', () => { find({ platform: 'github', host: 'example.com' }, overrides) ).toMatchSnapshot(); }); + it('needs exact host matches', () => { + update({ + platform: 'nuget', + endpoint: 'endpoint', + host: 'nuget.org', + username: 'root', + password: 'p4$$w0rd', + }); + expect(find({ platform: 'nuget', host: 'nuget.org' })).toMatchSnapshot(); + expect( + find({ platform: 'nuget', host: 'not.nuget.org' }) + ).toMatchSnapshot(); + expect( + find({ platform: 'nuget', host: 'not-nuget.org' }) + ).toMatchSnapshot(); + }); + it('matches on endpoint', () => { + update({ + platform: 'nuget', + endpoint: 'https://nuget.local/api', + }); + expect( + find({ platform: 'nuget', endpoint: 'https://nuget.local/api' }) + ).toMatchSnapshot(); + }); + it('matches on endpoint subresource', () => { + update({ + platform: 'nuget', + endpoint: 'https://nuget.local/api', + }); + expect( + find({ + platform: 'nuget', + endpoint: 'https://nuget.local/api/sub-resource', + }) + ).toMatchSnapshot(); + }); }); }); diff --git a/website/docs/nuget.md b/website/docs/nuget.md index 7594ffa5ace3ba46eb8942d87c36d93a1cc56e94..42e28032760a09511bac3e3c65d9e8499a4a92c9 100644 --- a/website/docs/nuget.md +++ b/website/docs/nuget.md @@ -21,10 +21,10 @@ To convert your .NET Framework .csproj into an SDK-style project, one can follow 1. Renovate will search each repository for any files with a `.csproj` extension. 2. Existing dependencies will be extracted from `<PackageReference>` tags -3. Renovate will look up the latest version on [nuget.org](https://nuget.org) to determine if any upgrades are available +3. Renovate will look up the latest version on [nuget.org](https://nuget.org) (or on [alternate feeds](#Alternate%20feeds)) to determine if any upgrades are available 4. If the source package includes a GitHub URL as its source, and has either a "changelog" file or uses GitHub releases, then Release Notes for each version will be embedded in the generated PR. -## Alternate nuget feeds +## Alternate feeds Renovate by default performs all lookups on `https://api.nuget.org/v3/index.json`, but it also supports alternative nuget feeds. Alternative feeds can be specified in configuration file: @@ -40,6 +40,23 @@ Renovate by default performs all lookups on `https://api.nuget.org/v3/index.json If this example we defined 3 nuget feeds. Packages resolving will process feeds consequentially. It means that if package will be resolved in second feed renovate won't look in last one. +## Authenticated feeds + +Credentials for authenticated/private feeds can be provided via host rules in the configuration options (file or command line parameter). + +```json +"hostRules": [ + { + "platform": "nuget", + "endpoint": "http://example1.com/nuget", + "username": "root", + "password": "p4$$w0rd" + } +] +``` + +Please note that at the moment only Basic HTTP authentication (via username and password) is supported. + ## Future work Contributions and/or feature requests are welcome to support more patterns or additional use cases.