Skip to content

Commit 4d28c3a

Browse files
Merge pull request #62 from umbraco/v14/task/update-to-14
Update to CMS and Deploy 14 and version to 14.0.0-beta001.
2 parents 8c4015d + 250715d commit 4d28c3a

25 files changed

+1819
-1246
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,3 +482,11 @@ $RECYCLE.BIN/
482482

483483
# Vim temporary swap files
484484
*.swp
485+
486+
# Build
487+
/build.out/
488+
489+
# Ignore auto-generated schema
490+
/tests/*/appsettings-schema.json
491+
/tests/*/appsettings-schema.*.json
492+
/tests/*/umbraco-package-schema.json

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<!-- Global packages (private, build-time packages for all projects) -->
77
<ItemGroup>
88
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" />
9-
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
9+
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
1010
<GlobalPackageReference Include="Umbraco.Code" Version="2.1.0" />
1111
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
1212
</ItemGroup>
1313
<!-- Umbraco packages -->
1414
<ItemGroup>
15-
<PackageVersion Include="Umbraco.Cms.Web.Common" Version="[13.0.0, 14)" />
16-
<PackageVersion Include="Umbraco.Deploy.Infrastructure" Version="[13.1.0, 14)" />
15+
<PackageVersion Include="Umbraco.Cms.Web.Common" Version="[14.0.0-rc3, 15)" />
16+
<PackageVersion Include="Umbraco.Deploy.Infrastructure" Version="[14.0.0-beta001, 15)" />
1717
</ItemGroup>
1818
</Project>

src/Umbraco.Deploy.Contrib/Extensions/ArtifactMigratorCollectionBuilderExtensions.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ public static ArtifactMigratorCollectionBuilder AddLegacyMigrators(this Artifact
2121
// Allowed at root and child content types to permissions
2222
.Append<ContentTypeArtifactJsonMigrator>()
2323
// Data types
24-
.Append<CheckBoxListDataTypeArtifactMigrator>()
25-
.Append<ColorPickerAliasDataTypeArtifactMigrator>()
24+
//.Append<CheckBoxListDataTypeArtifactMigrator>()
25+
//.Append<ColorPickerAliasDataTypeArtifactMigrator>()
2626
.Append<ContentPicker2DataTypeArtifactMigrator>()
2727
.Append<ContentPickerAliasDataTypeArtifactMigrator>()
2828
.Append<DateDataTypeArtifactMigrator>()
29-
.Append<DropDownDataTypeArtifactMigrator>()
30-
.Append<DropDownFlexibleDataTypeArtifactMigrator>()
31-
.Append<DropdownlistMultiplePublishKeysDataTypeArtifactMigrator>()
32-
.Append<DropdownlistPublishingKeysDataTypeArtifactMigrator>()
33-
.Append<DropDownMultipleDataTypeArtifactMigrator>()
34-
.Append<MediaPicker2DataTypeArtifactMigrator>()
35-
.Append<MediaPickerDataTypeArtifactMigrator>()
29+
//.Append<DropDownDataTypeArtifactMigrator>()
30+
//.Append<DropDownFlexibleDataTypeArtifactMigrator>()
31+
//.Append<DropdownlistMultiplePublishKeysDataTypeArtifactMigrator>()
32+
//.Append<DropdownlistPublishingKeysDataTypeArtifactMigrator>()
33+
//.Append<DropDownMultipleDataTypeArtifactMigrator>()
34+
//.Append<MediaPicker2DataTypeArtifactMigrator>()
35+
//.Append<MediaPickerDataTypeArtifactMigrator>()
3636
.Append<MemberPicker2DataTypeArtifactMigrator>()
3737
.Append<MultiNodeTreePicker2DataTypeArtifactMigrator>()
3838
.Append<MultiNodeTreePickerDataTypeArtifactMigrator>()
39-
.Append<MultipleMediaPickerDataTypeArtifactMigrator>()
39+
//.Append<MultipleMediaPickerDataTypeArtifactMigrator>()
4040
.Append<NoEditDataTypeArtifactMigrator>()
41-
.Append<RadioButtonListDataTypeArtifactMigrator>()
41+
//.Append<RadioButtonListDataTypeArtifactMigrator>()
4242
.Append<RelatedLinks2DataTypeArtifactMigrator>()
4343
.Append<RelatedLinksDataTypeArtifactMigrator>()
4444
.Append<TextboxDataTypeArtifactMigrator>()

src/Umbraco.Deploy.Contrib/Migrators/Legacy/Content/DocumentArtifactJsonMigrator.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Newtonsoft.Json.Linq;
1+
using System.Text.Json.Nodes;
22
using Umbraco.Cms.Core.Models;
33
using Umbraco.Cms.Core.Semver;
44
using Umbraco.Deploy.Infrastructure.Artifacts.Content;
@@ -18,25 +18,23 @@ public DocumentArtifactJsonMigrator()
1818
=> MaxVersion = new SemVersion(3, 0, 0);
1919

2020
/// <inheritdoc />
21-
public override JToken Migrate(JToken artifactJson)
21+
public override JsonNode Migrate(JsonNode artifactJson)
2222
{
23-
var schedule = new JArray();
23+
var schedule = new JsonArray();
2424

25-
if (artifactJson["ReleaseDate"] is JValue releaseDate &&
26-
releaseDate.Value is not null)
25+
if (artifactJson["ReleaseDate"] is JsonNode releaseDate)
2726
{
28-
schedule.Add(new JObject()
27+
schedule.Add(new JsonObject()
2928
{
30-
["Date"] = releaseDate.Value<string>(),
29+
["Date"] = releaseDate,
3130
["Culture"] = string.Empty,
3231
["Action"] = nameof(ContentScheduleAction.Release)
3332
});
3433
}
3534

36-
if (artifactJson["ExpireDate"] is JValue expireDate &&
37-
expireDate.Value is not null)
35+
if (artifactJson["ExpireDate"] is JsonNode expireDate)
3836
{
39-
schedule.Add(new JObject()
37+
schedule.Add(new JsonObject()
4038
{
4139
["Date"] = expireDate,
4240
["Culture"] = string.Empty,

src/Umbraco.Deploy.Contrib/Migrators/Legacy/ContentType/ContentTypeArtifactJsonMigrator.cs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System;
2-
using Newtonsoft.Json.Linq;
2+
using System.Text.Json.Nodes;
33
using Umbraco.Cms.Core.Semver;
44
using Umbraco.Deploy.Infrastructure.Artifacts.ContentType;
55
using Umbraco.Deploy.Infrastructure.Migrators;
@@ -22,22 +22,13 @@ protected override bool CanMigrateType(Type type)
2222
=> type.Inherits<ContentTypeArtifactBase>();
2323

2424
/// <inheritdoc />
25-
public override JToken Migrate(JToken artifactJson)
25+
public override JsonNode Migrate(JsonNode artifactJson)
2626
{
27-
var permissions = new JObject();
28-
29-
if (artifactJson["AllowedAtRoot"] is JValue allowedAtRootValue &&
30-
allowedAtRootValue.Value is not null)
31-
{
32-
permissions["AllowedAtRoot"] = allowedAtRootValue;
33-
}
34-
35-
if (artifactJson["AllowedChildContentTypes"] is JArray allowedChildContentTypesToken)
27+
artifactJson["Permissions"] = new JsonObject()
3628
{
37-
permissions["AllowedChildContentTypes"] = allowedChildContentTypesToken;
38-
}
39-
40-
artifactJson["Permissions"] = permissions;
29+
["AllowedAtRoot"] = artifactJson["AllowedAtRoot"],
30+
["AllowedChildContentTypes"] = artifactJson["AllowedChildContentTypes"],
31+
};
4132

4233
return artifactJson;
4334
}
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
using System.Collections.Generic;
2-
using Umbraco.Cms.Core;
3-
using Umbraco.Cms.Core.PropertyEditors;
4-
using Umbraco.Cms.Core.Semver;
5-
using Umbraco.Cms.Core.Serialization;
6-
using Umbraco.Deploy.Infrastructure.Artifacts;
7-
using Umbraco.Deploy.Infrastructure.Migrators;
1+
//using System.Collections.Generic;
2+
//using Umbraco.Cms.Core;
3+
//using Umbraco.Cms.Core.PropertyEditors;
4+
//using Umbraco.Cms.Core.Semver;
5+
//using Umbraco.Cms.Core.Serialization;
6+
//using Umbraco.Deploy.Infrastructure.Artifacts;
7+
//using Umbraco.Deploy.Infrastructure.Migrators;
88

9-
namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
9+
//namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
1010

11-
/// <summary>
12-
/// Migrates the <see cref="DataTypeArtifact" /> to replace the <see cref="Constants.PropertyEditors.Aliases.CheckBoxList" /> editor configuration from Umbraco 7 to <see cref="ValueListConfiguration" />.
13-
/// </summary>
14-
public class CheckBoxListDataTypeArtifactMigrator : DataTypeConfigurationArtifactMigratorBase<ValueListConfiguration>
15-
{
16-
/// <summary>
17-
/// Initializes a new instance of the <see cref="CheckBoxListDataTypeArtifactMigrator" /> class.
18-
/// </summary>
19-
/// <param name="configurationEditorJsonSerializer">The configuration editor JSON serializer.</param>
20-
public CheckBoxListDataTypeArtifactMigrator(IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
21-
: base(Constants.PropertyEditors.Aliases.CheckBoxList, configurationEditorJsonSerializer)
22-
=> MaxVersion = new SemVersion(3, 0, 0);
11+
///// <summary>
12+
///// Migrates the <see cref="DataTypeArtifact" /> to replace the <see cref="Constants.PropertyEditors.Aliases.CheckBoxList" /> editor configuration from Umbraco 7 to <see cref="ValueListConfiguration" />.
13+
///// </summary>
14+
//public class CheckBoxListDataTypeArtifactMigrator : DataTypeConfigurationArtifactMigratorBase<ValueListConfiguration>
15+
//{
16+
// /// <summary>
17+
// /// Initializes a new instance of the <see cref="CheckBoxListDataTypeArtifactMigrator" /> class.
18+
// /// </summary>
19+
// /// <param name="configurationEditorJsonSerializer">The configuration editor JSON serializer.</param>
20+
// public CheckBoxListDataTypeArtifactMigrator(IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
21+
// : base(Constants.PropertyEditors.Aliases.CheckBoxList, configurationEditorJsonSerializer)
22+
// => MaxVersion = new SemVersion(3, 0, 0);
2323

24-
/// <inheritdoc />
25-
protected override ValueListConfiguration? MigrateConfiguration(IDictionary<string, object?> fromConfiguration)
26-
{
27-
var toConfiguration = new ValueListConfiguration();
24+
// /// <inheritdoc />
25+
// protected override ValueListConfiguration? MigrateConfiguration(IDictionary<string, object?> fromConfiguration)
26+
// {
27+
// var toConfiguration = new ValueListConfiguration();
2828

29-
foreach (var (key, value) in fromConfiguration)
30-
{
31-
if (int.TryParse(key, out var id) && value is not null)
32-
{
33-
toConfiguration.Items.Add(new ValueListConfiguration.ValueListItem()
34-
{
35-
Id = id,
36-
Value = value.ToString()
37-
});
38-
}
39-
}
29+
// foreach (var (key, value) in fromConfiguration)
30+
// {
31+
// if (int.TryParse(key, out var id) && value is not null)
32+
// {
33+
// toConfiguration.Items.Add(new ValueListConfiguration.ValueListItem()
34+
// {
35+
// Id = id,
36+
// Value = value.ToString()
37+
// });
38+
// }
39+
// }
4040

41-
return toConfiguration;
42-
}
41+
// return toConfiguration;
42+
// }
4343

44-
/// <inheritdoc />
45-
protected override ValueListConfiguration? GetDefaultConfiguration()
46-
=> new ValueListConfiguration();
47-
}
44+
// /// <inheritdoc />
45+
// protected override ValueListConfiguration? GetDefaultConfiguration()
46+
// => new ValueListConfiguration();
47+
//}
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
using System.Collections.Generic;
2-
using Umbraco.Cms.Core;
3-
using Umbraco.Cms.Core.PropertyEditors;
4-
using Umbraco.Cms.Core.Semver;
5-
using Umbraco.Cms.Core.Serialization;
6-
using Umbraco.Deploy.Infrastructure.Artifacts;
7-
using Umbraco.Deploy.Infrastructure.Migrators;
1+
//using System.Collections.Generic;
2+
//using Umbraco.Cms.Core;
3+
//using Umbraco.Cms.Core.PropertyEditors;
4+
//using Umbraco.Cms.Core.Semver;
5+
//using Umbraco.Cms.Core.Serialization;
6+
//using Umbraco.Deploy.Infrastructure.Artifacts;
7+
//using Umbraco.Deploy.Infrastructure.Migrators;
88

9-
namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
9+
//namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
1010

11-
/// <summary>
12-
/// Migrates the <see cref="DataTypeArtifact" /> to replace the <see cref="FromEditorAlias" /> editor with <see cref="Constants.PropertyEditors.Aliases.ColorPicker" /> and the configuration from Umbraco 7 to <see cref="ColorPickerConfiguration" />.
13-
/// </summary>
14-
public class ColorPickerAliasDataTypeArtifactMigrator : ReplaceDataTypeArtifactMigratorBase<ColorPickerConfiguration>
15-
{
16-
private const string FromEditorAlias = "Umbraco.ColorPickerAlias";
17-
private const string TrueValue = "1";
11+
///// <summary>
12+
///// Migrates the <see cref="DataTypeArtifact" /> to replace the <see cref="FromEditorAlias" /> editor with <see cref="Constants.PropertyEditors.Aliases.ColorPicker" /> and the configuration from Umbraco 7 to <see cref="ColorPickerConfiguration" />.
13+
///// </summary>
14+
//public class ColorPickerAliasDataTypeArtifactMigrator : ReplaceDataTypeArtifactMigratorBase<ColorPickerConfiguration>
15+
//{
16+
// private const string FromEditorAlias = "Umbraco.ColorPickerAlias";
17+
// private const string TrueValue = "1";
1818

19-
/// <summary>
20-
/// Initializes a new instance of the <see cref="ColorPickerAliasDataTypeArtifactMigrator" /> class.
21-
/// </summary>
22-
/// <param name="propertyEditors">The property editors.</param>
23-
/// <param name="configurationEditorJsonSerializer">The configuration editor JSON serializer.</param>
24-
public ColorPickerAliasDataTypeArtifactMigrator(PropertyEditorCollection propertyEditors, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
25-
: base(FromEditorAlias, Constants.PropertyEditors.Aliases.ColorPicker, propertyEditors, configurationEditorJsonSerializer)
26-
=> MaxVersion = new SemVersion(3, 0, 0);
19+
// /// <summary>
20+
// /// Initializes a new instance of the <see cref="ColorPickerAliasDataTypeArtifactMigrator" /> class.
21+
// /// </summary>
22+
// /// <param name="propertyEditors">The property editors.</param>
23+
// /// <param name="configurationEditorJsonSerializer">The configuration editor JSON serializer.</param>
24+
// public ColorPickerAliasDataTypeArtifactMigrator(PropertyEditorCollection propertyEditors, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
25+
// : base(FromEditorAlias, Constants.PropertyEditors.Aliases.ColorPicker, propertyEditors, configurationEditorJsonSerializer)
26+
// => MaxVersion = new SemVersion(3, 0, 0);
2727

28-
/// <inheritdoc />
29-
protected override ColorPickerConfiguration? MigrateConfiguration(IDictionary<string, object?> fromConfiguration)
30-
{
31-
var toConfiguration = new ColorPickerConfiguration();
28+
// /// <inheritdoc />
29+
// protected override ColorPickerConfiguration? MigrateConfiguration(IDictionary<string, object?> fromConfiguration)
30+
// {
31+
// var toConfiguration = new ColorPickerConfiguration();
3232

33-
foreach (var (key, value) in fromConfiguration)
34-
{
35-
if (key == "useLabel")
36-
{
37-
toConfiguration.UseLabel = TrueValue.Equals(value);
38-
}
39-
else if (int.TryParse(key, out var id) && value is not null)
40-
{
41-
toConfiguration.Items.Add(new ValueListConfiguration.ValueListItem()
42-
{
43-
Id = id,
44-
Value = value.ToString()
45-
});
46-
}
47-
}
33+
// foreach (var (key, value) in fromConfiguration)
34+
// {
35+
// if (key == "useLabel")
36+
// {
37+
// toConfiguration.UseLabel = TrueValue.Equals(value);
38+
// }
39+
// else if (int.TryParse(key, out var id) && value is not null)
40+
// {
41+
// toConfiguration.Items.Add(new ValueListConfiguration.ValueListItem()
42+
// {
43+
// Id = id,
44+
// Value = value.ToString()
45+
// });
46+
// }
47+
// }
4848

49-
return toConfiguration;
50-
}
51-
}
49+
// return toConfiguration;
50+
// }
51+
//}
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
using Umbraco.Cms.Core;
2-
using Umbraco.Cms.Core.PropertyEditors;
3-
using Umbraco.Cms.Core.Serialization;
4-
using Umbraco.Deploy.Infrastructure.Artifacts;
1+
//using Umbraco.Cms.Core;
2+
//using Umbraco.Cms.Core.PropertyEditors;
3+
//using Umbraco.Cms.Core.Serialization;
4+
//using Umbraco.Deploy.Infrastructure.Artifacts;
55

6-
namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
6+
//namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
77

8-
/// <summary>
9-
/// Migrates the <see cref="DataTypeArtifact" /> to replace the <see cref="FromEditorAlias" /> editor with <see cref="Constants.PropertyEditors.Aliases.DropDownListFlexible" /> and the configuration from Umbraco 7 to <see cref="DropDownFlexibleConfiguration" />.
10-
/// </summary>
11-
public class DropDownDataTypeArtifactMigrator : DropDownReplaceDataTypeArtifactMigratorBase
12-
{
13-
private const string FromEditorAlias = "Umbraco.DropDown";
8+
///// <summary>
9+
///// Migrates the <see cref="DataTypeArtifact" /> to replace the <see cref="FromEditorAlias" /> editor with <see cref="Constants.PropertyEditors.Aliases.DropDownListFlexible" /> and the configuration from Umbraco 7 to <see cref="DropDownFlexibleConfiguration" />.
10+
///// </summary>
11+
//public class DropDownDataTypeArtifactMigrator : DropDownReplaceDataTypeArtifactMigratorBase
12+
//{
13+
// private const string FromEditorAlias = "Umbraco.DropDown";
1414

15-
/// <inheritdoc />
16-
protected override bool Multiple => false;
15+
// /// <inheritdoc />
16+
// protected override bool Multiple => false;
1717

18-
/// <summary>
19-
/// Initializes a new instance of the <see cref="DropDownDataTypeArtifactMigrator" /> class.
20-
/// </summary>
21-
/// <param name="propertyEditors">The property editors.</param>
22-
/// <param name="configurationEditorJsonSerializer">The configuration editor JSON serializer.</param>
23-
public DropDownDataTypeArtifactMigrator(PropertyEditorCollection propertyEditors, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
24-
: base(FromEditorAlias, propertyEditors, configurationEditorJsonSerializer)
25-
{ }
26-
}
18+
// /// <summary>
19+
// /// Initializes a new instance of the <see cref="DropDownDataTypeArtifactMigrator" /> class.
20+
// /// </summary>
21+
// /// <param name="propertyEditors">The property editors.</param>
22+
// /// <param name="configurationEditorJsonSerializer">The configuration editor JSON serializer.</param>
23+
// public DropDownDataTypeArtifactMigrator(PropertyEditorCollection propertyEditors, IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
24+
// : base(FromEditorAlias, propertyEditors, configurationEditorJsonSerializer)
25+
// { }
26+
//}

0 commit comments

Comments
 (0)