⚙️ [Maintenance]: Lock Pester test dependency to the 6.x major version#17
⚙️ [Maintenance]: Lock Pester test dependency to the 6.x major version#17Marius Storhaug (MariusStorhaug) wants to merge 4 commits into
Conversation
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
There was a problem hiding this comment.
Pull request overview
This PR reintroduces a #Requires -Modules directive in the test entrypoint to enforce a specific Pester dependency (version + GUID) for reproducible test execution.
Changes:
- Adds
#Requires -Modulestotests/PSCustomObject.Tests.ps1pinning Pester to5.8.0and a specific module GUID. - Shifts the test file header so the
#Requiresdirective is evaluated before any test code/attributes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Use ModuleVersion 6.0.0 with MaximumVersion 6.999.999 instead of a hard-locked 5.8.0, so tests accept any Pester 6.x while a future major must be adopted deliberately.
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
The GUID pins module identity (precise pinning), a stricter control than the lock-to-major risk appetite. Keep only the version range.
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
This module's Pester tests now lock to the 6.x major version, consistent with the rest of the ecosystem. This re-establishes the requirement (removed in #16) as a major-version lock rather than the earlier exact
5.8.0pin, now that Pester 6.0.0 is published.Changed: tests lock to the Pester 6.x major
#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.0.0'; MaximumVersion = '6.*' }Any Pester
6.xsatisfies it, so minor and patch updates no longer need a PR — only a new major does.Technical Details
#Requires -Modulesstatement totests/PSCustomObject.Tests.ps1.GUID) pinning is intentionally omitted — a separate, stricter supply-chain control, not part of the lock-to-major risk appetite.