Skip to content

Commit 22dbf21

Browse files
committed
feat(nuget)!: Split the product / technology namespace from the name
Use up to two namespace nodes from the name that identify the company and product / technology as defined at [1] as the namespace. This allows to write curations with empty name and version that affect a whole product / technology, and to set e.g. a concluded license for all "Microsoft.AspNetCore" packages. [1]: https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-namespaces Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 5fc5e54 commit 22dbf21

File tree

9 files changed

+263
-167
lines changed

9 files changed

+263
-167
lines changed

plugins/package-managers/nuget/src/funTest/assets/dotnet-expected-output.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ project:
1818
scopes:
1919
- name: "net45"
2020
dependencies:
21-
- id: "NuGet::System.Runtime.CompilerServices.Unsafe:4.5.3"
22-
- id: "NuGet::System.Threading.Tasks.Extensions:4.5.4"
21+
- id: "NuGet:System.Runtime:CompilerServices.Unsafe:4.5.3"
22+
- id: "NuGet:System.Threading:Tasks.Extensions:4.5.4"
2323
packages:
24-
- id: "NuGet::System.Runtime.CompilerServices.Unsafe:4.5.3"
24+
- id: "NuGet:System.Runtime:CompilerServices.Unsafe:4.5.3"
2525
purl: "pkg:nuget/[email protected]"
2626
authors:
2727
- "Microsoft"
@@ -54,7 +54,7 @@ packages:
5454
url: ""
5555
revision: ""
5656
path: ""
57-
- id: "NuGet::System.Threading.Tasks.Extensions:4.5.4"
57+
- id: "NuGet:System.Threading:Tasks.Extensions:4.5.4"
5858
purl: "pkg:nuget/[email protected]"
5959
authors:
6060
- "Microsoft"

plugins/package-managers/nuget/src/funTest/assets/dotnet-license-expected-output.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ project:
1818
scopes:
1919
- name: "netstandard2.0"
2020
dependencies:
21-
- id: "NuGet::Newtonsoft.Json:13.0.2"
21+
- id: "NuGet:Newtonsoft:Json:13.0.2"
2222
packages:
23-
- id: "NuGet::Newtonsoft.Json:13.0.2"
23+
- id: "NuGet:Newtonsoft:Json:13.0.2"
2424
purl: "pkg:nuget/[email protected]"
2525
authors:
2626
- "James Newton-King"

