Skip to content

Commit b87019c

Browse files
committed
Update to CMS and Deploy 14 and version to 14.0.0-beta001.
Comment out migrators that need amending due to breaking changes or conversion to System.Text.Json.
1 parent 8c4015d commit b87019c

22 files changed

+3738
-1192
lines changed

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: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@ public static class ArtifactMigratorCollectionBuilderExtensions
1515
public static ArtifactMigratorCollectionBuilder AddLegacyMigrators(this ArtifactMigratorCollectionBuilder artifactMigratorCollectionBuilder)
1616
=> artifactMigratorCollectionBuilder
1717
// Pre-values to configuration
18-
.Append<PreValuesDataTypeArtifactJsonMigrator>()
18+
////.Append<PreValuesDataTypeArtifactJsonMigrator>()
1919
// Release/expire dates to schedule
20-
.Append<DocumentArtifactJsonMigrator>()
20+
////.Append<DocumentArtifactJsonMigrator>()
2121
// Allowed at root and child content types to permissions
22-
.Append<ContentTypeArtifactJsonMigrator>()
22+
////.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>()
Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
using Newtonsoft.Json.Linq;
2-
using Umbraco.Cms.Core.Models;
3-
using Umbraco.Cms.Core.Semver;
4-
using Umbraco.Deploy.Infrastructure.Artifacts.Content;
5-
using Umbraco.Deploy.Infrastructure.Migrators;
1+
//using Newtonsoft.Json.Linq;
2+
//using Umbraco.Cms.Core.Models;
3+
//using Umbraco.Cms.Core.Semver;
4+
//using Umbraco.Deploy.Infrastructure.Artifacts.Content;
5+
//using Umbraco.Deploy.Infrastructure.Migrators;
66

7-
namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
7+
//namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
88

