Adds wildcard support to -Variables & -Functions Parameters - #53
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
+ Coverage 97.96% 98.11% +0.14%
==========================================
Files 12 13 +1
Lines 590 583 -7
Branches 43 55 +12
==========================================
- Hits 578 572 -6
- Misses 7 8 +1
+ Partials 5 3 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What's Changed
Features & Enhancements
-Variablesand-Functions: Both parameters now accept string patterns with wildcards (e.g.,*,foo*,[ab]*) to dynamically import matching items from the caller's scope into the parallel scope.-Variables *imports all non-built-in variables, or-Variables foo*imports only variables starting withfoo.-Functions Get-*defines allGet-functions in the parallel scope.Note
When resolving variables via string patterns, variables whose values are of type
ScriptBlockare silently ignored. Explicitly passing script blocks via hashtable like-Variables @{ foo = { ... } }retains its existing behavior.-Variables: Updated parameter type fromHashtabletoIDictionary[], allowing multiple dictionaries to be passed as arguments. Duplicate keys are automatically ignored.Behavior & Breaking Changes
-Variablesnow throws a terminating error (ItemNotFoundException) if a specified variable name or wildcard pattern fails to match any variable in the caller's scope (aligning with the existing behavior of-Functions).Refactoring