plugins/package-managers/nuget/src/funTest/assets/dotnet-many-deps-expected-output.yml

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ project:
1818
scopes:
1919
- name: "net48"
2020
dependencies:
21-
- id: "NuGet::Microsoft.Bcl.AsyncInterfaces:7.0.0"
22-
- id: "NuGet::System.Buffers:4.5.1"
23-
- id: "NuGet::System.Memory:4.5.5"
24-
- id: "NuGet::System.Net.Http.Json:7.0.0"
25-
- id: "NuGet::System.Numerics.Vectors:4.5.0"
26-
- id: "NuGet::System.Runtime.CompilerServices.Unsafe:6.0.0"
27-
- id: "NuGet::System.Text.Encodings.Web:7.0.0"
28-
- id: "NuGet::System.Text.Json:7.0.2"
29-
- id: "NuGet::System.Threading.Tasks.Extensions:4.5.4"
30-
- id: "NuGet::System.ValueTuple:4.5.0"
21+
- id: "NuGet:Microsoft.Bcl:AsyncInterfaces:7.0.0"
22+
- id: "NuGet:System:Buffers:4.5.1"
23+
- id: "NuGet:System:Memory:4.5.5"
24+
- id: "NuGet:System:ValueTuple:4.5.0"
25+
- id: "NuGet:System.Net:Http.Json:7.0.0"
26+
- id: "NuGet:System.Numerics:Vectors:4.5.0"
27+
- id: "NuGet:System.Runtime:CompilerServices.Unsafe:6.0.0"
28+
- id: "NuGet:System.Text:Encodings.Web:7.0.0"
29+
- id: "NuGet:System.Text:Json:7.0.2"
30+
- id: "NuGet:System.Threading:Tasks.Extensions:4.5.4"
3131
packages:
32-
- id: "NuGet::Microsoft.Bcl.AsyncInterfaces:7.0.0"
32+
- id: "NuGet:Microsoft.Bcl:AsyncInterfaces:7.0.0"
3333
purl: "pkg:nuget/[email protected]"
3434
authors:
3535
- "Microsoft"
@@ -61,7 +61,7 @@ packages:
6161
url: "https://github.com/dotnet/runtime.git"
6262
revision: "d099f075e45d2aa6007a22b71b45a08758559f80"
6363
path: ""
64-
- id: "NuGet::System.Buffers:4.5.1"
64+
- id: "NuGet:System:Buffers:4.5.1"
6565
purl: "pkg:nuget/[email protected]"
6666
authors:
6767
- "Microsoft"
@@ -94,7 +94,7 @@ packages:
9494
url: ""
9595
revision: ""
9696
path: ""
97-
- id: "NuGet::System.Memory:4.5.5"
97+
- id: "NuGet:System:Memory:4.5.5"
9898
purl: "pkg:nuget/[email protected]"
9999
authors:
100100
- "Microsoft"
@@ -128,7 +128,40 @@ packages:
128128
url: ""
129129
revision: ""
130130
path: ""
131-
- id: "NuGet::System.Net.Http.Json:7.0.0"
131+
- id: "NuGet:System:ValueTuple:4.5.0"
132+
purl: "pkg:nuget/[email protected]"
133+
authors:
134+
- "Microsoft"
135+
declared_licenses:
136+
- "https://github.com/dotnet/corefx/blob/master/LICENSE.TXT"
137+
declared_licenses_processed:
138+
spdx_expression: "MIT"
139+
mapped:
140+
https://github.com/dotnet/corefx/blob/master/LICENSE.TXT: "MIT"
141+
description: "Provides the System.ValueTuple structs, which implement the underlying\
142+
\ types for tuples in C# and Visual Basic."
143+
homepage_url: "https://dot.net/"
144+
binary_artifact:
145+
url: "https://api.nuget.org/v3-flatcontainer/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg"
146+
hash:
147+
value: "fa00ebb5045d12c51274f64411c551981beceb1266a8606a4731063109b95ea1f15939197bf3d2ba899db61e593dc39bfce876908bba34286823525093ae3d8e"
148+
algorithm: "SHA-512"
149+
source_artifact:
150+
url: ""
151+
hash:
152+
value: ""
153+
algorithm: ""
154+
vcs:
155+
type: ""
156+
url: ""
157+
revision: ""
158+
path: ""
159+
vcs_processed:
160+
type: ""
161+
url: ""
162+
revision: ""
163+
path: ""
164+
- id: "NuGet:System.Net:Http.Json:7.0.0"
132165
purl: "pkg:nuget/[email protected]"
133166
authors:
134167
- "Microsoft"
@@ -159,7 +192,7 @@ packages:
159192
url: "https://github.com/dotnet/runtime.git"
160193
revision: "d099f075e45d2aa6007a22b71b45a08758559f80"
161194
path: ""
162-
- id: "NuGet::System.Numerics.Vectors:4.5.0"
195+
- id: "NuGet:System.Numerics:Vectors:4.5.0"
163196
purl: "pkg:nuget/[email protected]"
164197
authors:
165198
- "Microsoft"
@@ -192,7 +225,7 @@ packages:
192225
url: ""
193226
revision: ""
194227
path: ""
195-
- id: "NuGet::System.Runtime.CompilerServices.Unsafe:6.0.0"
228+
- id: "NuGet:System.Runtime:CompilerServices.Unsafe:6.0.0"
196229
purl: "pkg:nuget/[email protected]"
197230
authors:
198231
- "Microsoft"
@@ -223,7 +256,7 @@ packages:
223256
url: "https://github.com/dotnet/runtime.git"
224257
revision: "4822e3c3aa77eb82b2fb33c9321f923cf11ddde6"
225258
path: ""
226-
- id: "NuGet::System.Text.Encodings.Web:7.0.0"
259+
- id: "NuGet:System.Text:Encodings.Web:7.0.0"
227260
purl: "pkg:nuget/[email protected]"
228261
authors:
229262
- "Microsoft"
@@ -254,7 +287,7 @@ packages:
254287
url: "https://github.com/dotnet/runtime.git"
255288
revision: "d099f075e45d2aa6007a22b71b45a08758559f80"
256289
path: ""
257-
- id: "NuGet::System.Text.Json:7.0.2"
290+
- id: "NuGet:System.Text:Json:7.0.2"
258291
purl: "pkg:nuget/[email protected]"
259292
authors:
260293
- "Microsoft"
@@ -289,7 +322,7 @@ packages:
289322
url: "https://github.com/dotnet/runtime.git"
290323
revision: "0a2bda10e81d901396c3cff95533529e3a93ad47"
291324
path: ""
292-
- id: "NuGet::System.Threading.Tasks.Extensions:4.5.4"
325+
- id: "NuGet:System.Threading:Tasks.Extensions:4.5.4"
293326
purl: "pkg:nuget/[email protected]"
294327
authors:
295328
- "Microsoft"
@@ -322,36 +355,3 @@ packages:
322355
url: ""
323356
revision: ""
324357
path: ""
325-
- id: "NuGet::System.ValueTuple:4.5.0"
326-
purl: "pkg:nuget/[email protected]"
327-
authors:
328-
- "Microsoft"
329-
declared_licenses:
330-
- "https://github.com/dotnet/corefx/blob/master/LICENSE.TXT"
331-
declared_licenses_processed:
332-
spdx_expression: "MIT"
333-
mapped:
334-
https://github.com/dotnet/corefx/blob/master/LICENSE.TXT: "MIT"
335-
description: "Provides the System.ValueTuple structs, which implement the underlying\
336-
\ types for tuples in C# and Visual Basic."
337-
homepage_url: "https://dot.net/"
338-
binary_artifact:
339-
url: "https://api.nuget.org/v3-flatcontainer/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg"
340-
hash:
341-
value: "fa00ebb5045d12c51274f64411c551981beceb1266a8606a4731063109b95ea1f15939197bf3d2ba899db61e593dc39bfce876908bba34286823525093ae3d8e"
342-
algorithm: "SHA-512"
343-
source_artifact:
344-
url: ""
345-
hash:
346-
value: ""
347-
algorithm: ""
348-
vcs:
349-
type: ""
350-
url: ""
351-
revision: ""
352-
path: ""
353-
vcs_processed:
354-
type: ""
355-
url: ""
356-
revision: ""
357-
path: ""

