Skip to content

Commit 14ef44f

Browse files
committed
Patch nuspec dependency on Newtonsoft.Json to version range
Allows us to compile against latest version of major release with dnx tooling whilst still supporting major version range. See #1772
1 parent 8ae83f2 commit 14ef44f

File tree

5 files changed

+133
-42
lines changed

5 files changed

+133
-42
lines changed

build/scripts/Releasing.fsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,20 @@ type Release() =
103103
if (projectName.Equals("Nest", StringComparison.InvariantCultureIgnoreCase) = true)
104104
then
105105
let nuspec = sprintf "%s/Nest.nuspec" unzippedDir
106-
FileHelper.RegexReplaceInFileWithEncoding "<id>Nest</id>" "<id>NEST</id>" System.Text.Encoding.UTF8 nuspec
106+
FileHelper.RegexReplaceInFileWithEncoding
107+
"<id>Nest</id>"
108+
"<id>NEST</id>"
109+
System.Text.Encoding.UTF8
110+
nuspec
111+
112+
// TODO: Make this more generic in limiting to major version based
113+
// on the major version of the version specified.
114+
FileHelper.RegexReplaceInFileWithEncoding
115+
"<dependency id=\"Newtonsoft.Json\" version=\".*\" />"
116+
"<dependency id=\"Newtonsoft.Json\" version=\"[8,9)\" />"
117+
System.Text.Encoding.UTF8
118+
nuspec
119+
107120

108121
// Include PDB for each target framework
109122
let frameworkDirs = (sprintf "%s/lib" unzippedDir |> directoryInfo).GetDirectories()

src/Benchmarking/project.lock.json

