Skip to content

Restore Get-ScriptDirectory and Get-ScriptName from Legacy, bringing the supported module to 29 commands. - #14

Merged
PsCustomObject merged 1 commit into
masterfrom
modernization/script-context-helpers
Oct 5, 2026
Merged

PsCustomObject merged 1 commit into
masterfrom
modernization/script-context-helpers

Conversation

@PsCustomObject

Copy link
Copy Markdown
Owner

The helpers now resolve the immediately calling script instead of module-scoped invocation data. They support normal, nested and dot-sourced scripts, plus functions defined in scripts.

Add optional ScriptPath input with literal filesystem resolution and pipeline support. Explicit paths do not require an existing file. Interactive calls without a script path return no output.

Remove the hostinvocation dependency, update exports and migration documentation, and add 15 regression tests.

Validation: 342 tests passed on PowerShell 7.4.13/Linux; 5 Windows registry tests skipped. Syntax checks passed and the patch applies cleanly to master after PR #13.

@PsCustomObject
PsCustomObject marked this pull request as ready for review October 5, 2026 07:07
@PsCustomObject
PsCustomObject merged commit da013bc into master Oct 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant