From 59ecfc24245af0bf8e386159d9cef56e1da908fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 12:41:02 +0000 Subject: [PATCH 1/2] Bump the dotnet-dependencies group with 3 updates Bumps Microsoft.SymbolStore from 1.0.727501 to 1.0.731401 Bumps PrettyPrompt from 6.0.1 to 6.0.2 Bumps System.CommandLine from 3.0.0-preview.4.26230.115 to 3.0.0-preview.5.26302.115 --- updated-dependencies: - dependency-name: Microsoft.SymbolStore dependency-version: 1.0.731401 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet-dependencies - dependency-name: PrettyPrompt dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet-dependencies - dependency-name: PrettyPrompt dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet-dependencies - dependency-name: PrettyPrompt dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet-dependencies - dependency-name: System.CommandLine dependency-version: 3.0.0-preview.5.26302.115 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet-dependencies ... Signed-off-by: dependabot[bot] --- .../CSharpRepl.Services.csproj | 180 +++++++-------- CSharpRepl/CSharpRepl.csproj | 218 +++++++++--------- .../CSharpRepl.Tests/CSharpRepl.Tests.csproj | 104 ++++----- 3 files changed, 251 insertions(+), 251 deletions(-) diff --git a/CSharpRepl.Services/CSharpRepl.Services.csproj b/CSharpRepl.Services/CSharpRepl.Services.csproj index b2b7594c..5c60b8d2 100644 --- a/CSharpRepl.Services/CSharpRepl.Services.csproj +++ b/CSharpRepl.Services/CSharpRepl.Services.csproj @@ -1,90 +1,90 @@ - - - net10.0 - enable - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - + + + net10.0 + enable + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + diff --git a/CSharpRepl/CSharpRepl.csproj b/CSharpRepl/CSharpRepl.csproj index fc0611ec..7b9c6067 100644 --- a/CSharpRepl/CSharpRepl.csproj +++ b/CSharpRepl/CSharpRepl.csproj @@ -1,109 +1,109 @@ - - - - 0.8.0 - Exe - net10.0 - LatestMajor - latest - enable - - A dotnet global tool for a command line C# REPL with syntax highlighting. Explore the language, libraries and NuGet packages interactively. - README.md - https://github.com/waf/CSharpRepl - git - Will Fuqua - - - true - csharprepl - repl console cli csharp tool - ./nupkg - https://github.com/waf/CSharpRepl - https://github.com/waf/CSharpRepl/blob/main/CHANGELOG.md - MPL-2.0 - - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - <_InspectorPayload Include="$(MSBuildThisFileDirectory)..\InjectedHook\CSharpRepl.InjectedHook\bin\$(Configuration)\$(TargetFramework)\**\*.*" /> - - PreserveNewest - - false - - - - - - - - any;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 - true - false - - - - - - - - - - - - - - - - PreserveNewest - - - - - + + + + 0.8.0 + Exe + net10.0 + LatestMajor + latest + enable + + A dotnet global tool for a command line C# REPL with syntax highlighting. Explore the language, libraries and NuGet packages interactively. + README.md + https://github.com/waf/CSharpRepl + git + Will Fuqua + + + true + csharprepl + repl console cli csharp tool + ./nupkg + https://github.com/waf/CSharpRepl + https://github.com/waf/CSharpRepl/blob/main/CHANGELOG.md + MPL-2.0 + + + + + + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + <_InspectorPayload Include="$(MSBuildThisFileDirectory)..\InjectedHook\CSharpRepl.InjectedHook\bin\$(Configuration)\$(TargetFramework)\**\*.*" /> + + PreserveNewest + + false + + + + + + + + any;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 + true + false + + + + + + + + + + + + + + + + PreserveNewest + + + + + diff --git a/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj b/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj index 601a8cd9..8cf674c4 100644 --- a/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj +++ b/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj @@ -1,52 +1,52 @@ - - - - Exe - net10.0 - false - - - - - - - - - - - - - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - + + + + Exe + net10.0 + false + + + + + + + + + + + + + + + + + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + From 19f6e7b9718a60491a1e00a346b27e3ac5d6f3c6 Mon Sep 17 00:00:00 2001 From: Will Fuqua Date: Wed, 17 Jun 2026 19:49:51 +0700 Subject: [PATCH 2/2] Normalize line endings --- .../CSharpRepl.Services.csproj | 180 +++++++-------- .../SyntaxHighlighting/HighlightedSpan.cs | 140 +++++------ CSharpRepl/CSharpRepl.csproj | 218 +++++++++--------- .../CSharpRepl.Tests/CSharpRepl.Tests.csproj | 104 ++++----- 4 files changed, 321 insertions(+), 321 deletions(-) diff --git a/CSharpRepl.Services/CSharpRepl.Services.csproj b/CSharpRepl.Services/CSharpRepl.Services.csproj index 5c60b8d2..8bbcff13 100644 --- a/CSharpRepl.Services/CSharpRepl.Services.csproj +++ b/CSharpRepl.Services/CSharpRepl.Services.csproj @@ -1,90 +1,90 @@ - - - net10.0 - enable - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - + + + net10.0 + enable + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + diff --git a/CSharpRepl.Services/SyntaxHighlighting/HighlightedSpan.cs b/CSharpRepl.Services/SyntaxHighlighting/HighlightedSpan.cs index d1f7ad12..e5688e89 100644 --- a/CSharpRepl.Services/SyntaxHighlighting/HighlightedSpan.cs +++ b/CSharpRepl.Services/SyntaxHighlighting/HighlightedSpan.cs @@ -1,71 +1,71 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.CodeAnalysis.Text; -using PrettyPrompt.Highlighting; - -namespace CSharpRepl.Services.SyntaxHighlighting; - -public sealed record HighlightedSpan(TextSpan TextSpan, AnsiColor Color); - -public static class HighlightedSpanExtensions -{ - public static IReadOnlyCollection ToFormatSpans(this IReadOnlyCollection spans) => spans - .Select(span => new FormatSpan( - span.TextSpan.Start, - span.TextSpan.Length, - new ConsoleFormat(Foreground: span.Color) - )) - .ToArray(); - - /// - /// Converts possibly-overlapping format spans into the disjoint spans requires. - /// Roslyn's classifier nests spans (e.g. a string-escape-character span inside a string-literal span). The - /// later-starting span is the more specific classification, so it wins; the span it interrupts resumes after - /// it ends. The prompt's own renderer tolerates overlap, so this is only needed when building a FormattedString. - /// - public static IReadOnlyList FlattenOverlappingSpans(this IEnumerable spans) - { - // at equal starts, the longer (enclosing) span sorts first so the shorter, more specific span is - // pushed later and takes precedence over it. - var sorted = spans.OrderBy(s => s.Start).ThenByDescending(s => s.Length).ToArray(); - var result = new List(sorted.Length); - var enclosing = new Stack(); - int position = 0; - - foreach (var span in sorted) - { - // emit the tails of spans that end before this one starts - while (enclosing.TryPeek(out var top) && top.End <= span.Start) - { - Emit(top, top.End); - enclosing.Pop(); - } - // emit the segment of the still-open span leading up to this more specific span - if (enclosing.TryPeek(out var current)) - { - Emit(current, span.Start); - } - enclosing.Push(span); - } - while (enclosing.TryPop(out var top)) - { - Emit(top, top.End); - } - return result; - - void Emit(FormatSpan span, int end) - { - int start = Math.Max(position, span.Start); - if (end > start) - { - result.Add(new FormatSpan(start, end - start, span.Formatting)); - position = end; - } - } - } +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.Text; +using PrettyPrompt.Highlighting; + +namespace CSharpRepl.Services.SyntaxHighlighting; + +public sealed record HighlightedSpan(TextSpan TextSpan, AnsiColor Color); + +public static class HighlightedSpanExtensions +{ + public static IReadOnlyCollection ToFormatSpans(this IReadOnlyCollection spans) => spans + .Select(span => new FormatSpan( + span.TextSpan.Start, + span.TextSpan.Length, + new ConsoleFormat(Foreground: span.Color) + )) + .ToArray(); + + /// + /// Converts possibly-overlapping format spans into the disjoint spans requires. + /// Roslyn's classifier nests spans (e.g. a string-escape-character span inside a string-literal span). The + /// later-starting span is the more specific classification, so it wins; the span it interrupts resumes after + /// it ends. The prompt's own renderer tolerates overlap, so this is only needed when building a FormattedString. + /// + public static IReadOnlyList FlattenOverlappingSpans(this IEnumerable spans) + { + // at equal starts, the longer (enclosing) span sorts first so the shorter, more specific span is + // pushed later and takes precedence over it. + var sorted = spans.OrderBy(s => s.Start).ThenByDescending(s => s.Length).ToArray(); + var result = new List(sorted.Length); + var enclosing = new Stack(); + int position = 0; + + foreach (var span in sorted) + { + // emit the tails of spans that end before this one starts + while (enclosing.TryPeek(out var top) && top.End <= span.Start) + { + Emit(top, top.End); + enclosing.Pop(); + } + // emit the segment of the still-open span leading up to this more specific span + if (enclosing.TryPeek(out var current)) + { + Emit(current, span.Start); + } + enclosing.Push(span); + } + while (enclosing.TryPop(out var top)) + { + Emit(top, top.End); + } + return result; + + void Emit(FormatSpan span, int end) + { + int start = Math.Max(position, span.Start); + if (end > start) + { + result.Add(new FormatSpan(start, end - start, span.Formatting)); + position = end; + } + } + } } \ No newline at end of file diff --git a/CSharpRepl/CSharpRepl.csproj b/CSharpRepl/CSharpRepl.csproj index 7b9c6067..230dabe8 100644 --- a/CSharpRepl/CSharpRepl.csproj +++ b/CSharpRepl/CSharpRepl.csproj @@ -1,109 +1,109 @@ - - - - 0.8.0 - Exe - net10.0 - LatestMajor - latest - enable - - A dotnet global tool for a command line C# REPL with syntax highlighting. Explore the language, libraries and NuGet packages interactively. - README.md - https://github.com/waf/CSharpRepl - git - Will Fuqua - - - true - csharprepl - repl console cli csharp tool - ./nupkg - https://github.com/waf/CSharpRepl - https://github.com/waf/CSharpRepl/blob/main/CHANGELOG.md - MPL-2.0 - - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - <_InspectorPayload Include="$(MSBuildThisFileDirectory)..\InjectedHook\CSharpRepl.InjectedHook\bin\$(Configuration)\$(TargetFramework)\**\*.*" /> - - PreserveNewest - - false - - - - - - - - any;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 - true - false - - - - - - - - - - - - - - - - PreserveNewest - - - - - + + + + 0.8.0 + Exe + net10.0 + LatestMajor + latest + enable + + A dotnet global tool for a command line C# REPL with syntax highlighting. Explore the language, libraries and NuGet packages interactively. + README.md + https://github.com/waf/CSharpRepl + git + Will Fuqua + + + true + csharprepl + repl console cli csharp tool + ./nupkg + https://github.com/waf/CSharpRepl + https://github.com/waf/CSharpRepl/blob/main/CHANGELOG.md + MPL-2.0 + + + + + + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + <_InspectorPayload Include="$(MSBuildThisFileDirectory)..\InjectedHook\CSharpRepl.InjectedHook\bin\$(Configuration)\$(TargetFramework)\**\*.*" /> + + PreserveNewest + + false + + + + + + + + any;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 + true + false + + + + + + + + + + + + + + + + PreserveNewest + + + + + diff --git a/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj b/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj index 8cf674c4..dd1c237c 100644 --- a/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj +++ b/Tests/CSharpRepl.Tests/CSharpRepl.Tests.csproj @@ -1,52 +1,52 @@ - - - - Exe - net10.0 - false - - - - - - - - - - - - - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - + + + + Exe + net10.0 + false + + + + + + + + + + + + + + + + + + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + compile; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + +