dependabot-nuget 0.274.0 → 0.275.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectManager.cs +2 -2
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Updater/BindingRedirectResolver.cs +5 -5
- data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs +218 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59486adfa403c80919ee3fa64afe650b6fccd9249e66f94888a6287802d6c383
|
4
|
+
data.tar.gz: 5070df55477e1e6e32ccefd0a18a443064bc94e703aca89a8a511593b04b0f0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09537a7b0e931ade652beda83dba4d26cd4f4dd0b0bdc58e202fe230e91c09de64547c31c32fd9a25be9ec255d73c1b71c6ee48ebc2de31f5851a52cbadef0b5'
|
7
|
+
data.tar.gz: 26934215df037144d9ffdf0d1cbfd93b9b62eb8b4ae2ec64fbcbc336bf96f5a20570165d143b0902767adcaeed0f3531be4d481b2ed2a01f9630d7c85e2f0239
|
@@ -304,12 +304,12 @@ internal static class BindingRedirectManager
|
|
304
304
|
{
|
305
305
|
public bool Equals(AssemblyIdentity? x, AssemblyIdentity? y) =>
|
306
306
|
string.Equals(x?.Name, y?.Name, StringComparison.OrdinalIgnoreCase) &&
|
307
|
-
string.Equals(x?.PublicKeyToken, y?.PublicKeyToken, StringComparison.OrdinalIgnoreCase);
|
307
|
+
string.Equals(x?.PublicKeyToken ?? "null", y?.PublicKeyToken ?? "null", StringComparison.OrdinalIgnoreCase);
|
308
308
|
|
309
309
|
public int GetHashCode(AssemblyIdentity obj) =>
|
310
310
|
HashCode.Combine(
|
311
311
|
obj.Name?.ToLowerInvariant(),
|
312
|
-
obj.PublicKeyToken?.ToLowerInvariant()
|
312
|
+
obj.PublicKeyToken?.ToLowerInvariant() ?? "null"
|
313
313
|
);
|
314
314
|
}
|
315
315
|
}
|
@@ -48,8 +48,8 @@ public static partial class BindingRedirectResolver
|
|
48
48
|
return false;
|
49
49
|
}
|
50
50
|
|
51
|
-
dict.
|
52
|
-
dict.
|
51
|
+
var publicKeyToken = dict.GetValueOrDefault("PublicKeyToken", "null");
|
52
|
+
var culture = dict.GetValueOrDefault("Culture", "neutral");
|
53
53
|
|
54
54
|
assemblyInfo = new AssemblyWrapper(name, version, publicKeyToken, culture);
|
55
55
|
return true;
|
@@ -63,7 +63,7 @@ public static partial class BindingRedirectResolver
|
|
63
63
|
/// </summary>
|
64
64
|
private class AssemblyWrapper : Runtime_IAssembly
|
65
65
|
{
|
66
|
-
public AssemblyWrapper(string name, Version version, string
|
66
|
+
public AssemblyWrapper(string name, Version version, string publicKeyToken, string culture)
|
67
67
|
{
|
68
68
|
Name = name;
|
69
69
|
Version = version;
|
@@ -73,8 +73,8 @@ public static partial class BindingRedirectResolver
|
|
73
73
|
|
74
74
|
public string Name { get; }
|
75
75
|
public Version Version { get; }
|
76
|
-
public string
|
77
|
-
public string
|
76
|
+
public string PublicKeyToken { get; }
|
77
|
+
public string Culture { get; }
|
78
78
|
public IEnumerable<Runtime_IAssembly> ReferencedAssemblies { get; } = Enumerable.Empty<AssemblyWrapper>();
|
79
79
|
}
|
80
80
|
|
data/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Update/UpdateWorkerTests.PackagesConfig.cs
CHANGED
@@ -1019,6 +1019,224 @@ public partial class UpdateWorkerTests
|
|
1019
1019
|
);
|
1020
1020
|
}
|
1021
1021
|
|
1022
|
+
[Fact]
|
1023
|
+
public async Task UpdateBindingRedirect_UnrelatedAssemblyReferenceWithMissingPublicKeyTokenAttribute()
|
1024
|
+
{
|
1025
|
+
await TestUpdateForProject("Some.Package", "7.0.1", "13.0.1",
|
1026
|
+
packages:
|
1027
|
+
[
|
1028
|
+
MockNuGetPackage.CreatePackageWithAssembly("Some.Package", "7.0.1", "net45", "7.0.0.0"),
|
1029
|
+
MockNuGetPackage.CreatePackageWithAssembly("Some.Package", "13.0.1", "net45", "13.0.0.0"),
|
1030
|
+
],
|
1031
|
+
projectContents: """
|
1032
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
1033
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
1034
|
+
<PropertyGroup>
|
1035
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
1036
|
+
</PropertyGroup>
|
1037
|
+
<ItemGroup>
|
1038
|
+
<None Include="packages.config" />
|
1039
|
+
</ItemGroup>
|
1040
|
+
<ItemGroup>
|
1041
|
+
<None Include="app.config" />
|
1042
|
+
</ItemGroup>
|
1043
|
+
<ItemGroup>
|
1044
|
+
<Reference Include="Some.Package, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null">
|
1045
|
+
<HintPath>packages\Some.Package.7.0.1\lib\net45\Some.Package.dll</HintPath>
|
1046
|
+
<Private>True</Private>
|
1047
|
+
</Reference>
|
1048
|
+
<Reference Include="Some.Unrelated.Package, Version=1.0.0.0, Culture=neutral">
|
1049
|
+
<HintPath>packages\Some.Unrelated.Package.1.0.0\lib\net45\Some.Unrelated.Package.dll</HintPath>
|
1050
|
+
</Reference>
|
1051
|
+
</ItemGroup>
|
1052
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
1053
|
+
</Project>
|
1054
|
+
""",
|
1055
|
+
packagesConfigContents: """
|
1056
|
+
<packages>
|
1057
|
+
<package id="Some.Package" version="7.0.1" targetFramework="net45" />
|
1058
|
+
</packages>
|
1059
|
+
""",
|
1060
|
+
additionalFiles:
|
1061
|
+
[
|
1062
|
+
("app.config", """
|
1063
|
+
<configuration>
|
1064
|
+
<runtime>
|
1065
|
+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
1066
|
+
<dependentAssembly>
|
1067
|
+
<assemblyIdentity name="Some.Package" publicKeyToken="null" culture="neutral" />
|
1068
|
+
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
1069
|
+
</dependentAssembly>
|
1070
|
+
<dependentAssembly>
|
1071
|
+
<assemblyIdentity name="Some.Unrelated.Package" culture="neutral" />
|
1072
|
+
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
|
1073
|
+
</dependentAssembly>
|
1074
|
+
</assemblyBinding>
|
1075
|
+
</runtime>
|
1076
|
+
</configuration>
|
1077
|
+
""")
|
1078
|
+
],
|
1079
|
+
expectedProjectContents: """
|
1080
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
1081
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
1082
|
+
<PropertyGroup>
|
1083
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
1084
|
+
</PropertyGroup>
|
1085
|
+
<ItemGroup>
|
1086
|
+
<None Include="packages.config" />
|
1087
|
+
</ItemGroup>
|
1088
|
+
<ItemGroup>
|
1089
|
+
<None Include="app.config" />
|
1090
|
+
</ItemGroup>
|
1091
|
+
<ItemGroup>
|
1092
|
+
<Reference Include="Some.Package, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null">
|
1093
|
+
<HintPath>packages\Some.Package.13.0.1\lib\net45\Some.Package.dll</HintPath>
|
1094
|
+
<Private>True</Private>
|
1095
|
+
</Reference>
|
1096
|
+
<Reference Include="Some.Unrelated.Package, Version=1.0.0.0, Culture=neutral">
|
1097
|
+
<HintPath>packages\Some.Unrelated.Package.1.0.0\lib\net45\Some.Unrelated.Package.dll</HintPath>
|
1098
|
+
</Reference>
|
1099
|
+
</ItemGroup>
|
1100
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
1101
|
+
</Project>
|
1102
|
+
""",
|
1103
|
+
expectedPackagesConfigContents: """
|
1104
|
+
<?xml version="1.0" encoding="utf-8"?>
|
1105
|
+
<packages>
|
1106
|
+
<package id="Some.Package" version="13.0.1" targetFramework="net45" />
|
1107
|
+
</packages>
|
1108
|
+
""",
|
1109
|
+
additionalFilesExpected:
|
1110
|
+
[
|
1111
|
+
("app.config", """
|
1112
|
+
<configuration>
|
1113
|
+
<runtime>
|
1114
|
+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
1115
|
+
<dependentAssembly>
|
1116
|
+
<assemblyIdentity name="Some.Package" publicKeyToken="null" culture="neutral" />
|
1117
|
+
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
1118
|
+
</dependentAssembly>
|
1119
|
+
<dependentAssembly>
|
1120
|
+
<assemblyIdentity name="Some.Unrelated.Package" culture="neutral" />
|
1121
|
+
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
|
1122
|
+
</dependentAssembly>
|
1123
|
+
</assemblyBinding>
|
1124
|
+
</runtime>
|
1125
|
+
</configuration>
|
1126
|
+
""")
|
1127
|
+
]
|
1128
|
+
);
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
[Fact]
|
1132
|
+
public async Task UpdateBindingRedirect_UnrelatedAssemblyReferenceWithMissingCultureAttribute()
|
1133
|
+
{
|
1134
|
+
await TestUpdateForProject("Some.Package", "7.0.1", "13.0.1",
|
1135
|
+
packages:
|
1136
|
+
[
|
1137
|
+
MockNuGetPackage.CreatePackageWithAssembly("Some.Package", "7.0.1", "net45", "7.0.0.0"),
|
1138
|
+
MockNuGetPackage.CreatePackageWithAssembly("Some.Package", "13.0.1", "net45", "13.0.0.0"),
|
1139
|
+
],
|
1140
|
+
projectContents: """
|
1141
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
1142
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
1143
|
+
<PropertyGroup>
|
1144
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
1145
|
+
</PropertyGroup>
|
1146
|
+
<ItemGroup>
|
1147
|
+
<None Include="packages.config" />
|
1148
|
+
</ItemGroup>
|
1149
|
+
<ItemGroup>
|
1150
|
+
<None Include="app.config" />
|
1151
|
+
</ItemGroup>
|
1152
|
+
<ItemGroup>
|
1153
|
+
<Reference Include="Some.Package, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null">
|
1154
|
+
<HintPath>packages\Some.Package.7.0.1\lib\net45\Some.Package.dll</HintPath>
|
1155
|
+
<Private>True</Private>
|
1156
|
+
</Reference>
|
1157
|
+
<Reference Include="Some.Unrelated.Package, Version=1.0.0.0, PublicKeyToken=null">
|
1158
|
+
<HintPath>packages\Some.Unrelated.Package.1.0.0\lib\net45\Some.Unrelated.Package.dll</HintPath>
|
1159
|
+
</Reference>
|
1160
|
+
</ItemGroup>
|
1161
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
1162
|
+
</Project>
|
1163
|
+
""",
|
1164
|
+
packagesConfigContents: """
|
1165
|
+
<packages>
|
1166
|
+
<package id="Some.Package" version="7.0.1" targetFramework="net45" />
|
1167
|
+
</packages>
|
1168
|
+
""",
|
1169
|
+
additionalFiles:
|
1170
|
+
[
|
1171
|
+
("app.config", """
|
1172
|
+
<configuration>
|
1173
|
+
<runtime>
|
1174
|
+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
1175
|
+
<dependentAssembly>
|
1176
|
+
<assemblyIdentity name="Some.Package" publicKeyToken="null" culture="neutral" />
|
1177
|
+
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
1178
|
+
</dependentAssembly>
|
1179
|
+
<dependentAssembly>
|
1180
|
+
<assemblyIdentity name="Some.Unrelated.Package" publicKeyToken="null" />
|
1181
|
+
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
|
1182
|
+
</dependentAssembly>
|
1183
|
+
</assemblyBinding>
|
1184
|
+
</runtime>
|
1185
|
+
</configuration>
|
1186
|
+
""")
|
1187
|
+
],
|
1188
|
+
expectedProjectContents: """
|
1189
|
+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
1190
|
+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
1191
|
+
<PropertyGroup>
|
1192
|
+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
1193
|
+
</PropertyGroup>
|
1194
|
+
<ItemGroup>
|
1195
|
+
<None Include="packages.config" />
|
1196
|
+
</ItemGroup>
|
1197
|
+
<ItemGroup>
|
1198
|
+
<None Include="app.config" />
|
1199
|
+
</ItemGroup>
|
1200
|
+
<ItemGroup>
|
1201
|
+
<Reference Include="Some.Package, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null">
|
1202
|
+
<HintPath>packages\Some.Package.13.0.1\lib\net45\Some.Package.dll</HintPath>
|
1203
|
+
<Private>True</Private>
|
1204
|
+
</Reference>
|
1205
|
+
<Reference Include="Some.Unrelated.Package, Version=1.0.0.0, PublicKeyToken=null">
|
1206
|
+
<HintPath>packages\Some.Unrelated.Package.1.0.0\lib\net45\Some.Unrelated.Package.dll</HintPath>
|
1207
|
+
</Reference>
|
1208
|
+
</ItemGroup>
|
1209
|
+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
1210
|
+
</Project>
|
1211
|
+
""",
|
1212
|
+
expectedPackagesConfigContents: """
|
1213
|
+
<?xml version="1.0" encoding="utf-8"?>
|
1214
|
+
<packages>
|
1215
|
+
<package id="Some.Package" version="13.0.1" targetFramework="net45" />
|
1216
|
+
</packages>
|
1217
|
+
""",
|
1218
|
+
additionalFilesExpected:
|
1219
|
+
[
|
1220
|
+
("app.config", """
|
1221
|
+
<configuration>
|
1222
|
+
<runtime>
|
1223
|
+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
1224
|
+
<dependentAssembly>
|
1225
|
+
<assemblyIdentity name="Some.Package" publicKeyToken="null" culture="neutral" />
|
1226
|
+
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
1227
|
+
</dependentAssembly>
|
1228
|
+
<dependentAssembly>
|
1229
|
+
<assemblyIdentity name="Some.Unrelated.Package" publicKeyToken="null" />
|
1230
|
+
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
|
1231
|
+
</dependentAssembly>
|
1232
|
+
</assemblyBinding>
|
1233
|
+
</runtime>
|
1234
|
+
</configuration>
|
1235
|
+
""")
|
1236
|
+
]
|
1237
|
+
);
|
1238
|
+
}
|
1239
|
+
|
1022
1240
|
[Fact]
|
1023
1241
|
public async Task UpdateBindingRedirect_DuplicateRedirectsForTheSameAssemblyAreRemoved()
|
1024
1242
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-nuget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.275.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.275.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.275.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubyzip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -463,7 +463,7 @@ licenses:
|
|
463
463
|
- MIT
|
464
464
|
metadata:
|
465
465
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
466
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
466
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.275.0
|
467
467
|
post_install_message:
|
468
468
|
rdoc_options: []
|
469
469
|
require_paths:
|