Skip to content

[DO NOT MERGE] Pester 6.0.0 release candidate update#1884

Open
nohwnd wants to merge 2 commits into
maester365:mainfrom
nohwnd:pester-6-rc
Open

[DO NOT MERGE] Pester 6.0.0 release candidate update#1884
nohwnd wants to merge 2 commits into
maester365:mainfrom
nohwnd:pester-6-rc

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 28, 2026

Copy link
Copy Markdown

Hi — Pester 6.0.0 is almost ready, and before I release it I'm trying it out
against real-world Pester v5 test suites.

This PR updates Pester to the 6.0.0 release candidate and makes the changes
needed for your tests to run on it. I opened it to learn two things:

  • whether migrating from v5 to v6 is straightforward, and
  • where v6 breaks or behaves differently, so I can fix those things before the
    final release instead of after.

You don't need to merge this, and I'd suggest you don't — it's only meant to
show what a v6 update would involve and to give me feedback. Please leave it
open, though: if more release candidates come out I'll push those updates here
too, and I'll close it myself afterwards.

This PR was co-authored by GitHub Copilot. If you'd rather not receive
AI-assisted PRs, just close it and I won't open one for the next release.

Thanks for the CI time this run used, and for maintaining a suite I could test
against.

— Jakub & Copilot

Summary by CodeRabbit

  • Bug Fixes

    • Improved PowerShell build and test stability by standardizing on Pester 6.0.0 across automation and scripts.
    • Reduced version-mismatch failures during validation, documentation generation, and test runs.
    • Updated prerelease installation behavior to ensure the required Pester version is available consistently.
  • Tests

    • Adjusted the PowerShell test runner to import Pester with an explicit required version (no longer relying on default module resolution).

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

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 23dfffbe-cf46-45ea-bb9f-1e03583a82b7

📥 Commits

Reviewing files that changed from the base of the PR and between 7374e56 and e742519.

📒 Files selected for processing (3)
  • .github/workflows/build-validation.yaml
  • .github/workflows/update-tag-documentation.yml
  • build/Update-CommandReference.ps1

📝 Walkthrough

Walkthrough

CI workflows and PowerShell build/test scripts now install Pester 6.0.0-rc4 with prerelease enabled and import Pester 6.0.0 explicitly, replacing previous unpinned or minimum-version behavior.

Changes

Pester 6.0.0 Version Pinning

Layer / File(s) Summary
Pester pinning across workflows and scripts
.github/workflows/build-validation.yaml, .github/workflows/update-tag-documentation.yml, build/Update-CommandReference.ps1, build/Test-PSModule.ps1, powershell/tests/pester.ps1
Install commands now target Pester 6.0.0-rc4 with -AllowPrerelease, and import commands now require Pester 6.0.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it misses the required template sections, issue reference, checklist, and additional information. Reformat the PR body to the repository template: add the Description section, Closes # line, checklist items, and Additional Information.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR's main change: a Pester 6.0.0 release candidate update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@SamErde SamErde marked this pull request as ready for review June 28, 2026 22:47
@SamErde SamErde requested a review from a team as a code owner June 28, 2026 22:47
Copilot AI review requested due to automatic review settings June 28, 2026 22:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s test and build tooling to run against the Pester 6.0.0 release candidate as a real-world compatibility check for an upcoming Pester release.

Changes:

  • Pin Pester imports to v6 (-RequiredVersion 6.0.0) in local/build test scripts.
  • Install Pester 6.0.0-rc1 explicitly in CI workflows (since prereleases aren’t selected via minimum-version selection).
  • Update command-reference generation to install/import Pester v6.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
powershell/tests/pester.ps1 Pins Pester import to v6 for the main test runner script.
build/Update-CommandReference.ps1 Installs prerelease Pester and pins the import for command reference generation.
build/Test-PSModule.ps1 Pins Pester import to v6 for module test execution.
.github/workflows/update-tag-documentation.yml Installs Pester 6.0.0-rc1 in the tag-doc generation workflow.
.github/workflows/build-validation.yaml Installs Pester 6.0.0-rc1 in the build-validation workflow matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build/Test-PSModule.ps1
&$PSScriptRoot\Restore-PSModuleDependencies.ps1 -ModuleManifestPath $ModuleManifestPath -PSModuleCacheDirectory $PSModuleCacheDirectoryInfo.FullName | Out-Null

Import-Module Pester -MinimumVersion 5.0.0
Import-Module Pester -RequiredVersion 6.0.0

Import-Module PSModuleDevelopment
Import-Module Pester
Import-Module Pester -RequiredVersion 6.0.0
Comment thread build/Update-CommandReference.ps1 Outdated
Comment on lines +7 to +11
if (-not (Get-Module Pester -ListAvailable | Where-Object { $_.Version -eq '6.0.0' })) { Install-Module Pester -RequiredVersion 6.0.0-rc1 -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck }

