Compare commits

...

12 commits

Author SHA1 Message Date
Sean Killeen
b9be4da2bb
Merge 5ab6623068 into af92345cc0 2024-12-28 08:37:51 +00:00
Sean Killeen
5ab6623068
Merge branch 'main' into 14128_nuget-release-notes 2024-07-31 07:37:52 -04:00
Sean Killeen
f3ee3d85bc
Merge branch 'main' into 14128_nuget-release-notes 2024-07-30 22:08:44 -04:00
Sean Killeen
e9b7683baa fix the interface it was on. D'oh. 2024-07-31 01:01:18 +00:00
Sean Killeen
136e92c485
Merge branch 'main' into 14128_nuget-release-notes 2024-07-30 20:42:23 -04:00
Sean Killeen
09911e3c86 Passing test 2024-07-31 00:32:06 +00:00
Sean Killeen
f333f8c6a8 fix snapshot 2024-07-31 00:24:14 +00:00
Sean Killeen
3ac24f40b7 fix snapshot 2024-07-31 00:23:30 +00:00
Sean Killeen
14da4f4495 fix 2 snapshots 2024-07-31 00:22:51 +00:00
Sean Killeen
b60363c326 Test that should fail, as I'm expecting null to get it to fail 2024-07-31 00:15:19 +00:00
Sean Killeen
aaeae9dfd6 capture release notes from XML 2024-07-31 00:14:47 +00:00
Sean Killeen
80aeecd1bd Add field for directly provided release notes 2024-07-31 00:14:36 +00:00
4 changed files with 61 additions and 0 deletions

View file

@ -211,6 +211,10 @@ exports[`modules/datasource/nuget/index getReleases processes real data (v2) 1`]
exports[`modules/datasource/nuget/index getReleases processes real data (v3) feed is a nuget.org 1`] = ` exports[`modules/datasource/nuget/index getReleases processes real data (v3) feed is a nuget.org 1`] = `
{ {
"datasourceProvidedReleaseNotes": "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.
",
"homepage": "https://nunit.org/", "homepage": "https://nunit.org/",
"registryUrl": "https://api.nuget.org/v3/index.json", "registryUrl": "https://api.nuget.org/v3/index.json",
"releases": [ "releases": [
@ -402,6 +406,10 @@ exports[`modules/datasource/nuget/index getReleases processes real data (v3) fee
exports[`modules/datasource/nuget/index getReleases processes real data (v3) feed is not a nuget.org 1`] = ` exports[`modules/datasource/nuget/index getReleases processes real data (v3) feed is not a nuget.org 1`] = `
{ {
"datasourceProvidedReleaseNotes": "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.
",
"registryUrl": "https://myprivatefeed/index.json", "registryUrl": "https://myprivatefeed/index.json",
"releases": [ "releases": [
{ {
@ -591,6 +599,33 @@ exports[`modules/datasource/nuget/index getReleases processes real data (v3) fee
exports[`modules/datasource/nuget/index getReleases processes real data (v3) for several catalog pages 1`] = ` exports[`modules/datasource/nuget/index getReleases processes real data (v3) for several catalog pages 1`] = `
{ {
"datasourceProvidedReleaseNotes": "## Features
- Allow to change the RuleName of a LoggingRule (#4017) (@304NotModified)
- logging of AggregrateException.Data to prevent it from losing it after Flatten call (#3974) (@chaos0307)
## Bugfixes
- LocalIpAddressLayoutRenderer - IsDnsEligible and PrefixOrigin throws PlatformNotSupportedException on Linux
(#4011) (@snakefoot)
## Improvements
- ObjectReflectionCache - Reduce noise from properties that throws exceptions like Stream.ReadTimeout (#4057)
(@snakefoot)
- MessageTemplates - Changed Literal.Skip to be Int32 to support message templates longer than short.MaxValue
(#4053) (@snakefoot)
- ObjectReflectionCache - Skip reflection for Stream objects (#4043) (@snakefoot)
- LogFactory Shutdown is public so it can be used from NLogLoggerProvider (#3999) (@snakefoot)
- Editor config with File header template (#3972) (@304NotModified)
## Performance
- FileTarget - Skip delegate capture in GetFileCreationTimeSource. Fallback only necessary when appender has been
closed. (#4058) (@snakefoot)
- ObjectReflectionCache - Reduce initial memory allocation until needed (#4021) (@snakefoot)
- FilteringTargetWrapper - Remove delegate allocation (#3977) (@snakefoot)
Full changelog: https://github.com/NLog/NLog/blob/master/CHANGELOG.md
For all config options and platform support, check https://nlog-project.org/config/
",
"homepage": "https://nlog-project.org/", "homepage": "https://nlog-project.org/",
"registryUrl": "https://api.nuget.org/v3/index.json", "registryUrl": "https://api.nuget.org/v3/index.json",
"releases": [ "releases": [
@ -1848,6 +1883,10 @@ exports[`modules/datasource/nuget/index getReleases processes real data without
exports[`modules/datasource/nuget/index getReleases returns deduplicated results 1`] = ` exports[`modules/datasource/nuget/index getReleases returns deduplicated results 1`] = `
{ {
"datasourceProvidedReleaseNotes": "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.
",
"homepage": "https://nunit.org/", "homepage": "https://nunit.org/",
"releases": [ "releases": [
{ {

View file

@ -607,6 +607,26 @@ describe('modules/datasource/nuget/index', () => {
expect(res?.sourceUrl).toBeDefined(); expect(res?.sourceUrl).toBeDefined();
}); });
it('captures release notes', async () => {
httpMock
.scope('https://api.nuget.org')
.get('/v3/index.json')
.twice()
.reply(200, nugetIndexV3)
.get('/v3/registration5-gz-semver2/nunit/index.json')
.reply(200, pkgListV3Registration)
.get('/v3-flatcontainer/nunit/3.12.0/nunit.nuspec')
.reply(200, pkgInfoV3FromNuget);
const res = await getPkgReleases({
...configV3,
});
expect(res.datasourceProvidedReleaseNotes)
.toBe(`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.
`);
});
it('processes real data (v3) feed is azure devops', async () => { it('processes real data (v3) feed is azure devops', async () => {
httpMock httpMock
.scope('https://pkgs.dev.azure.com') .scope('https://pkgs.dev.azure.com')

View file

@ -214,6 +214,7 @@ export class NugetV3Api {
const metaresult = await http.get(nuspecUrl); const metaresult = await http.get(nuspecUrl);
const nuspec = new XmlDocument(metaresult.body); const nuspec = new XmlDocument(metaresult.body);
const sourceUrl = nuspec.valueWithPath('metadata.repository@url'); const sourceUrl = nuspec.valueWithPath('metadata.repository@url');
dep.datasourceProvidedReleaseNotes = nuspec.valueWithPath('metadata.releaseNotes');
if (sourceUrl) { if (sourceUrl) {
dep.sourceUrl = massageUrl(sourceUrl); dep.sourceUrl = massageUrl(sourceUrl);
} }

View file

@ -91,6 +91,7 @@ export interface ReleaseResult {
replacementVersion?: string; replacementVersion?: string;
lookupName?: string; lookupName?: string;
packageScope?: string; packageScope?: string;
datasourceProvidedReleaseNotes?: string | undefined;
} }
export interface PostprocessReleaseConfig { export interface PostprocessReleaseConfig {