plugins/package-managers/nuget/src/funTest/assets/dotnet-with-csproj-and-nuget-config-expected-output.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ project:
1818
scopes:
1919
- name: "net7.0"
2020
dependencies:
21-
- id: "NuGet::xunit.analyzers:1.2.0-pre.7"
21+
- id: "NuGet:xunit:analyzers:1.2.0-pre.7"
2222
packages:
23-
- id: "NuGet::xunit.analyzers:1.2.0-pre.7"
23+
- id: "NuGet:xunit:analyzers:1.2.0-pre.7"
2424
purl: "pkg:nuget/[email protected]"
2525
authors:
2626
- "jnewkirk,bradwilson,marcind"

plugins/package-managers/nuget/src/funTest/assets/dotnet-with-nuspec-expected-output.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ project:
1818
scopes:
1919
- name: "net45"
2020
dependencies:
21-
- id: "NuGet::System.Runtime.CompilerServices.Unsafe:4.5.3"
22-
- id: "NuGet::System.Threading.Tasks.Extensions:4.5.4"
21+
- id: "NuGet:System.Runtime:CompilerServices.Unsafe:4.5.3"
22+
- id: "NuGet:System.Threading:Tasks.Extensions:4.5.4"
2323
packages:
24-
- id: "NuGet::System.Runtime.CompilerServices.Unsafe:4.5.3"
24+
- id: "NuGet:System.Runtime:CompilerServices.Unsafe:4.5.3"
2525
purl: "pkg:nuget/[email protected]"
2626
authors:
2727
- "Microsoft"
@@ -54,7 +54,7 @@ packages:
5454
url: ""
5555
revision: ""
5656
path: ""
57-
- id: "NuGet::System.Threading.Tasks.Extensions:4.5.4"
57+
- id: "NuGet:System.Threading:Tasks.Extensions:4.5.4"
5858
purl: "pkg:nuget/[email protected]"
5959
authors:
6060
- "Microsoft"

0 commit comments

Comments
 (0)