Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .fallout/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
"Publish",
"References",
"ReportCoverage",
"ReportDuplicates",
"ReportIssues",
"Restore",
"RunTargetInDockerImageTest",
"Test",
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased] — 11.0

### Breaking changes

- **`Fallout.Tooling` engine migrated to System.Text.Json** (#117 STJ-4, #118 STJ-5). The tool-options ↔ JSON layer that powers every tool wrapper is now STJ-native:
- `Options.InternalOptions` is now `System.Text.Json.Nodes.JsonObject` (was Newtonsoft `JObject`). `Options.JsonSerializer` and `Options.JsonSerializerSettings` are gone — use `Options.SerializerOptions` (`JsonSerializerOptions`) instead.
- The Options→InternalOptions converter is now a `JsonConverterFactory` registered on `SerializerOptions.Converters` (STJ doesn't inherit class-level `[JsonConverter]` attributes onto subclasses). `LookupTable<,>` round-trips through a parallel `ObjectFromFieldConverter` factory; `Enumeration` subclasses go through a new `EnumerationJsonConverterFactory` that bridges `[TypeConverter]`-attributed types (which STJ doesn't honour natively).
- All 62 generated tool wrappers regenerated with `[JsonPropertyName]` instead of `[JsonProperty]` (#118). The generator's own JSON model (`Fallout.Tooling.Generator`) is migrated too — `Tool` / `Property` / `DataClass` / `Enumeration` / `Task` use `[JsonRequired]` / `[JsonPropertyName]` / `[JsonIgnore]` from `System.Text.Json.Serialization`.
- `IReadOnlyDictionary<string, object>` round-trips deserialize values as `JsonElement` (not `string` as Newtonsoft did); `DelegateHelper.ParseCollection` coerces both shapes back to string.
- **`Newtonsoft.Json` `PackageReference` removed** from `Fallout.Tooling`, `Fallout.Tooling.Generator`, and `Fallout.Utilities.Text.Json`. `Object.ToJObject` deleted (closes the residual #116 tail). `Fallout.Common` still references Newtonsoft for `*Tasks.cs` files until #119 (STJ-6) lands.
- Migration for consumers: replace `Options.JsonSerializerSettings` → `Options.SerializerOptions`; replace `obj.ToJObject(serializer)` → `JsonSerializer.SerializeToNode(obj, Options.SerializerOptions).AsObject()`; tool wrappers using hand-written `[JsonProperty]` (e.g. `SlackMessage.Type`) need to switch to `[JsonPropertyName]`.

- **`Fallout.Utilities.Text.Json` Newtonsoft surface removed** (#116, STJ-3 of #83). The `[Obsolete]`-marked Newtonsoft.Json overloads added in 10.3.x are gone:
- **Deleted types:** `JObjectExtensions` (`GetChildren`/`GetPropertyValue`/`GetPropertyStringValue`/`GetPropertyValueOrNull` on `JObject`), `AllWritableContractResolver`, `Base64JsonConverter<T>`.
- **Deleted types:** `JObjectExtensions` (`GetChildren`/`GetPropertyValue`/`GetPropertyStringValue`/`GetPropertyValueOrNull` on `JObject`), `AllWritableContractResolver`, `Base64JsonConverter<T>`, `Object.ToJObject`.
- **`JsonExtensions` stripped to System.Text.Json only**: `DefaultSerializerSettings` removed (use `DefaultSerializerOptions`); the `JsonSerializerSettings`-taking overloads of `ToJson` / `GetJson` / `ReadJson` / `WriteJson` / `UpdateJson` and the `JObject`-returning `GetJson`/`ReadJson`/`UpdateJson(Action<JObject>)` are gone. Equivalent STJ surface: same method names taking `JsonSerializerOptions` (now defaulted to `DefaultSerializerOptions` when omitted), plus `GetJsonObject` / `ReadJsonObject` / `UpdateJsonObject(Action<JsonObject>)` for `JsonNode`-based access.
- **Migration**: replace `obj.ToJson(settings)` with `obj.ToJson(JsonExtensions.DefaultSerializerOptions)` (or pass your own `JsonSerializerOptions`); replace `content.GetJson<JObject>()` with `content.GetJsonObject()`; replace `JObject.GetPropertyValue<T>(name)` with `JsonObject.GetPropertyValue<T>(name)` (same method name, different receiver type via `using System.Text.Json.Nodes`).
- **Still pending**: `Object.ToJObject` and the `Newtonsoft.Json` `PackageReference` remain in `Fallout.Utilities.Text.Json` until STJ-4 (Fallout.Tooling, #117) lands — `Fallout.Tooling.Options.InternalOptions` is typed `JObject` and drives the last caller.


- **Fixed `Fallout.SolutionModel` 10.2.24–10.2.34 unrestorable** (#107): the vendored SolutionPersistence wrapper was `IsPackable=false`, so `dotnet pack` fell back to emitting the dependency under the *assembly* name (`Microsoft.VisualStudio.SolutionPersistence`) at the Fallout version — which doesn't exist on nuget.org. Wrapper now packs as `Fallout.VisualStudio.SolutionPersistence` (PackageId set explicitly; `AssemblyName` preserved for drop-in type identity), so `Fallout.SolutionModel.nuspec` declares the correct transitive dep. Also affected `Fallout.Common`, `Fallout.Build`, `Fallout.ProjectModel`, `Fallout.Components` — all fixed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.AzureSignTool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.BenchmarkDotNet;

Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/Boots/Boots.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.Boots;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.Chocolatey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.CodeMetrics;

Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/Codecov/Codecov.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.Codecov;

Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/CorFlags/CorFlags.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.CorFlags;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.CoverallsNet;

Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/Coverlet/Coverlet.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Fallout.Common.Tools;
using Fallout.Common.Tools.DotNet;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -14,6 +13,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.Coverlet;

Expand Down
62 changes: 31 additions & 31 deletions src/Fallout.Common/Tools/Discord/Discord.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.Discord;

Expand All @@ -22,15 +22,15 @@ namespace Fallout.Common.Tools.Discord;
public partial class DiscordMessage : Options
{
/// <summary>Id of the channel.</summary>
[JsonProperty("channel_id")] public string ChannelId => Get<string>(() => ChannelId);
[JsonPropertyName("channel_id")] public string ChannelId => Get<string>(() => ChannelId);
/// <summary>Message contents (up to 2000 characters).</summary>
[JsonProperty("content")] public string Content => Get<string>(() => Content);
[JsonPropertyName("content")] public string Content => Get<string>(() => Content);
/// <summary>Can be used to verify a message was sent (up to 25 characters). Value will appear in the <a href="https://discord.com/developers/docs/topics/gateway-events#message-create">Message Create event</a>.</summary>
[JsonProperty("nonce")] public string Nonce => Get<string>(() => Nonce);
[JsonPropertyName("nonce")] public string Nonce => Get<string>(() => Nonce);
/// <summary>Whether this is a TTS message.</summary>
[JsonProperty("tts")] public bool? TTS => Get<bool?>(() => TTS);
[JsonPropertyName("tts")] public bool? TTS => Get<bool?>(() => TTS);
/// <summary>Embedded rich content (up to 6000 characters). See <a href="https://autocode.com/tools/discord/embed-builder/">Discord Embed Builder</a>.</summary>
[JsonProperty("embeds")] public IReadOnlyList<DiscordEmbed> Embeds => Get<List<DiscordEmbed>>(() => Embeds);
[JsonPropertyName("embeds")] public IReadOnlyList<DiscordEmbed> Embeds => Get<List<DiscordEmbed>>(() => Embeds);
}
#endregion
#region DiscordEmbed
Expand All @@ -39,27 +39,27 @@ public partial class DiscordMessage : Options
public partial class DiscordEmbed : Options
{
/// <summary>Title of embed.</summary>
[JsonProperty("title")] public string Title => Get<string>(() => Title);
[JsonPropertyName("title")] public string Title => Get<string>(() => Title);
/// <summary><a href="https://discord.com/developers/docs/resources/channel#embed-object-embed-types">Type of embed</a> (always <c>rich</c> for webhook embeds).</summary>
[JsonProperty("type")] public DiscordEmbedType Type => Get<DiscordEmbedType>(() => Type);
[JsonPropertyName("type")] public DiscordEmbedType Type => Get<DiscordEmbedType>(() => Type);
/// <summary>Description of embed.</summary>
[JsonProperty("description")] public string Description => Get<string>(() => Description);
[JsonPropertyName("description")] public string Description => Get<string>(() => Description);
/// <summary>Url of embed.</summary>
[JsonProperty("url")] public string Url => Get<string>(() => Url);
[JsonPropertyName("url")] public string Url => Get<string>(() => Url);
/// <summary>ISO8601 timestamp of embed.</summary>
[JsonProperty("timestamp")] public string Timestamp => Get<string>(() => Timestamp);
[JsonPropertyName("timestamp")] public string Timestamp => Get<string>(() => Timestamp);
/// <summary>Color code of the embed.</summary>
[JsonProperty("color")] public int? Color => Get<int?>(() => Color);
[JsonPropertyName("color")] public int? Color => Get<int?>(() => Color);
/// <summary>Footer information.</summary>
[JsonProperty("footer")] public DiscordEmbedFooter Footer => Get<DiscordEmbedFooter>(() => Footer);
[JsonPropertyName("footer")] public DiscordEmbedFooter Footer => Get<DiscordEmbedFooter>(() => Footer);
/// <summary>Image information.</summary>
[JsonProperty("image")] public DiscordEmbedImage Image => Get<DiscordEmbedImage>(() => Image);
[JsonPropertyName("image")] public DiscordEmbedImage Image => Get<DiscordEmbedImage>(() => Image);
/// <summary>Thumbnail information.</summary>
[JsonProperty("thumbnail")] public DiscordEmbedThumbnail Thumbnail => Get<DiscordEmbedThumbnail>(() => Thumbnail);
[JsonPropertyName("thumbnail")] public DiscordEmbedThumbnail Thumbnail => Get<DiscordEmbedThumbnail>(() => Thumbnail);
/// <summary>Author information.</summary>
[JsonProperty("author")] public DiscordEmbedAuthor Author => Get<DiscordEmbedAuthor>(() => Author);
[JsonPropertyName("author")] public DiscordEmbedAuthor Author => Get<DiscordEmbedAuthor>(() => Author);
/// <summary>Fields information.</summary>
[JsonProperty("fields")] public IReadOnlyList<DiscordEmbedField> Fields => Get<List<DiscordEmbedField>>(() => Fields);
[JsonPropertyName("fields")] public IReadOnlyList<DiscordEmbedField> Fields => Get<List<DiscordEmbedField>>(() => Fields);
}
#endregion
#region DiscordEmbedFooter
Expand All @@ -68,9 +68,9 @@ public partial class DiscordEmbed : Options
public partial class DiscordEmbedFooter : Options
{
/// <summary>Footer text.</summary>
[JsonProperty("text")] public string Text => Get<string>(() => Text);
[JsonPropertyName("text")] public string Text => Get<string>(() => Text);
/// <summary>Url of footer icon (only supports http(s) and attachments).</summary>
[JsonProperty("icon_url")] public string IconUrl => Get<string>(() => IconUrl);
[JsonPropertyName("icon_url")] public string IconUrl => Get<string>(() => IconUrl);
}
#endregion
#region DiscordEmbedImage
Expand All @@ -79,11 +79,11 @@ public partial class DiscordEmbedFooter : Options
public partial class DiscordEmbedImage : Options
{
/// <summary>Source url of image (only supports http(s) and attachments).</summary>
[JsonProperty("url")] public string Url => Get<string>(() => Url);
[JsonPropertyName("url")] public string Url => Get<string>(() => Url);
/// <summary>Height of image.</summary>
[JsonProperty("height")] public int? Height => Get<int?>(() => Height);
[JsonPropertyName("height")] public int? Height => Get<int?>(() => Height);
/// <summary>Width of image.</summary>
[JsonProperty("width")] public int? Width => Get<int?>(() => Width);
[JsonPropertyName("width")] public int? Width => Get<int?>(() => Width);
}
#endregion
#region DiscordEmbedThumbnail
Expand All @@ -92,11 +92,11 @@ public partial class DiscordEmbedImage : Options
public partial class DiscordEmbedThumbnail : Options
{
/// <summary>Source url of thumbnail (only supports http(s) and attachments).</summary>
[JsonProperty("url")] public string Url => Get<string>(() => Url);
[JsonPropertyName("url")] public string Url => Get<string>(() => Url);
/// <summary>Height of thumbnail.</summary>
[JsonProperty("height")] public int? Height => Get<int?>(() => Height);
[JsonPropertyName("height")] public int? Height => Get<int?>(() => Height);
/// <summary>Width of thumbnail.</summary>
[JsonProperty("width")] public int? Width => Get<int?>(() => Width);
[JsonPropertyName("width")] public int? Width => Get<int?>(() => Width);
}
#endregion
#region DiscordEmbedAuthor
Expand All @@ -105,11 +105,11 @@ public partial class DiscordEmbedThumbnail : Options
public partial class DiscordEmbedAuthor : Options
{
/// <summary>Name of author.</summary>
[JsonProperty("name")] public string Name => Get<string>(() => Name);
[JsonPropertyName("name")] public string Name => Get<string>(() => Name);
/// <summary>Url of author.</summary>
[JsonProperty("url")] public string Url => Get<string>(() => Url);
[JsonPropertyName("url")] public string Url => Get<string>(() => Url);
/// <summary>Url of author icon (only supports http(s) and attachments).</summary>
[JsonProperty("icon_url")] public string IconUrl => Get<string>(() => IconUrl);
[JsonPropertyName("icon_url")] public string IconUrl => Get<string>(() => IconUrl);
}
#endregion
#region DiscordEmbedField
Expand All @@ -118,11 +118,11 @@ public partial class DiscordEmbedAuthor : Options
public partial class DiscordEmbedField : Options
{
/// <summary>Name of the field.</summary>
[JsonProperty("name")] public string Name => Get<string>(() => Name);
[JsonPropertyName("name")] public string Name => Get<string>(() => Name);
/// <summary>Value of the field.</summary>
[JsonProperty("value")] public string Value => Get<string>(() => Value);
[JsonPropertyName("value")] public string Value => Get<string>(() => Value);
/// <summary>Whether or not this field should siplay inline.</summary>
[JsonProperty("inline")] public bool? Inline => Get<bool?>(() => Inline);
[JsonPropertyName("inline")] public bool? Inline => Get<bool?>(() => Inline);
}
#endregion
#region DiscordMessageExtensions
Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/DocFX/DocFX.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.DocFX;

Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/Docker/Docker.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.Docker;

Expand Down
2 changes: 1 addition & 1 deletion src/Fallout.Common/Tools/DotCover/DotCover.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.DotCover;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Fallout.Common.Tooling;
using Fallout.Common.Tools;
using Fallout.Common.Utilities.Collections;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -13,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;

namespace Fallout.Common.Tools.DotMemoryUnit;

Expand Down
Loading
Loading