Skip to content

Path B modernization: trim to 4 modules, bump to 2.0.0, modernize CI#116

Merged
MarkMichaelis merged 2 commits into
mainfrom
modernize/path-b
May 15, 2026
Merged

Path B modernization: trim to 4 modules, bump to 2.0.0, modernize CI#116
MarkMichaelis merged 2 commits into
mainfrom
modernize/path-b

Conversation

@MarkMichaelis
Copy link
Copy Markdown
Member

Executes Path B from PROJECT_OVERVIEW.md §7 — slim and modernize.

The legacy 1.x state is preserved before this lands:

Commits in this PR

  1. Delete superseded modules and scaffolding (7a45bd6)
  2. Modernize remaining modules, CI, and README (50c032c)

Modules removed

Removed Recommended replacement
AzureManagement Az
IntelliTect.PSDbxCli dbxcli directly
IntelliTect.PSDropbin Dropbox.Api SDK
IntelliTect.PSRestore Built-in Recycle Bin / Recycle module
IntelliTect.ResharperNugetSearch Find-Package
IntelliTect.MicrosoftWord Word COM / OpenXML SDK
IntelliTect.Google Google APIs PowerShell module
IntelliTect.ChatGpt PowerShellAI
DotNetCore dotnet CLI
Functions/, Functions.Tests/ (most are now obsolete: ISE, TFS, GeoTrack, etc.)
Main.ps1, Setup.ps1, Archived Modules/, submodules/, Lib/, Content/

Modules kept and modernized (all bumped to 2.0.0)

  • IntelliTect.Common — removed Get-IsWindowsPlatform, Set-IsWindowsVariable, Initialize-Array, ConvertTo-Lines (use built-in $IsWindows, @(...), -split). Rewrote Highlight to emit ANSI escapes via Write-Output for cross-platform terminals.
  • IntelliTect.File — rewrote Get-FileEncoding to use raw FileStream (PS 7 removed Get-Content -Encoding byte). Removed n-ary Join-Path wrapper now that built-in Join-Path is n-ary in PS 7.
  • IntelliTect.Git — fixed Push-GitBranch upstream detection + exit-code handling; switched New-GitIgnore template source from defunct gitignore.io to toptal.com/developers/gitignore; removed huge embedded fallback list.
  • IntelliTect.PSToolbox (umbrella) — RequiredModules shrunk to the maintained 4.

All keepers now declare PowerShellVersion = '7.2', CompatiblePSEditions = @('Core'), plus Tags, LicenseUri, ProjectUri, and ReleaseNotes.

CI

  • actions/checkout@v4
  • Pester 5 via New-PesterConfiguration
  • Cross-platform matrix: windows-latest + ubuntu-latest
  • New PSScriptAnalyzer job at Error+Warning severity
  • Publish-PSResource (PSResourceGet) replaces Publish-Module
  • PSScriptAnalyzerSettings.psd1 enables the default rules with only the necessary exclusions

Test results (local)

Invoke-Pester ./Modules.Tests on Windows PowerShell 7.4: 59 passed, 2 failed.

Both failures are pre-existing and unrelated to this PR:

  • Edit-File.Create a new temp file and open it to edit — timing-dependent process count.
  • Get-GitRepo.Returns a bare repo object where IsBare==true — fails because modern git defaults safe.bareRepository=explicit.

Breaking changes

This is a major version (2.0.0) release. Consumers who used the removed modules must switch to the replacements listed above. The full 1.x source remains available at the v1.0-legacy tag and legacy/v1 branch.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI added 2 commits May 15, 2026 09:20
Removed per PROJECT_OVERVIEW.md Path B:
- Modules: AzureManagement, IntelliTect.PSDbxCli, IntelliTect.PSDropbin,
  IntelliTect.PSRestore, IntelliTect.ResharperNugetSearch,
  IntelliTect.MicrosoftWord, IntelliTect.Google, IntelliTect.ChatGpt,
  DotNetCore (and their tests)
- Functions/, Functions.Tests/ (dot-sourced legacy scripts)
- Main.ps1, Main.Tests.ps1 (legacy entry point)
- Archived Modules/
- submodules/, .gitmodules (unused RamblingCookieMonster submodule)
- Lib/, Content/ (unused binaries and test fixture)
- Setup.ps1 (ISE bootstrapper; ISE deprecated)

Legacy state preserved at tag v1.0-legacy and branch legacy/v1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* IntelliTect.Common 2.0.0
  - Remove obsolete helpers superseded by PowerShell 7 built-ins:
    Get-IsWindowsPlatform, Set-IsWindowsVariable, Initialize-Array, ConvertTo-Lines.
  - Rewrite Highlight to emit ANSI escape sequences via Write-Output;
    works cross-platform on PS7 hosts that support VT.
  - Bump PowerShellVersion to 7.2; add CompatiblePSEditions, Tags,
    LicenseUri, ProjectUri, ReleaseNotes.

* IntelliTect.File 2.0.0
  - Rewrite Get-FileEncoding using raw FileStream so it works on PS7+
    (PS7 removed Get-Content -Encoding byte).
  - Remove n-ary Join-Path wrapper; PS7's built-in Join-Path accepts
    multiple child paths natively.
  - Add PSEdition/Version metadata and release notes.

* IntelliTect.Git 2.0.0
  - Fix Push-GitBranch: detect upstream via native git invocation,
    throw on non-zero git push exit codes, drop Write-Host noise.
  - Switch New-GitIgnore source from defunct gitignore.io to
    toptal.com/developers/gitignore; drop hard-coded fallback list;
    gracefully omit ProjectType dynamic param if list cannot be fetched.
  - Add PSEdition/Version metadata and release notes.

* IntelliTect.PSToolbox 2.0.0 (umbrella)
  - Shrink RequiredModules to maintained set: Common, File, Git,
    CredentialManager. Update description, release notes, metadata.

* CI
  - PullRequest.yml: actions/checkout@v4, Pester 5 via PesterConfiguration,
    cross-platform matrix (windows-latest + ubuntu-latest), upload test
    results, add PSScriptAnalyzer job.
  - Deploy.yml: actions/checkout@v4, use PSResourceGet's Publish-PSResource
    instead of Publish-Module, cleaner module-discovery logic.
  - PSScriptAnalyzerSettings.psd1: enable default rules at Error+Warning,
    excluding only the genuinely-needed exceptions.

* Publish.ps1: switch to Publish-PSResource, drop submodule check.
* README.md: rewrite to reflect the trimmed module set, document the
  retired modules and their modern replacements, link to v1.0-legacy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MarkMichaelis MarkMichaelis merged commit 65ce46a into main May 15, 2026
3 checks passed
@MarkMichaelis MarkMichaelis deleted the modernize/path-b branch May 15, 2026 21:45
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.

2 participants