A V2 of BurntToast #290
Unanswered
KrunchMuffin
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I’ve been working on a v2 fork of BurntToast with some breaking changes. I originally did it for my own use, but while going through the open issues here I found several that the fork now addresses.
Current fixes include #289, #288, #287, #282, and #272.
The fork is here
It is not published to the PowerShell Gallery. If this direction is useful, I’d be happy to open a PR or split out smaller PRs for the pieces that make sense upstream. No worries if the v2/breaking-change direction isn’t what you want for this repo; I just wanted to share it in case it helps.
v2.0.0 (unreleased)
Breaking Changes
Minimum PowerShell version is now 7.2 (current LTS, Core edition only). Windows PowerShell 5.1 is no longer supported. The manifest reflects this via PowerShellVersion = '7.2' and CompatiblePSEditions = @('Core').
Features and Improvements
Pipeline support for the mutating cmdlets:
Submit-BTNotification now accepts ToastContent from the pipeline. Idiom: $content | Submit-BTNotification and $a, $b | Submit-BTNotification.
Remove-BTNotification now accepts Tag, Group, and UniqueIdentifier by property name. Idiom: Get-BTHistory | Where-Object Status -eq 'Dismissed' | Remove-BTNotification.
Update-BTNotification now accepts UniqueIdentifier by property name.
All public cmdlets now declare [OutputType(...)] for tooling and discoverability.
Get-BTScriptBlockHash now hashes the raw ScriptBlock source text rather than a lossy whitespace/case-collapsed form. This eliminates a class of false-positive hash collisions where visually different blocks were treated as duplicates. Whitespace and casing differences now correctly produce distinct hashes.
New-BurntToastNotification now accepts -Duration Short|Long, allowing long toast display without requiring a looping alarm or call sound. Refs #282.
Bug Fixes
Module import now uses CIM (Win32_OperatingSystem.Version) for OS version detection, with [System.Environment]::OSVersion.Version as a fallback. This avoids false Windows 8 detection in compatibility-wrapped PowerShell hosts. Refs #287.
Submit-BTNotification now preserves static text fallback values recursively when -DataBinding is used, including text nested inside columns. This prevents unresolved placeholders from appearing for non-updated text elements. Refs #289.
Activated action event data now includes the submitted ToastNotification object in $Event.MessageData, restoring access to toast XML content for event handlers. Refs #288.
Removed stale New-BTAudio help that still claimed custom audio files were supported. Built-in Windows toast sounds remain supported. Refs #272.
Update-BTNotification had a duplicate [CmdletBinding()] decorator that was overriding the first one's SupportsShouldProcess and HelpUri. Removed.
Update-BTNotification would throw when called without -DataBinding because $DataDictionary was only initialised inside the conditional branch. Always initialised now.
Remove-BTNotification had a control-flow bug where passing only -UniqueIdentifier would remove the targeted toast and then fall through to the else branch, calling History.Clear() on every other notification. Reorganised the conditionals so each parameter set takes exactly one path.
Optimize-BTImageSource would throw an unhandled exception if a remote (HTTP/UNC) image fetch failed. Now warns and falls back to no-image, matching the behaviour for missing local files.
Casing inconsistency: three files used [cmdletBinding()] (lowercase 'c'). Standardised to [CmdletBinding()].
CI and Repository
Dropped the Windows PowerShell CI jobs (matrix is now PowerShell 7 x64 + x86). Resolves the TODO comment about hardcoded syswow64 paths.
Added .editorconfig to standardise indentation, line endings, and encoding across contributors.
Added CONTRIBUTING.md covering setup, tests, style, and PR conventions.
Beta Was this translation helpful? Give feedback.
All reactions