Skip to content

Commit 1c920cb

Browse files
committed
Add "3.0" manifest version to SupportedVersions
This becomes the default value for newly created libman.json files (so they will automatically get new feature support like fileMappings).
1 parent 1b30db9 commit 1c920cb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/LibraryManager/Manifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class Manifest
2626
/// <summary>
2727
/// Supported versions of Library Manager
2828
/// </summary>
29-
public static readonly Version[] SupportedVersions = { new Version("1.0") };
29+
public static readonly Version[] SupportedVersions = { new Version("1.0"), new Version("3.0") };
3030
private IHostInteraction _hostInteraction;
3131
private readonly List<ILibraryInstallationState> _libraries;
3232
private IDependencies _dependencies;

test/libman.Test/BaseCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void TestGetManifest()
3636
command.DefaultProvider = "cdnjs";
3737
command.Execute();
3838

39-
Assert.AreEqual("1.0", command.Manifest.Version);
39+
Assert.AreEqual("3.0", command.Manifest.Version);
4040

4141
}
4242

test/libman.Test/LibmanInitTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void TestInit()
3939
string contents = File.ReadAllText(libmanFilePath);
4040

4141
string expectedContents = @"{
42-
""version"": ""1.0"",
42+
""version"": ""3.0"",
4343
""defaultProvider"": ""cdnjs"",
4444
""defaultDestination"": ""wwwroot"",
4545
""libraries"": []
@@ -69,7 +69,7 @@ public void TestInit_Interactive()
6969
string contents = File.ReadAllText(libmanFilePath);
7070

7171
string expectedContents = @"{
72-
""version"": ""1.0"",
72+
""version"": ""3.0"",
7373
""defaultProvider"": ""cdnjs"",
7474
""libraries"": []
7575
}";
@@ -95,7 +95,7 @@ public void TestInit_UseDefault()
9595
string contents = File.ReadAllText(libmanFilePath);
9696

9797
string expectedContents = @"{
98-
""version"": ""1.0"",
98+
""version"": ""3.0"",
9999
""defaultProvider"": ""unpkg"",
100100
""libraries"": []
101101
}";

test/libman.Test/LibmanInstallTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void TestInstall_CleanDirectory()
3636

3737
string text = File.ReadAllText(Path.Combine(WorkingDir, "libman.json"));
3838
string expectedText = @"{
39-
""version"": ""1.0"",
39+
""version"": ""3.0"",
4040
""defaultProvider"": ""cdnjs"",
4141
""libraries"": [
4242
{
@@ -64,7 +64,7 @@ public void TestInstall_CleanDirectory_WithPromptForProvider()
6464

6565
string text = File.ReadAllText(Path.Combine(WorkingDir, "libman.json"));
6666
string expectedText = @"{
67-
""version"": ""1.0"",
67+
""version"": ""3.0"",
6868
""defaultProvider"": ""cdnjs"",
6969
""libraries"": [
7070
{

0 commit comments

Comments
 (0)