Import-Module Alt3.Docusaurus.Powershell
Import-Module PlatyPS
Import-Module Pester
Import-Module Pester -RequiredVersion 6.0.0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@build/Update-CommandReference.ps1`:
- Around line 7-11: The Pester version check and import in
Update-CommandReference.ps1 are not prerelease-aware, so a GA 6.0.0 install can
bypass the intended rc1 path. Update the Pester lookup and Import-Module usage
to explicitly require the prerelease package/version, and make the same
prerelease-specific change in the other Pester import sites so they cannot
resolve to the stable 6.0.0 release.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b7cfa21d-acac-4316-8498-afcebc454546

📥 Commits

Reviewing files that changed from the base of the PR and between 5e44c27 and 7374e56.

📒 Files selected for processing (5)
  • .github/workflows/build-validation.yaml
  • .github/workflows/update-tag-documentation.yml
  • build/Test-PSModule.ps1
  • build/Update-CommandReference.ps1
  • powershell/tests/pester.ps1

Comment thread build/Update-CommandReference.ps1 Outdated
Comment on lines +7 to +11
if (-not (Get-Module Pester -ListAvailable | Where-Object { $_.Version -eq '6.0.0' })) { Install-Module Pester -RequiredVersion 6.0.0-rc1 -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck }

Import-Module Alt3.Docusaurus.Powershell
Import-Module PlatyPS
Import-Module Pester
Import-Module Pester -RequiredVersion 6.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

set -euo pipefail
printf 'Repo root: '; pwd
echo '--- update command reference file with line numbers ---'
cat -n build/Update-CommandReference.ps1 | sed -n '1,120p'
echo '--- search for Pester import/version patterns ---'
rg -n "Import-Module Pester|Get-Module Pester|6\.0\.0-rc1|6\.0\.0" -S .

Repository: maester365/maester

Length of output: 13989


🌐 Web query:

PowerShellGet prerelease module version Get-Module Version PSData.Prerelease Import-Module RequiredVersion AllowPrerelease documentation

💡 Result:

To work with prerelease modules in PowerShell, you must use specific parameters when searching for, installing, or updating them [1][2][3]. When using PowerShellGet (versions 2.x and earlier), you must include the -AllowPrerelease switch in your commands [1][2][3]. Simply specifying a version string containing a prerelease label in -RequiredVersion is insufficient; the -AllowPrerelease parameter is required to authorize the operation [1][3]. For example, to install a specific prerelease version: Install-Module -Name -RequiredVersion - -AllowPrerelease [2][4] The -AllowPrerelease parameter applies to Find-Module, Install-Module, Update-Module, and Save-Module [1][3]. In newer versions of PowerShell (using Microsoft.PowerShell.PSResourceGet), the -Prerelease parameter is used instead [5][6]. Regarding module metadata, prerelease information is typically managed within the module manifest (.psd1 file) under the PrivateData.PSData section [7][8]. While the module object structure can store this data, it is often exposed via extended type system (ETS) properties in modern PowerShell versions to make the PreRelease label visible when running Get-Module [7][9]. Top results: [1][2][5][3][7]

Citations:


🏁 Script executed:

set -euo pipefail
command -v pwsh >/dev/null || { echo "pwsh not available"; exit 0; }

pwsh -NoLogo -NoProfile -Command '
$PSVersionTable.PSVersion.ToString()
"---"
Get-Command Get-Module, Import-Module | Format-Table -AutoSize Name,Version,Source
"---"
# Show how module versions/prerelease are represented if Pester is present
Get-Module Pester -ListAvailable |
  Select-Object Name, Version, ModuleBase, Path, @{n="Prerelease";e={ $_.PrivateData.PSData.Prerelease }} |
  Format-Table -AutoSize
'

Repository: maester365/maester

Length of output: 334


Make the Pester lookup prerelease-aware
Get-Module and Import-Module -RequiredVersion 6.0.0 both key off the base module version, so an installed GA 6.0.0 can satisfy this path and bypass 6.0.0-rc1. Pin the prerelease explicitly here and in the other Pester import sites.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build/Update-CommandReference.ps1` around lines 7 - 11, The Pester version
check and import in Update-CommandReference.ps1 are not prerelease-aware, so a
GA 6.0.0 install can bypass the intended rc1 path. Update the Pester lookup and
Import-Module usage to explicitly require the prerelease package/version, and
make the same prerelease-specific change in the other Pester import sites so
they cannot resolve to the stable 6.0.0 release.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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