9-
/// <summary>
10-
/// Migrates the <see cref="DocumentArtifact" /> JSON from Umbraco 7 release/expire date to schedule.
11-
/// </summary>
12-
public class DocumentArtifactJsonMigrator : ArtifactJsonMigratorBase<DocumentArtifact>
13-
{
14-
/// <summary>
15-
/// Initializes a new instance of the <see cref="DocumentArtifactJsonMigrator" /> class.
16-
/// </summary>
17-
public DocumentArtifactJsonMigrator()
18-
=> MaxVersion = new SemVersion(3, 0, 0);
9+
///// <summary>
10+
///// Migrates the <see cref="DocumentArtifact" /> JSON from Umbraco 7 release/expire date to schedule.
11+
///// </summary>
12+
//public class DocumentArtifactJsonMigrator : ArtifactJsonMigratorBase<DocumentArtifact>
13+
//{
14+
// /// <summary>
15+
// /// Initializes a new instance of the <see cref="DocumentArtifactJsonMigrator" /> class.
16+
// /// </summary>
17+
// public DocumentArtifactJsonMigrator()
18+
// => MaxVersion = new SemVersion(3, 0, 0);
1919

20-
/// <inheritdoc />
21-
public override JToken Migrate(JToken artifactJson)
22-
{
23-
var schedule = new JArray();
20+
// /// <inheritdoc />
21+
// public override JToken Migrate(JToken artifactJson)
22+
// {
23+
// var schedule = new JArray();
2424

25-
if (artifactJson["ReleaseDate"] is JValue releaseDate &&
26-
releaseDate.Value is not null)
27-
{
28-
schedule.Add(new JObject()
29-
{
30-
["Date"] = releaseDate.Value<string>(),
31-
["Culture"] = string.Empty,
32-
["Action"] = nameof(ContentScheduleAction.Release)
33-
});
34-
}
25+
// if (artifactJson["ReleaseDate"] is JValue releaseDate &&
26+
// releaseDate.Value is not null)
27+
// {
28+
// schedule.Add(new JObject()
29+
// {
30+
// ["Date"] = releaseDate.Value<string>(),
31+
// ["Culture"] = string.Empty,
32+
// ["Action"] = nameof(ContentScheduleAction.Release)
33+
// });
34+
// }
3535

36-
if (artifactJson["ExpireDate"] is JValue expireDate &&
37-
expireDate.Value is not null)
38-
{
39-
schedule.Add(new JObject()
40-
{
41-
["Date"] = expireDate,
42-
["Culture"] = string.Empty,
43-
["Action"] = nameof(ContentScheduleAction.Expire)
44-
});
45-
}
36+
// if (artifactJson["ExpireDate"] is JValue expireDate &&
37+
// expireDate.Value is not null)
38+
// {
39+
// schedule.Add(new JObject()
40+
// {
41+
// ["Date"] = expireDate,
42+
// ["Culture"] = string.Empty,
43+
// ["Action"] = nameof(ContentScheduleAction.Expire)
44+
// });
45+
// }
4646

47-
artifactJson["Schedule"] = schedule;
47+
// artifactJson["Schedule"] = schedule;
4848

49-
return artifactJson;
50-
}
51-
}
49+
// return artifactJson;
50+
// }
51+
//}
Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
using System;
2-
using Newtonsoft.Json.Linq;
3-
using Umbraco.Cms.Core.Semver;
4-
using Umbraco.Deploy.Infrastructure.Artifacts.ContentType;
5-
using Umbraco.Deploy.Infrastructure.Migrators;
6-
using Umbraco.Extensions;
7-
8-
namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
9-
10-
/// <summary>
11-
/// Migrates the <see cref="ContentTypeArtifactBase" /> JSON from Umbraco 7 allowed at root and child content types to permissions.
12-
/// </summary>
13-
public class ContentTypeArtifactJsonMigrator : ArtifactJsonMigratorBase<ContentTypeArtifactBase>
14-
{
15-
/// <summary>
16-
/// Initializes a new instance of the <see cref="ContentTypeArtifactJsonMigrator" /> class.
17-
/// </summary>
18-
public ContentTypeArtifactJsonMigrator()
19-
=> MaxVersion = new SemVersion(3, 0, 0);
20-
21-
protected override bool CanMigrateType(Type type)
22-
=> type.Inherits<ContentTypeArtifactBase>();
23-
24-
/// <inheritdoc />
25-
public override JToken Migrate(JToken artifactJson)
26-
{
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)
36-
{
37-
permissions["AllowedChildContentTypes"] = allowedChildContentTypesToken;
38-
}
39-
40-
artifactJson["Permissions"] = permissions;
41-
42-
return artifactJson;
43-
}
44-
}
1+
//using System;
2+
//using Newtonsoft.Json.Linq;
3+
//using Umbraco.Cms.Core.Semver;
4+
//using Umbraco.Deploy.Infrastructure.Artifacts.ContentType;
5+
//using Umbraco.Deploy.Infrastructure.Migrators;
6+
//using Umbraco.Extensions;
7+
8+
//namespace Umbraco.Deploy.Contrib.Migrators.Legacy;
9+
10+
///// <summary>
11+
///// Migrates the <see cref="ContentTypeArtifactBase" /> JSON from Umbraco 7 allowed at root and child content types to permissions.
12+
///// </summary>
13+
//public class ContentTypeArtifactJsonMigrator : ArtifactJsonMigratorBase<ContentTypeArtifactBase>
14+
//{
15+
// /// <summary>
16+
// /// Initializes a new instance of the <see cref="ContentTypeArtifactJsonMigrator" /> class.
17+
// /// </summary>
18+
// public ContentTypeArtifactJsonMigrator()
19+
// => MaxVersion = new SemVersion(3, 0, 0);
20+
21+
// protected override bool CanMigrateType(Type type)
22+
// => type.Inherits<ContentTypeArtifactBase>();
23+
24+
// /// <inheritdoc />
25+
// public override JToken Migrate(JToken artifactJson)
26+
// {
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)
36+
// {
37+
// permissions["AllowedChildContentTypes"] = allowedChildContentTypesToken;
38+
// }
39+
40+
// artifactJson["Permissions"] = permissions;
41+
42+
// return artifactJson;
43+
// }
44+
//}
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+
//}

0 commit comments

Comments
 (0)