Viscalyx.Common.psd1
@{ # Script module or binary module file associated with this manifest. RootModule = 'Viscalyx.Common.psm1' # Version number of this module. ModuleVersion = '0.7.0' # ID used to uniquely identify this module GUID = 'aba638ad-a584-4234-8eaa-48691b21be2f' # Author of this module Author = 'Viscalyx' # cSpell: ignore Viscalyx # Company or vendor of this module CompanyName = 'Viscalyx' # Copyright statement for this module Copyright = 'Copyright the Viscalyx.Common contributors. All rights reserved.' # Description of the functionality provided by this module Description = 'Common commands that adds or improves functionality in various scenarios.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.1' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = @('Assert-GitLocalChange','Assert-GitRemote','Assert-IPv4Address','Clear-AnsiSequence','ConvertTo-AnsiSequence','ConvertTo-AnsiString','ConvertTo-DifferenceString','ConvertTo-RelativePath','Disable-CursorShortcutCode','Get-ClassAst','Get-ClassResourceAst','Get-GitBranchCommit','Get-GitLocalBranchName','Get-GitRemote','Get-GitRemoteBranch','Get-GitTag','Get-LinkLayerAddress','Get-ModuleByVersion','Get-ModuleFileSha','Get-ModuleVersion','Get-NumericalSequence','Get-PSReadLineHistory','Get-TextOffset','Install-ModulePatch','Invoke-Git','Invoke-PesterJob','New-GitTag','New-SamplerGitHubReleaseTag','Out-Difference','Pop-VMLatestSnapshot','Push-GitTag','Receive-GitBranch','Remove-GitTag','Remove-History','Remove-PSHistory','Remove-PSReadLineHistory','Rename-GitLocalBranch','Rename-GitRemote','Request-GitTag','Resolve-DnsName','Resume-GitRebase','Send-WakeOnLan','Split-StringAtIndex','Start-GitRebase','Stop-GitRebase','Switch-GitLocalBranch','Test-FileHash','Test-GitLocalChanges','Test-GitRemote','Test-GitRemoteBranch','Test-IPv4Address','Update-GitLocalBranch','Update-RemoteTrackingBranch') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() # Variables to export from this module VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. AliasesToExport = @('Get-MacAddress','ipj','Send-WOL') # DSC resources to export from this module DscResourcesToExport = @() # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. Tags = @('Common', 'Utility', 'Pester', 'PSReadLine', 'Sampler') # A URL to the license for this module. LicenseUri = 'https://github.com/viscalyx/Viscalyx.Common/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/viscalyx/Viscalyx.Common' # A URL to an icon representing this module. IconUri = 'https://avatars.githubusercontent.com/u/53994072' # ReleaseNotes of this module ReleaseNotes = '## [0.7.0-preview0003] - 2025-09-30 ### Added - Viscalyx.Common - Added unit tests to run in Windows PowerShell. - Public commands: - `Assert-GitLocalChange` - `Assert-GitRemote` - `Disable-CursorShortcutCode` - `Get-GitBranchCommit` - `Get-GitLocalBranchName` - `Get-GitRemote` - `Get-GitRemoteBranch` - `Get-GitTag` - `Invoke-Git` - `New-GitTag` - `Push-GitTag` - `Receive-GitBranch` ([#5](https://github.com/viscalyx/Viscalyx.Common/issues/5)) - `Remove-GitTag` ([#16](https://github.com/viscalyx/Viscalyx.Common/issues/16)) - `Rename-GitLocalBranch` ([#10](https://github.com/viscalyx/Viscalyx.Common/issues/10)) - `Rename-GitRemote` ([#11](https://github.com/viscalyx/Viscalyx.Common/issues/11)) - `Request-GitTag` - `Resume-GitRebase` ([#14](https://github.com/viscalyx/Viscalyx.Common/issues/14)) - `Start-GitRebase` ([#13](https://github.com/viscalyx/Viscalyx.Common/issues/13)) - `Stop-GitRebase` ([#15](https://github.com/viscalyx/Viscalyx.Common/issues/15)) - `Switch-GitLocalBranch` - `Test-GitLocalChanges` - `Test-GitRemote` - `Test-GitRemoteBranch` - `Update-GitLocalBranch` - `Update-RemoteTrackingBranch` - Documentation: - `Testing-PowerShell-Modules.md` - Comprehensive beginner''s guide for testing PowerShell modules with `Invoke-PesterJob`, covering session isolation, code coverage, source line mapping, and best practices for different resource types including MOF-based and class-based DSC resources. ### Changed - `Invoke-PesterJob` - Updated documentation example to use `-TestNameFilter` parameter instead of the `-TestName` alias and removed reference to alias usage for consistency and clarity. - `New-SamplerGitHubReleaseTag` - Major architectural rewrite with the following key improvements: - `Receive-GitBranch` - Enhanced to allow pulling from a remote branch without requiring the `-Checkout` switch. The `BranchName` parameter is now available in both parameter sets, enabling scenarios like `Receive-GitBranch -RemoteName ''upstream'' -BranchName ''feature-branch''` to pull from a remote branch directly into the current branch ([#50](https://github.com/viscalyx/Viscalyx.Common/issues/50)). - Complete implementation refactor replacing ~200 lines of raw Git commands with dedicated PowerShell helper functions for improved reliability. - Enhanced error handling using proper try-catch blocks instead of manual `$LASTEXITCODE` checking, with automatic cleanup on failures. - Improved WhatIf support with intelligent handling that skips complex logic during WhatIf operations. - Renamed `SwitchBackToPreviousBranch` parameter to `ReturnToCurrentBranch` for better clarity. - Updated documentation sections. - `ConvertTo-RelativePath` - Simplified function logic to consistently normalize directory separators using `[System.IO.Path]::DirectorySeparatorChar` and removed complex cross-platform path handling. - `Receive-GitBranch` - Refactored to use multiple ShouldProcess blocks instead of a single combined block ([#50](https://github.com/viscalyx/Viscalyx.Common/issues/50)). - Each operation (checkout, fetch, rebase, pull) now has its own ShouldProcess block for better WhatIf support and granular confirmation prompts. - Removed Write-Verbose calls from inside ShouldProcess blocks to comply with coding guidelines. - Write-Verbose messages are now placed outside ShouldProcess blocks to provide detailed progress feedback during execution. ### Fixed - `Push-GitTag` now properly handles the no-op case when trying to push all tags but no local tags exist, treating it as a successful operation instead of throwing an error. ' # Prerelease string of this module Prerelease = 'preview0003' } # End of PSData hashtable } # End of PrivateData hashtable } |