Lines changed: 98 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
"framework": ".NETFramework,Version=v4.5",
328328
"dependencies": {
329329
"Elasticsearch.Net": null,
330-
"Newtonsoft.Json": "[8.0.0, 9.0.0)"
330+
"Newtonsoft.Json": "8.0.2"
331331
},
332332
"frameworkAssemblies": [
333333
"System.Dynamic.Runtime",
@@ -1028,7 +1028,7 @@
10281028
"framework": ".NETPlatform,Version=v5.1",
10291029
"dependencies": {
10301030
"Elasticsearch.Net": null,
1031-
"Newtonsoft.Json": "[8.0.0, 9.0.0)",
1031+
"Newtonsoft.Json": "8.0.2",
10321032
"System.Collections": "4.0.11-beta-23225",
10331033
"System.Diagnostics.Tools": "4.0.1-beta-23225",
10341034
"System.Dynamic.Runtime": "4.0.11-beta-23516",
@@ -2537,7 +2537,7 @@
25372537
"framework": ".NETFramework,Version=v4.5",
25382538
"dependencies": {
25392539
"Elasticsearch.Net": null,
2540-
"Newtonsoft.Json": "[8.0.0, 9.0.0)"
2540+
"Newtonsoft.Json": "8.0.2"
25412541
},
25422542
"frameworkAssemblies": [
25432543
"System.Dynamic.Runtime",
@@ -3159,7 +3159,7 @@
31593159
"framework": ".NETFramework,Version=v4.5",
31603160
"dependencies": {
31613161
"Elasticsearch.Net": null,
3162-
"Newtonsoft.Json": "[8.0.0, 9.0.0)"
3162+
"Newtonsoft.Json": "8.0.2"
31633163
},
31643164
"frameworkAssemblies": [
31653165
"System.Dynamic.Runtime",
@@ -3878,7 +3878,7 @@
38783878
"framework": ".NETPlatform,Version=v5.1",
38793879
"dependencies": {
38803880
"Elasticsearch.Net": null,
3881-
"Newtonsoft.Json": "[8.0.0, 9.0.0)",
3881+
"Newtonsoft.Json": "8.0.2",
38823882
"System.Collections": "4.0.11-beta-23225",
38833883
"System.Diagnostics.Tools": "4.0.1-beta-23225",
38843884
"System.Dynamic.Runtime": "4.0.11-beta-23516",
@@ -3899,6 +3899,34 @@
38993899
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {}
39003900
}
39013901
},
3902+
"runtime.any.System.Linq.Expressions/4.0.11-beta-23516": {
3903+
"type": "package",
3904+
"dependencies": {
3905+
"System.Collections": "4.0.10",
3906+
"System.Diagnostics.Debug": "4.0.10",
3907+
"System.Globalization": "4.0.10",
3908+
"System.IO": "4.0.10",
3909+
"System.Linq": "4.0.0",
3910+
"System.ObjectModel": "4.0.10",
3911+
"System.Reflection": "4.0.10",
3912+
"System.Reflection.Emit": "4.0.0",
3913+
"System.Reflection.Emit.ILGeneration": "4.0.0",
3914+
"System.Reflection.Emit.Lightweight": "4.0.0",
3915+
"System.Reflection.Extensions": "4.0.0",
3916+
"System.Reflection.Primitives": "4.0.0",
3917+
"System.Reflection.TypeExtensions": "4.0.0",
3918+
"System.Resources.ResourceManager": "4.0.0",
3919+
"System.Runtime": "4.0.20",
3920+
"System.Runtime.Extensions": "4.0.10",
3921+
"System.Threading": "4.0.10"
3922+
},
3923+
"compile": {
3924+
"ref/dotnet/_._": {}
3925+
},
3926+
"runtime": {
3927+
"lib/DNXCore50/System.Linq.Expressions.dll": {}
3928+
}
3929+
},
39023930
"runtime.win7.System.Console/4.0.0-beta-23516": {
39033931
"type": "package",
39043932
"dependencies": {
@@ -4704,13 +4732,13 @@
47044732
"lib/DNXCore50/System.Reflection.Emit.ILGeneration.dll": {}
47054733
}
47064734
},
4707-
"System.Reflection.Emit.Lightweight/4.0.0-beta-23109": {
4735+
"System.Reflection.Emit.Lightweight/4.0.0": {
47084736
"type": "package",
47094737
"dependencies": {
4710-
"System.Reflection": "4.0.0-beta-23109",
4711-
"System.Reflection.Emit.ILGeneration": "4.0.0-beta-23109",
4712-
"System.Reflection.Primitives": "4.0.0-beta-23109",
4713-
"System.Runtime": "4.0.0-beta-23109"
4738+
"System.Reflection": "4.0.0",
4739+
"System.Reflection.Emit.ILGeneration": "4.0.0",
4740+
"System.Reflection.Primitives": "4.0.0",
4741+
"System.Runtime": "4.0.0"
47144742
},
47154743
"compile": {
47164744
"ref/dotnet/System.Reflection.Emit.Lightweight.dll": {}
@@ -5752,7 +5780,7 @@
57525780
"framework": ".NETPlatform,Version=v5.1",
57535781
"dependencies": {
57545782
"Elasticsearch.Net": null,
5755-
"Newtonsoft.Json": "[8.0.0, 9.0.0)",
5783+
"Newtonsoft.Json": "8.0.2",
57565784
"System.Collections": "4.0.11-beta-23225",
57575785
"System.Diagnostics.Tools": "4.0.1-beta-23225",
57585786
"System.Dynamic.Runtime": "4.0.11-beta-23516",
@@ -5773,6 +5801,34 @@
57735801
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {}
57745802
}
57755803
},
5804+
"runtime.any.System.Linq.Expressions/4.0.11-beta-23516": {
5805+
"type": "package",
5806+
"dependencies": {
5807+
"System.Collections": "4.0.10",
5808+
"System.Diagnostics.Debug": "4.0.10",
5809+
"System.Globalization": "4.0.10",
5810+
"System.IO": "4.0.10",
5811+
"System.Linq": "4.0.0",
5812+
"System.ObjectModel": "4.0.10",
5813+
"System.Reflection": "4.0.10",
5814+
"System.Reflection.Emit": "4.0.0",
5815+
"System.Reflection.Emit.ILGeneration": "4.0.0",
5816+
"System.Reflection.Emit.Lightweight": "4.0.0",
5817+
"System.Reflection.Extensions": "4.0.0",
5818+
"System.Reflection.Primitives": "4.0.0",
5819+
"System.Reflection.TypeExtensions": "4.0.0",
5820+
"System.Resources.ResourceManager": "4.0.0",
5821+
"System.Runtime": "4.0.20",
5822+
"System.Runtime.Extensions": "4.0.10",
5823+
"System.Threading": "4.0.10"
5824+
},
5825+
"compile": {
5826+
"ref/dotnet/_._": {}
5827+
},
5828+
"runtime": {
5829+
"lib/DNXCore50/System.Linq.Expressions.dll": {}
5830+
}
5831+
},
57765832
"runtime.win7.System.Console/4.0.0-beta-23516": {
57775833
"type": "package",
57785834
"dependencies": {
@@ -6578,13 +6634,13 @@
65786634
"lib/DNXCore50/System.Reflection.Emit.ILGeneration.dll": {}
65796635
}
65806636
},
6581-
"System.Reflection.Emit.Lightweight/4.0.0-beta-23109": {
6637+
"System.Reflection.Emit.Lightweight/4.0.0": {
65826638
"type": "package",
65836639
"dependencies": {
6584-
"System.Reflection": "4.0.0-beta-23109",
6585-
"System.Reflection.Emit.ILGeneration": "4.0.0-beta-23109",
6586-
"System.Reflection.Primitives": "4.0.0-beta-23109",
6587-
"System.Runtime": "4.0.0-beta-23109"
6640+
"System.Reflection": "4.0.0",
6641+
"System.Reflection.Emit.ILGeneration": "4.0.0",
6642+
"System.Reflection.Primitives": "4.0.0",
6643+
"System.Runtime": "4.0.0"
65886644
},
65896645
"compile": {
65906646
"ref/dotnet/System.Reflection.Emit.Lightweight.dll": {}
@@ -7639,6 +7695,28 @@
76397695
"tools/install.ps1"
76407696
]
76417697
},
7698+
"runtime.any.System.Linq.Expressions/4.0.11-beta-23516": {
7699+
"type": "package",
7700+
"serviceable": true,
7701+
"sha512": "P5nzo1Ye0GxB4BYdWian6Y427eTrhn1JS3jLWZq5bMWVn8hS/OIfyylASN0A/qqeLn4rGA0fOzmJSYqFSKvxgQ==",
7702+
"files": [
7703+
"lib/DNXCore50/System.Linq.Expressions.dll",
7704+
"lib/MonoAndroid10/_._",
7705+
"lib/MonoTouch10/_._",
7706+
"lib/net45/_._",
7707+
"lib/netcore50/System.Linq.Expressions.dll",
7708+
"lib/win8/_._",
7709+
"lib/wp80/_._",
7710+
"lib/wpa81/_._",
7711+
"lib/xamarinios10/_._",
7712+
"lib/xamarinmac20/_._",
7713+
"ref/dotnet/_._",
7714+
"runtime.any.System.Linq.Expressions.4.0.11-beta-23516.nupkg",
7715+
"runtime.any.System.Linq.Expressions.4.0.11-beta-23516.nupkg.sha512",
7716+
"runtime.any.System.Linq.Expressions.nuspec",
7717+
"runtimes/aot/lib/netcore50/_._"
7718+
]
7719+
},
76427720
"runtime.win7.System.Console/4.0.0-beta-23516": {
76437721
"type": "package",
76447722
"serviceable": true,
@@ -9529,9 +9607,9 @@
95299607
"System.Reflection.Emit.ILGeneration.nuspec"
95309608
]
95319609
},
9532-
"System.Reflection.Emit.Lightweight/4.0.0-beta-23109": {
9610+
"System.Reflection.Emit.Lightweight/4.0.0": {
95339611
"type": "package",
9534-
"sha512": "Kbg03ijw7jZUswutleX/zmGgz6VYszTuyy4DciBn1PHFYAqAgZFZdK3cpYCsAU+cPliQ35UcOX828OsAG9NU4w==",
9612+
"sha512": "DJZhHiOdkN08xJgsJfDjkuOreLLmMcU8qkEEqEHqyhkPUZMMQs0lE8R+6+68BAFWgcdzxtNu0YmIOtEug8j00w==",
95359613
"files": [
95369614
"lib/DNXCore50/System.Reflection.Emit.Lightweight.dll",
95379615
"lib/net45/_._",
@@ -9550,8 +9628,8 @@
95509628
"ref/dotnet/zh-hant/System.Reflection.Emit.Lightweight.xml",
95519629
"ref/net45/_._",
95529630
"ref/wp80/_._",
9553-
"System.Reflection.Emit.Lightweight.4.0.0-beta-23109.nupkg",
9554-
"System.Reflection.Emit.Lightweight.4.0.0-beta-23109.nupkg.sha512",
9631+
"System.Reflection.Emit.Lightweight.4.0.0.nupkg",
9632+
"System.Reflection.Emit.Lightweight.4.0.0.nupkg.sha512",
95559633
"System.Reflection.Emit.Lightweight.nuspec"
95569634
]
95579635
},

src/Nest/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
"dependencies": {
5252
"Elasticsearch.Net": { "target": "project" },
53-
"Newtonsoft.Json": "[8, 9)"
53+
"Newtonsoft.Json": "8.0.2"
5454
},
5555
"commands": {
5656
},

src/Nest/project.lock.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"System.Runtime.Serialization"
1313
]
1414
},
15-
"Newtonsoft.Json/8.0.1-beta1": {
15+
"Newtonsoft.Json/8.0.2": {
1616
"type": "package",
1717
"compile": {
1818
"lib/net45/Newtonsoft.Json.dll": {}
@@ -32,7 +32,7 @@
3232
"System.Runtime.Serialization"
3333
]
3434
},
35-
"Newtonsoft.Json/8.0.1-beta1": {
35+
"Newtonsoft.Json/8.0.2": {
3636
"type": "package",
3737
"compile": {
3838
"lib/net45/Newtonsoft.Json.dll": {}
@@ -98,7 +98,7 @@
9898
"lib/dotnet/Microsoft.CSharp.dll": {}
9999
}
100100
},
101-
"Newtonsoft.Json/8.0.1-beta1": {
101+
"Newtonsoft.Json/8.0.2": {
102102
"type": "package",
103103
"compile": {
104104
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {}
@@ -658,7 +658,7 @@
658658
"System.Runtime.Serialization"
659659
]
660660
},
661-
"Newtonsoft.Json/8.0.1-beta1": {
661+
"Newtonsoft.Json/8.0.2": {
662662
"type": "package",
663663
"compile": {
664664
"lib/net45/Newtonsoft.Json.dll": {}
@@ -678,7 +678,7 @@
678678
"System.Runtime.Serialization"
679679
]
680680
},
681-
"Newtonsoft.Json/8.0.1-beta1": {
681+
"Newtonsoft.Json/8.0.2": {
682682
"type": "package",
683683
"compile": {
684684
"lib/net45/Newtonsoft.Json.dll": {}
@@ -698,7 +698,7 @@
698698
"System.Runtime.Serialization"
699699
]
700700
},
701-
"Newtonsoft.Json/8.0.1-beta1": {
701+
"Newtonsoft.Json/8.0.2": {
702702
"type": "package",
703703
"compile": {
704704
"lib/net45/Newtonsoft.Json.dll": {}
@@ -718,7 +718,7 @@
718718
"System.Runtime.Serialization"
719719
]
720720
},
721-
"Newtonsoft.Json/8.0.1-beta1": {
721+
"Newtonsoft.Json/8.0.2": {
722722
"type": "package",
723723
"compile": {
724724
"lib/net45/Newtonsoft.Json.dll": {}
@@ -784,7 +784,7 @@
784784
"lib/dotnet/Microsoft.CSharp.dll": {}
785785
}
786786
},
787-
"Newtonsoft.Json/8.0.1-beta1": {
787+
"Newtonsoft.Json/8.0.2": {
788788
"type": "package",
789789
"compile": {
790790
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {}
@@ -1408,7 +1408,7 @@
14081408
"lib/dotnet/Microsoft.CSharp.dll": {}
14091409
}
14101410
},
1411-
"Newtonsoft.Json/8.0.1-beta1": {
1411+
"Newtonsoft.Json/8.0.2": {
14121412
"type": "package",
14131413
"compile": {
14141414
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll": {}
@@ -2012,9 +2012,9 @@
20122012
"ref/xamarinmac20/_._"
20132013
]
20142014
},
2015-
"Newtonsoft.Json/8.0.1-beta1": {
2015+
"Newtonsoft.Json/8.0.2": {
20162016
"type": "package",
2017-
"sha512": "2SKuwiPQLrHLy0IbGVpj3KFmQereEKmfa+FGyulXUR9x6o+bWYjMfK0K5nqFbe4s/TGy/CPbuF7UfYdsrMhfYQ==",
2017+
"sha512": "e5yWmEfu68rmtG431zl9N/7PlNKQDIuiDW5MHlEFAZcecakcxrIGnKqrPAtWNILzK2oNanRB5cD150MYhECK3g==",
20182018
"files": [
20192019
"lib/net20/Newtonsoft.Json.dll",
20202020
"lib/net20/Newtonsoft.Json.xml",
@@ -2028,8 +2028,8 @@
20282028
"lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml",
20292029
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll",
20302030
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.xml",
2031-
"Newtonsoft.Json.8.0.1-beta1.nupkg",
2032-
"Newtonsoft.Json.8.0.1-beta1.nupkg.sha512",
2031+
"Newtonsoft.Json.8.0.2.nupkg",
2032+
"Newtonsoft.Json.8.0.2.nupkg.sha512",
20332033
"Newtonsoft.Json.nuspec",
20342034
"tools/install.ps1"
20352035
]
@@ -3467,7 +3467,7 @@
34673467
"projectFileDependencyGroups": {
34683468
"": [
34693469
"Elasticsearch.Net ",
3470-
"Newtonsoft.Json >= 8.0.0 < 9.0.0"
3470+
"Newtonsoft.Json >= 8.0.2"
34713471
],
34723472
".NETFramework,Version=v4.6": [
34733473
"fx/System.Dynamic.Runtime ",

0 commit comments

Comments
 (0)