Skip to content

Commit 984df51

Browse files
committed
Merge feature/approved-verbs: v8.0.1 release
Rename functions to use approved PowerShell verbs, eliminating the Import-Module warning. Fixes #17.
2 parents 307b5b4 + 91aa23d commit 984df51

9 files changed

+64
-58
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to LsiGitCheckout will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [8.0.1] - Unreleased
9+
10+
### Changed
11+
12+
- Renamed functions to use approved PowerShell verbs: `Parse-VersionPattern``ConvertTo-VersionPattern`, `Parse-RepositoryVersions``Get-RepositoryVersions`, `Validate-DependencyConfiguration``Test-DependencyConfiguration`, `Sort-TagsByDate``Resolve-TagsByDate`, `Process-DependencyFile``Invoke-DependencyFile`, `Process-RecursiveDependencies``Invoke-RecursiveDependencies`
13+
814
## [8.0.0] - 2026-03-21
915

1016
### Changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ There are 17 test cases across 16 test configs covering SemVer, Agnostic, API in
6666
## Coding Conventions
6767

6868
- **PowerShell 7.6 LTS** required (`#Requires -Version 7.6`)
69-
- **Function names**: PascalCase Verb-Noun (e.g., `Test-GitInstalled`, `Parse-VersionPattern`, `Get-SemVersionIntersection`)
69+
- **Function names**: PascalCase Verb-Noun using approved PowerShell verbs (e.g., `Test-GitInstalled`, `ConvertTo-VersionPattern`, `Get-SemVersionIntersection`)
7070
- **Documentation**: comment-based help blocks (`.SYNOPSIS`, `.DESCRIPTION`, `.PARAMETER`) on all functions
7171
- **Logging**: use `Write-Log` with levels: Info, Warning, Error, Debug, Verbose
7272
- **Error handling**: wrap operations in `Invoke-WithErrorContext -Context "description" -ScriptBlock { ... }`

