Correct <...> name-template description in 6.0.0 release notes#2812
Merged
Conversation
The breaking-change note claimed <...> tokens expand data templates only and not arbitrary PowerShell expressions. That is inaccurate: only the text outside <...> is kept literal (the actual #2044 fix), while the content inside <...> is still evaluated as a full PowerShell expression at run time and rendered through the formatter. Rewrite the bullet to describe what actually changed, including that this is broader than v5 and how to escape a literal <. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 6.0.0 release notes (
docs/6.0.0.md) described<...>test/block-name expansion as data-only:That is inaccurate. The change in #2740 made the text outside
<...>inert (the actual #2044 fix), but the content inside<...>is still evaluated as a full PowerShell expression at run time and rendered through the formatter — a superset of v5.Verified against a build of
main(PowerShell 7.5.5):adds up to <($a + $b)>adds up to 3<($a.ToString("000"))>007<a> `$($global:x = $true)`This rewrites the breaking-change bullet to describe what actually changed: only
<...>tokens are expanded (everything else kept literal, closing the parse-break / injection vector from #2044),<...>still evaluates expressions rendered via the formatter, this is broader than v5, and you escape a literal bracket with`<.The companion docs fix (the stale "Internals" mechanism description) is pester/docs#380.
Fix #2808