mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-08-29 10:09:43 +02:00
## Summary of the Pull Request Updates `SharpCompress` from **0.37.2** to **0.50.1** (latest listed stable) and migrates Peek's `ArchivePreviewer` to the renamed APIs. 0.37.2 is subject to [GHSA-6c8g-7p36-r338](https://github.com/advisories/GHSA-6c8g-7p36-r338) (moderate severity), which currently produces an `NU1902` warning on restore. This upgrade clears it. The bump also required a real behavioral fix: `.tar.gz` / `.tgz` previews break outright on 0.50.1 without it. Details below. ## PR Checklist - [ ] Closes: #xxx <!-- N/A: no tracking issue, this is a dependency/security bump --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass <!-- See "Validation Steps Performed" - Peek has no unit test project today, so this was validated with a differential harness. Happy to add coverage if desired. --> - [x] **Localization:** All end-user-facing strings can be localized <!-- N/A: no strings added or changed --> - [ ] **Dev docs:** Added/updated <!-- N/A --> - [ ] **New binaries:** Added on the required places <!-- N/A: no new binaries. SharpCompress.dll already ships with Peek; only its version changes. --> - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- N/A --> ## Detailed Description of the Pull Request / Additional comments Two files change: **`Directory.Packages.props`** - central version pin moves `0.37.2` to `0.50.1`. `Peek.FilePreviewer.csproj` needs no edit because its `PackageReference` is versionless under Central Package Management. **`src/modules/peek/Peek.FilePreviewer/Previewers/Archives/ArchivePreviewer.cs`** - the only SharpCompress consumer in the repo. ### API renames Verified by reflecting over the shipped 0.50.1 assembly rather than guessing: | 0.37.2 | 0.50.1 | |---|---| | `ArchiveFactory.Open(...)` | `ArchiveFactory.OpenArchive(...)` | | `ReaderFactory.Open(...)` | `ReaderFactory.OpenReader(...)` | | `IArchive.TotalUncompressSize` | `IArchive.TotalUncompressedSize` | `ArchiveEncoding`, `ReaderOptions.Forced`, and `IEntry.Key`/`Size`/`IsDirectory` are unchanged, so the existing zip CP437 encoding-probe logic ported over without modification. ### Behavioral fix: `.tar.gz` / `.tgz` The renames alone are not sufficient. On 0.50.1, `ArchiveFactory.OpenArchive` can no longer open a gzip-compressed tar as a random-access archive; it throws `ArchiveOperationException: Cannot determine compressed stream type`. On 0.37.2 the same call succeeded and returned `type=Tar`. I probed six alternatives before settling on a fix: `OpenArchive(path)`, `ExtensionHint="tar.gz"`, `ExtensionHint=".tar.gz"`, `LookForHeader=true`, the `FileInfo` overload, and `OpenReader`. Only `ReaderFactory.OpenReader` works. The branch is now forward-only through `OpenReader`, and the `OpenArchive` + `stream.Seek(0)` preamble is removed. This path is user-reachable, so the break would have shipped: `FileItem.Extension` returns `.gz` for `foo.tar.gz`, and `.gz` is in `_supportedFileTypes`, so Peek does preview these files. ### Incidental correctness fix While rewriting that branch, the reported size changes. The old code used `archive.TotalUncompressSize`, which for a `.tar.gz` reported the size of the intermediate **tar container** rather than the sum of the entries. It now accumulates `reader.Entry.Size`, so the footer count/size line is correct for these archives. ## Validation Steps Performed `Peek.FilePreviewer` builds clean (x64 Release) resolving SharpCompress 0.50.1. Peek has no unit test project, and the only archive coverage in `Peek.UITests` is `Peek.FilePreview.ZIPArchive`, which previews `TestAssets\7.zip` and asserts via screenshot comparison. There is no `.tar.gz` test asset, so nothing in the existing suite would have caught the regression above. Given that, I validated with a standalone differential harness that replicates `LoadPreviewAsync` verbatim and runs it against **both** 0.37.2 and 0.50.1 over the same set of archives, comparing entry names and sizes: | Archive | 0.37.2 | 0.50.1 | |---|---|---| | `test.zip` | `sub/nested.txt (19)`, `hello.txt (11)`, total 30 | identical | | `utf8.zip` | names correct | names correct | | `sjis.zip` | `日本語/テスト.txt` correct | identical | | `short.zip` | `caf‚.txt`, `na‹ve.md`, `a¤o.log` (mangled, detected windows-1252) | `café.txt`, `naïve.md`, `año.log` (correct, detected utf-8) | | `test.tar.gz` | opens, total 4096 (container size) | opens, total 30 (correct) | | `test.tar` | ok | ok | | `hello.gz` | ok | ok | All entry names and sizes match. 0.50.1 is strictly more correct on short non-ASCII entry names and on `.tar.gz` sizing. One subtle difference worth flagging for reviewers: on `utf8.zip`, 0.50.1 honors `ArchiveEncoding.Forced` even for UTF-8-flagged zips, so the strict CP437 round-trip no longer throws and `encodingDetermined` comes back `false` where it was `true` before. The decoded names are still correct, because charset detection then correctly identifies UTF-8. No tested case produced wrong output. Manual validation: previewed `.zip`, `.tar`, `.tar.gz`, and `.gz` files in Peek. `NOTICE.md` lists SharpCompress by name without a version, so it needs no update. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb1e58a5-de5b-420e-8153-ef9b15810211
155 lines
12 KiB
XML
155 lines
12 KiB
XML
<Project>
|
|
<PropertyGroup>
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
|
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
|
|
<MSTestVersion>3.8.3</MSTestVersion>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<PackageVersion Include="AdaptiveCards.ObjectModel.WinUI3" Version="2.0.2-beta" />
|
|
<PackageVersion Include="AdaptiveCards.Rendering.WinUI3" Version="2.2.4-beta" />
|
|
<PackageVersion Include="AdaptiveCards.Templating" Version="2.0.6" />
|
|
<PackageVersion Include="boost" Version="1.87.0" TargetFramework="native" />
|
|
<PackageVersion Include="boost_regex-vc143" Version="1.87.0" TargetFramework="native" />
|
|
<PackageVersion Include="CommunityToolkit.Labs.WinUI.Controls.OpacityMaskView" Version="0.1.251101-build.2372" />
|
|
<PackageVersion Include="Microsoft.Bot.AdaptiveExpressions.Core" Version="4.23.1" />
|
|
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
|
|
<PackageVersion Include="CoenM.ImageSharp.ImageHash" Version="1.3.6" />
|
|
<!-- Pin the SixLabors.ImageSharp version (a transitive dependency of CoenM.ImageSharp.ImageHash) to restore functionality and apply patches. -->
|
|
<PackageVersion Include="SixLabors.ImageSharp" Version="2.1.12" />
|
|
<PackageVersion Include="CommunityToolkit.Common" Version="8.4.0" />
|
|
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Animations" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Collections" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Primitives" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Segmented" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Converters" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.Extensions" Version="8.2.251219" />
|
|
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
|
<PackageVersion Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" Version="0.1.260116-build.2514" />
|
|
<PackageVersion Include="ControlzEx" Version="6.0.0" />
|
|
<PackageVersion Include="HelixToolkit" Version="2.24.0" />
|
|
<PackageVersion Include="HelixToolkit.Core.Wpf" Version="2.24.0" />
|
|
<PackageVersion Include="HtmlAgilityPack" Version="1.12.3" />
|
|
<PackageVersion Include="hyjiacan.pinyin4net" Version="4.1.1" />
|
|
<PackageVersion Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0.2" />
|
|
<PackageVersion Include="LazyCache" Version="2.4.0" />
|
|
<PackageVersion Include="Mages" Version="3.0.0" />
|
|
<PackageVersion Include="Markdig.Signed" Version="0.34.0" />
|
|
<!-- Including MessagePack to force version, since it's used by StreamJsonRpc but contains vulnerabilities. After StreamJsonRpc updates the version of MessagePack, we can upgrade StreamJsonRpc instead. -->
|
|
<PackageVersion Include="MessagePack" Version="3.1.7" />
|
|
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="10.0.102" />
|
|
<PackageVersion Include="Microsoft.CommandPalette.Extensions" Version="0.9.260303001" />
|
|
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.10" />
|
|
<!-- Including Microsoft.Bcl.AsyncInterfaces to force version, since it's used by Microsoft.SemanticKernel. -->
|
|
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Graphics.Win2D" Version="1.3.2" />
|
|
<PackageVersion Include="Microsoft.Windows.CppWinRT" Version="2.0.250303.1" />
|
|
<PackageVersion Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.1.16" />
|
|
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.2.0" />
|
|
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.0.1-preview.1.25571.5" />
|
|
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.AI.Foundry.Local" Version="0.3.0" />
|
|
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.71.0" />
|
|
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.OpenAI" Version="1.71.0" />
|
|
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.AzureAIInference" Version="1.71.0-beta" />
|
|
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.Google" Version="1.71.0-alpha" />
|
|
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.MistralAI" Version="1.71.0-alpha" />
|
|
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.Ollama" Version="1.71.0-alpha" />
|
|
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
|
|
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.4022.49" />
|
|
<!-- Package Microsoft.Win32.SystemEvents added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Drawing.Common but the 8.0.1 version wasn't published to nuget. -->
|
|
<PackageVersion Include="Microsoft.Win32.SystemEvents" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.10.340" />
|
|
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="10.0.10" />
|
|
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.269" />
|
|
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
|
|
<!--
|
|
TODO: in Common.Dotnet.CsWinRT.props, on upgrade, verify RemoveCsWinRTPackageAnalyzer is no longer needed.
|
|
This is present due to a bug in CsWinRT where WPF projects cause the analyzer to fail.
|
|
-->
|
|
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
|
|
<PackageVersion Include="Microsoft.Windows.ImplementationLibrary" Version="1.0.250325.1" />
|
|
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.6901" />
|
|
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="2.2.0" />
|
|
<PackageVersion Include="Microsoft.WindowsAppSDK.Foundation" Version="2.1.0" />
|
|
<PackageVersion Include="Microsoft.WindowsAppSDK.AI" Version="2.2.3" />
|
|
<PackageVersion Include="Microsoft.WindowsAppSDK.Runtime" Version="2.2.0" />
|
|
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
|
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
|
<PackageVersion Include="ModernWpfUI" Version="0.9.4" />
|
|
<!-- Moq to stay below v4.20 due to behavior change. need to be sure fixed -->
|
|
<PackageVersion Include="Moq" Version="4.18.4" />
|
|
<PackageVersion Include="MSTest" Version="$(MSTestVersion)" />
|
|
<PackageVersion Include="MSTest.TestFramework" Version="$(MSTestVersion)" />
|
|
<PackageVersion Include="NJsonSchema" Version="11.4.0" />
|
|
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
|
|
<PackageVersion Include="NLog" Version="5.2.8" />
|
|
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.8" />
|
|
<PackageVersion Include="NLog.Schema" Version="5.2.8" />
|
|
<PackageVersion Include="OpenAI" Version="2.7.0" />
|
|
<PackageVersion Include="Polly.Core" Version="8.6.5" />
|
|
<PackageVersion Include="ReverseMarkdown" Version="4.1.0" />
|
|
<PackageVersion Include="RtfPipe" Version="2.0.7677.4303" />
|
|
<PackageVersion Include="ScipBe.Common.Office.OneNote" Version="3.0.1" />
|
|
<PackageVersion Include="ScreenRecorderLib" Version="6.6.0" />
|
|
<PackageVersion Include="SharpCompress" Version="0.50.1" />
|
|
<PackageVersion Include="Shmuelie.WinRTServer" Version="2.1.1" />
|
|
<!-- Don't update SkiaSharp.Views.WinUI to version 3.* branch as this brakes the HexBox control in Registry Preview. -->
|
|
<PackageVersion Include="SkiaSharp.Views.WinUI" Version="2.88.9" />
|
|
<PackageVersion Include="StreamJsonRpc" Version="2.21.69" />
|
|
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
|
|
<!-- Package System.CodeDom added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Management but the 8.0.1 version wasn't published to nuget. -->
|
|
<PackageVersion Include="System.CodeDom" Version="10.0.10" />
|
|
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
|
|
<PackageVersion Include="System.ComponentModel.Composition" Version="10.0.10" />
|
|
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="10.0.10" />
|
|
<PackageVersion Include="System.Data.OleDb" Version="10.0.10" />
|
|
<!-- Package System.Diagnostics.EventLog added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Data.OleDb but the 8.0.1 version wasn't published to nuget. -->
|
|
<PackageVersion Include="System.Diagnostics.EventLog" Version="10.0.10" />
|
|
<!-- Package System.Diagnostics.PerformanceCounter added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.11. -->
|
|
<PackageVersion Include="System.Diagnostics.PerformanceCounter" Version="10.0.10" />
|
|
<PackageVersion Include="System.ClientModel" Version="1.8.1" />
|
|
<PackageVersion Include="System.Drawing.Common" Version="10.0.10" />
|
|
<PackageVersion Include="System.IO.Abstractions" Version="22.0.13" />
|
|
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="22.0.13" />
|
|
<PackageVersion Include="System.Management" Version="10.0.10" />
|
|
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
|
|
<PackageVersion Include="System.Numerics.Tensors" Version="10.0.2" />
|
|
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
|
|
<PackageVersion Include="System.Reactive" Version="6.0.1" />
|
|
<PackageVersion Include="System.Runtime.Caching" Version="10.0.10" />
|
|
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="10.0.10" />
|
|
<PackageVersion Include="System.Text.Encoding.CodePages" Version="10.0.10" />
|
|
<PackageVersion Include="System.Text.Json" Version="10.0.10" />
|
|
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
|
|
<PackageVersion Include="ToolGood.Words.Pinyin" Version="3.1.0.3" />
|
|
<PackageVersion Include="UnicodeInformation" Version="2.6.0" />
|
|
<PackageVersion Include="UnitsNet" Version="5.56.0" />
|
|
<PackageVersion Include="UTF.Unknown" Version="2.6.0" />
|
|
<PackageVersion Include="WinUIEx" Version="2.8.0" />
|
|
<PackageVersion Include="WmiLight" Version="6.14.0" />
|
|
<PackageVersion Include="WyHash" Version="1.0.5" />
|
|
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
|
|
<PackageVersion Include="WixToolset.Heat" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.Firewall.wixext" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.Util.wixext" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.UI.wixext" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.NetFx.wixext" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.Bal.wixext" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.BootstrapperApplicationApi" Version="5.0.2" />
|
|
<PackageVersion Include="WixToolset.WixStandardBootstrapperApplicationFunctionApi" Version="5.0.2" />
|
|
</ItemGroup>
|
|
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
|
|
<!-- Additional dependencies used by experimentation -->
|
|
<PackageVersion Include="Microsoft.VariantAssignment.Client" Version="2.4.17140001" />
|
|
<PackageVersion Include="Microsoft.VariantAssignment.Contract" Version="3.0.16990001" />
|
|
</ItemGroup>
|
|
</Project> |