LsiGitCheckout.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
.\LsiGitCheckout.ps1 -Verbose -DisablePostCheckoutScripts
4747
.\LsiGitCheckout.ps1 -EnableDebug -EnableErrorContext
4848
.NOTES
49-
Version: 8.0.0
49+
Version: 8.0.1
5050
Last Modified: 2026-03-20
5151
5252
Requires PowerShell 7.6 LTS or later (installs side-by-side with Windows PowerShell 5.1).
@@ -92,7 +92,7 @@ param(
9292

9393
# Import module from same directory as this script
9494
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
95-
Import-Module (Join-Path $scriptDir 'LsiGitCheckout.psm1') -Force -DisableNameChecking
95+
Import-Module (Join-Path $scriptDir 'LsiGitCheckout.psm1') -Force
9696

9797
# Initialize module state from script parameters
9898
Initialize-LsiGitCheckout `
@@ -109,7 +109,7 @@ Initialize-LsiGitCheckout `
109109
# Main execution
110110
$exitCode = 0
111111
try {
112-
Write-Log "LsiGitCheckout started - Version 8.0.0" -Level Info
112+
Write-Log "LsiGitCheckout started - Version 8.0.1" -Level Info
113113
Write-Log "Script path: $scriptDir" -Level Debug
114114
Write-Log "PowerShell version: $($PSVersionTable.PSVersion)" -Level Debug
115115
Write-Log "Operating System: $([System.Environment]::OSVersion.VersionString)" -Level Debug
@@ -191,15 +191,15 @@ try {
191191
Write-Log "Starting dependency processing at depth 0" -Level Info
192192

193193
$checkedOutRepos = Invoke-WithErrorContext -Context "Processing root dependency file" -ScriptBlock {
194-
Process-DependencyFile -DependencyFilePath $InputFile -Depth 0
194+
Invoke-DependencyFile -DependencyFilePath $InputFile -Depth 0
195195
}
196196

197197
# Handle null return
198198
if ($null -eq $checkedOutRepos) {
199-
Write-Log "WARNING: Process-DependencyFile returned null, initializing as empty array" -Level Warning
199+
Write-Log "WARNING: Invoke-DependencyFile returned null, initializing as empty array" -Level Warning
200200
$checkedOutRepos = @()
201201
} else {
202-
Write-Log "Process-DependencyFile returned type: $($checkedOutRepos.GetType().FullName)" -Level Debug
202+
Write-Log "Invoke-DependencyFile returned type: $($checkedOutRepos.GetType().FullName)" -Level Debug
203203
}
204204
if ($null -eq $checkedOutRepos) {
205205
Write-Log "WARNING: checkedOutRepos is null!" -Level Warning
@@ -229,7 +229,7 @@ try {
229229
Write-Log "Entering recursive processing with $($checkedOutRepos.Count) repositories" -Level Info
230230
$defaultDepFileName = Split-Path -Leaf $InputFile
231231
Invoke-WithErrorContext -Context "Processing recursive dependencies" -ScriptBlock {
232-
Process-RecursiveDependencies -CheckedOutRepos $checkedOutRepos -DefaultDependencyFileName $defaultDepFileName -CurrentDepth 0
232+
Invoke-RecursiveDependencies -CheckedOutRepos $checkedOutRepos -DefaultDependencyFileName $defaultDepFileName -CurrentDepth 0
233233
}
234234
} else {
235235
if ($DisableRecursion) {

LsiGitCheckout.psd1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@{
22
# Module manifest for LsiGitCheckout
33
RootModule = 'LsiGitCheckout.psm1'
4-
ModuleVersion = '8.0.0'
4+
ModuleVersion = '8.0.1'
55
GUID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
66
Author = 'LS Instruments AG'
77
CompanyName = 'LS Instruments AG'
@@ -14,14 +14,14 @@
1414
'Write-ErrorWithContext',
1515
'Invoke-WithErrorContext',
1616
'Write-Log',
17-
'Parse-VersionPattern',
17+
'ConvertTo-VersionPattern',
1818
'Test-SemVerCompatibility',
1919
'Get-CompatibleVersionsForPattern',
2020
'Select-VersionFromIntersection',
21-
'Parse-RepositoryVersions',
21+
'Get-RepositoryVersions',
2222
'Get-SemVersionIntersection',
2323
'Format-SemVersion',
24-
'Validate-DependencyConfiguration',
24+
'Test-DependencyConfiguration',
2525
'Show-ErrorDialog',
2626
'Show-ConfirmDialog',
2727
'Test-GitInstalled',
@@ -32,7 +32,7 @@
3232
'Get-SshKeyForUrl',
3333
'Set-GitSshKey',
3434
'Get-GitTagDates',
35-
'Sort-TagsByDate',
35+
'Resolve-TagsByDate',
3636
'Reset-GitRepository',
3737
'Get-AbsoluteBasePath',
3838
'Get-TagIntersection',
@@ -42,8 +42,8 @@
4242
'Update-RepositoryDictionary',
4343
'Update-SemVerRepository',
4444
'Invoke-GitCheckout',
45-
'Process-DependencyFile',
46-
'Process-RecursiveDependencies',
45+
'Invoke-DependencyFile',
46+
'Invoke-RecursiveDependencies',
4747
'Read-CredentialsFile',
4848
'Set-PostCheckoutScriptResult',
4949
'Export-CheckoutResults',

LsiGitCheckout.psm1

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# LsiGitCheckout Module
22
# Contains all function definitions for LsiGitCheckout tool
3-
# Version 8.0.0
3+
# Version 8.0.1
44

55
#Requires -Version 7.6
66

77
# Module-scoped state variables
8-
$script:Version = "8.0.0"
8+
$script:Version = "8.0.1"
99
$script:ScriptPath = ""
1010
$script:ErrorFile = ""
1111
$script:DebugLogFile = ""
@@ -226,7 +226,7 @@ function Write-Log {
226226
}
227227
}
228228

229-
function Parse-VersionPattern {
229+
function ConvertTo-VersionPattern {
230230
<#
231231
.SYNOPSIS
232232
Parses a version pattern and determines its type and constraints
@@ -410,7 +410,7 @@ function Select-VersionFromIntersection {
410410
return $selected
411411
}
412412

413-
function Parse-RepositoryVersions {
413+
function Get-RepositoryVersions {
414414
<#
415415
.SYNOPSIS
416416
Parses all repository tags using the specified regex pattern to extract SemVer versions
@@ -539,7 +539,7 @@ function Format-SemVersion {
539539
return "$($Version.Major).$($Version.Minor).$($Version.Build)"
540540
}
541541

542-
function Validate-DependencyConfiguration {
542+
function Test-DependencyConfiguration {
543543
<#
544544
.SYNOPSIS
545545
Validates that repository configuration hasn't changed in incompatible ways
@@ -981,7 +981,7 @@ function Get-GitTagDates {
981981
}
982982
}
983983

984-
function Sort-TagsByDate {
984+
function Resolve-TagsByDate {
985985
param(
986986
[array]$Tags,
987987
[hashtable]$TagDates,
@@ -1183,7 +1183,7 @@ function Get-TagUnion {
11831183
}
11841184

11851185
$allTags = @($unionSet.Keys)
1186-
$sortedUnion = Sort-TagsByDate -Tags $allTags -TagDates $TagDates -RepositoryUrl $RepositoryUrl -Context "union calculation"
1186+
$sortedUnion = Resolve-TagsByDate -Tags $allTags -TagDates $TagDates -RepositoryUrl $RepositoryUrl -Context "union calculation"
11871187

11881188
Write-Log "Temporal union result: $($sortedUnion -join ', ')" -Level Debug
11891189
return $sortedUnion
@@ -1436,7 +1436,7 @@ function Update-RepositoryDictionary {
14361436
# If repository exists, validate configuration hasn't changed
14371437
if ($script:RepositoryDictionary.ContainsKey($repoUrl)) {
14381438
Invoke-WithErrorContext -Context "Validating configuration for existing repository: $repoUrl" -ScriptBlock {
1439-
Validate-DependencyConfiguration -NewRepo $Repository -ExistingRepo $script:RepositoryDictionary[$repoUrl]
1439+
Test-DependencyConfiguration -NewRepo $Repository -ExistingRepo $script:RepositoryDictionary[$repoUrl]
14401440
}
14411441
}
14421442

@@ -1514,7 +1514,7 @@ function Update-RepositoryDictionary {
15141514
$union
15151515
} elseif ($apiCompatibleTags) {
15161516
# Use temporal sorting for API compatible tags
1517-
$sorted = Sort-TagsByDate -Tags $apiCompatibleTags -TagDates $tagDates -RepositoryUrl $repoUrl
1517+
$sorted = Resolve-TagsByDate -Tags $apiCompatibleTags -TagDates $tagDates -RepositoryUrl $repoUrl
15181518
$sorted
15191519
} else {
15201520
@($existingTag, $tag) | Select-Object -Unique
@@ -1599,7 +1599,7 @@ function Update-SemVerRepository {
15991599
}
16001600

16011601
try {
1602-
$parsedPattern = Parse-VersionPattern -VersionPattern $versionPattern
1602+
$parsedPattern = ConvertTo-VersionPattern -VersionPattern $versionPattern
16031603
Write-Log "Parsed version pattern '$versionPattern' as type: $($parsedPattern.Type)" -Level Debug
16041604
}
16051605
catch {
@@ -1987,7 +1987,7 @@ function Invoke-GitCheckout {
19871987
$repoDict = $script:RepositoryDictionary[$repoUrl]
19881988

19891989
# Parse all versions from tags
1990-
$parseResult = Parse-RepositoryVersions -RepoPath $absoluteBasePath `
1990+
$parseResult = Get-RepositoryVersions -RepoPath $absoluteBasePath `
19911991
-VersionRegex $repoDict.VersionRegex
19921992

19931993
$repoDict.ParsedVersions = $parseResult.ParsedVersions
@@ -2250,7 +2250,7 @@ function Invoke-GitCheckout {
22502250
}
22512251
}
22522252

2253-
function Process-DependencyFile {
2253+
function Invoke-DependencyFile {
22542254
param(
22552255
[string]$DependencyFilePath,
22562256
[int]$Depth,
@@ -2458,7 +2458,7 @@ function Process-DependencyFile {
24582458
$checkedOutRepos = @()
24592459
}
24602460

2461-
Write-Log "Process-DependencyFile returning $($checkedOutRepos.Count) repositories for recursive processing" -Level Debug
2461+
Write-Log "Invoke-DependencyFile returning $($checkedOutRepos.Count) repositories for recursive processing" -Level Debug
24622462
return ,$checkedOutRepos # The comma ensures we return an array
24632463
}
24642464
catch {
@@ -2467,7 +2467,7 @@ function Process-DependencyFile {
24672467
}
24682468
}
24692469

2470-
function Process-RecursiveDependencies {
2470+
function Invoke-RecursiveDependencies {
24712471
param(
24722472
[array]$CheckedOutRepos,
24732473
[string]$DefaultDependencyFileName,
@@ -2516,7 +2516,7 @@ function Process-RecursiveDependencies {
25162516
# Process nested dependencies using the DEFAULT dependency file name
25172517
# Custom dependency file settings are isolated to the current repository only
25182518
# Pass the repository root path for correct relative path resolution
2519-
$newRepos = Process-DependencyFile -DependencyFilePath $customDependencyFilePath -Depth $targetDepth -CallingRepositoryRootPath $repoPath
2519+
$newRepos = Invoke-DependencyFile -DependencyFilePath $customDependencyFilePath -Depth $targetDepth -CallingRepositoryRootPath $repoPath
25202520
$newlyCheckedOutRepos += $newRepos
25212521
} else {
25222522
Write-Log "No dependency file found at: $customDependencyFilePath" -Level Debug
@@ -2528,7 +2528,7 @@ function Process-RecursiveDependencies {
25282528
# Recursively process newly checked out repositories
25292529
# Use the default dependency file name for all recursive processing
25302530
if ($newlyCheckedOutRepos.Count -gt 0) {
2531-
Process-RecursiveDependencies -CheckedOutRepos $newlyCheckedOutRepos -DefaultDependencyFileName $DefaultDependencyFileName -CurrentDepth $targetDepth
2531+
Invoke-RecursiveDependencies -CheckedOutRepos $newlyCheckedOutRepos -DefaultDependencyFileName $DefaultDependencyFileName -CurrentDepth $targetDepth
25322532
} else {
25332533
Write-Log "Recursive processing complete - no more nested dependencies found" -Level Info
25342534
}
@@ -2810,14 +2810,14 @@ Export-ModuleMember -Function @(
28102810
'Write-ErrorWithContext',
28112811
'Invoke-WithErrorContext',
28122812
'Write-Log',
2813-
'Parse-VersionPattern',
2813+
'ConvertTo-VersionPattern',
28142814
'Test-SemVerCompatibility',
28152815
'Get-CompatibleVersionsForPattern',
28162816
'Select-VersionFromIntersection',
2817-
'Parse-RepositoryVersions',
2817+
'Get-RepositoryVersions',
28182818
'Get-SemVersionIntersection',
28192819
'Format-SemVersion',
2820-
'Validate-DependencyConfiguration',
2820+
'Test-DependencyConfiguration',
28212821
'Show-ErrorDialog',
28222822
'Show-ConfirmDialog',
28232823
'Test-GitInstalled',
@@ -2828,7 +2828,7 @@ Export-ModuleMember -Function @(
28282828
'Get-SshKeyForUrl',
28292829
'Set-GitSshKey',
28302830
'Get-GitTagDates',
2831-
'Sort-TagsByDate',
2831+
'Resolve-TagsByDate',
28322832
'Reset-GitRepository',
28332833
'Get-AbsoluteBasePath',
28342834
'Get-TagIntersection',
@@ -2838,8 +2838,8 @@ Export-ModuleMember -Function @(
28382838
'Update-RepositoryDictionary',
28392839
'Update-SemVerRepository',
28402840
'Invoke-GitCheckout',
2841-
'Process-DependencyFile',
2842-
'Process-RecursiveDependencies',
2841+
'Invoke-DependencyFile',
2842+
'Invoke-RecursiveDependencies',
28432843
'Read-CredentialsFile',
28442844
'Set-PostCheckoutScriptResult',
28452845
'Export-CheckoutResults',

docs/developer_guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Fast tests covering pure and near-pure functions. No network or git operations r
204204
pwsh -Command "Invoke-Pester ./tests/LsiGitCheckout.Unit.Tests.ps1 -Output Detailed"
205205
```
206206

207-
Covers: `Parse-VersionPattern`, `Test-SemVerCompatibility`, `Get-CompatibleVersionsForPattern`, `Select-VersionFromIntersection`, `Get-SemVersionIntersection`, `Format-SemVersion`, `Get-TagIntersection`, `Get-HostnameFromUrl`, `Validate-DependencyConfiguration`, `Get-AbsoluteBasePath`, `Export-CheckoutResults`.
207+
Covers: `ConvertTo-VersionPattern`, `Test-SemVerCompatibility`, `Get-CompatibleVersionsForPattern`, `Select-VersionFromIntersection`, `Get-SemVersionIntersection`, `Format-SemVersion`, `Get-TagIntersection`, `Get-HostnameFromUrl`, `Test-DependencyConfiguration`, `Get-AbsoluteBasePath`, `Export-CheckoutResults`.
208208

209209
### Integration Tests
210210

@@ -277,7 +277,7 @@ pwsh -File ./LsiGitCheckout.ps1 -InputFile tests/semver-basic/dependencies.json
277277

278278
```powershell
279279
pwsh
280-
Set-PSBreakpoint -Script ./LsiGitCheckout.psm1 -Command Process-DependencyFile
280+
Set-PSBreakpoint -Script ./LsiGitCheckout.psm1 -Command Invoke-DependencyFile
281281
./LsiGitCheckout.ps1 -InputFile tests/semver-basic/dependencies.json
282282
```
283283

@@ -309,7 +309,7 @@ See [testing_infrastructure.md](testing_infrastructure.md) for the full test arc
309309
See [CLAUDE.md](../CLAUDE.md) for the full coding conventions. Key points:
310310

311311
- **PowerShell 7.6 LTS** — use `??` null-coalescing, `-AsHashtable` for JSON, etc.
312-
- **Function names**: `Verb-Noun` PascalCase (e.g., `Test-GitInstalled`, `Parse-VersionPattern`)
312+
- **Function names**: `Verb-Noun` PascalCase using approved PowerShell verbs (e.g., `Test-GitInstalled`, `ConvertTo-VersionPattern`)
313313
- **Logging**: always use `Write-Log` with appropriate level, never raw `Write-Host`
314314
- **Error handling**: wrap operations in `Invoke-WithErrorContext -Context "description" -ScriptBlock { ... }`
315315
- **Module state**: use `$script:` prefix for shared variables, initialize via `Initialize-LsiGitCheckout`

tests/LsiGitCheckout.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Describe 'LsiGitCheckout Integration Tests' -Tag 'Integration' {
145145
$result.schemaVersion | Should -Be '1.0.0'
146146

147147
# Metadata
148-
$result.metadata.toolVersion | Should -Be '8.0.0'
148+
$result.metadata.toolVersion | Should -Be '8.0.1'
149149
$result.metadata.recursiveMode | Should -Be $true
150150
$result.metadata.apiCompatibility | Should -BeIn @('Strict', 'Permissive')
151151
$result.metadata.powershellVersion | Should -Not -BeNullOrEmpty

0 commit comments

Comments
 (0)