Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cb96e29
test: migrate Pester test suite from v4 to v5
HeyItsGilbert May 2, 2026
d2e5f74
chore: ✨ update .gitignore and build scripts
HeyItsGilbert May 2, 2026
cb45438
fix(requirements): 🔧 downgrade PowerShellBuild version to '0.6.1'
HeyItsGilbert May 2, 2026
bfcc022
chore(ci): ✨ update CI workflow for improved readability
HeyItsGilbert May 2, 2026
10d74a0
chore: ✨ update task definitions in `psakeFile.ps1`
HeyItsGilbert May 2, 2026
0a3235f
build: upgrade PowerShellBuild to 0.7.3 and skip doc generation
HeyItsGilbert May 2, 2026
5f48f22
test: move Set-StrictMode into BeforeAll/AfterAll in strict mode cont…
HeyItsGilbert May 3, 2026
25e336c
test: fix Pester 5 BeforeAll scoping in Help.tests.ps1
HeyItsGilbert May 3, 2026
ed3d67c
test: move Mock calls from It bodies into BeforeAll blocks
HeyItsGilbert May 3, 2026
0453cdc
test: move env var cleanup from It body into AfterEach
HeyItsGilbert May 3, 2026
40bbf20
test: add Acceptance tag and timeout to help link validation tests
HeyItsGilbert May 3, 2026
7acfadc
test: add -Skip:\$nonWindows to Chocolatey Describe block
HeyItsGilbert May 3, 2026
680b484
test: resurrect and fix Package Type install tests
HeyItsGilbert May 3, 2026
584c4d7
test: add Get-Dependency edge case and filtering tests
HeyItsGilbert May 3, 2026
a40c4dc
test: add unit tests for Get-PSDependType, Get-PSDependScript, Instal…
HeyItsGilbert May 3, 2026
e44a77d
fix: resolve Pester v5 migration test failures
HeyItsGilbert May 3, 2026
bb9051b
fix: resolve remaining Pester v5 migration failures
HeyItsGilbert May 3, 2026
652864c
test: fix Package, Npm, and Chocolatey mock failures in Pester v5
HeyItsGilbert May 3, 2026
e8c1c54
test: use script: scope qualifier on Package stub injection
HeyItsGilbert May 3, 2026
23445bb
Address Copilot suggestions + Docs
HeyItsGilbert May 3, 2026
638b553
fix(ci): 🐛 correct path for test results upload
HeyItsGilbert May 3, 2026
2fcfaa4
fix: 🐛 update URLs to correct organization
HeyItsGilbert May 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ permissions:
contents: read
on:
push:
branches: [master]
branches: [ master ]
paths:
- 'PSDepend/**'
- 'Tests/**'
- 'build.ps1'
- 'psakeFile.ps1'
- 'requirements.psd1'
- "PSDepend/**"
- "Tests/**"
- "build.ps1"
- "psakeFile.ps1"
- "requirements.psd1"
pull_request:
paths:
- 'PSDepend/**'
- 'Tests/**'
- 'build.ps1'
- 'psakeFile.ps1'
- 'requirements.psd1'
- "PSDepend/**"
- "Tests/**"
- "build.ps1"
- "psakeFile.ps1"
- "requirements.psd1"
workflow_dispatch:

jobs:
Expand All @@ -28,12 +28,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap and Test
- name: Bootstrap
shell: pwsh
run: ./build.ps1 -Bootstrap -Task Test
run: ./build.ps1 -Bootstrap -Task Init
Comment thread
HeyItsGilbert marked this conversation as resolved.
- name: Test
shell: pwsh
run: ./build.ps1 -Task Test
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
nuget.exe
nuget.exe
Output/**
Tests/Output/**
20 changes: 14 additions & 6 deletions PSDepend/Private/Get-ClonedObject.ps1
Comment thread
HeyItsGilbert marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Idea from http://stackoverflow.com/questions/7468707/deep-copy-a-dictionary-hashtable-in-powershell
# Idea from http://stackoverflow.com/questions/7468707/deep-copy-a-dictionary-hashtable-in-powershell
# borrowed from http://stackoverflow.com/questions/8982782/does-anyone-have-a-dependency-graph-and-topological-sorting-code-snippet-for-pow
function Get-ClonedObject {
param($DeepCopyObject)
$memStream = new-object IO.MemoryStream
$formatter = new-object Runtime.Serialization.Formatters.Binary.BinaryFormatter
$formatter.Serialize($memStream,$DeepCopyObject)
$memStream.Position=0
$formatter.Deserialize($memStream)
# BinaryFormatter was removed in .NET 7; use a recursive hashtable clone instead
$clone = @{}
foreach ($key in $DeepCopyObject.Keys) {
$val = $DeepCopyObject[$key]
if ($val -is [hashtable]) {
$clone[$key] = Get-ClonedObject $val
} elseif ($val -is [array]) {
$clone[$key] = $val.Clone()
} else {
$clone[$key] = $val
}
}
$clone
}
5 changes: 4 additions & 1 deletion PSDepend/Private/Test-PlatformSupport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

# test core/full
if('Core' -eq $PSVersionTable.PSEdition) {
if($Support -notcontains 'core') {
# On Windows with PS Core, 'windows' in Support is sufficient (backwards compat with types
# declared before PS Core on Windows was common)
$windowsCoreOk = $IsWindows -and ($Support -contains 'windows')
if(-not $windowsCoreOk -and $Support -notcontains 'core') {
Write-Verbose "Supported platforms [$Support] for type [$Type] does not contain [core]. Pull requests welcome!"
return $false
}
Expand Down
Loading
Loading