Release/1.3.0 — module refactor (SPSCleanDependencies.Common), src/ layout, CI bump#7
Merged
Conversation
…c/Private + manifest) Introduce src/Modules/SPSCleanDependencies.Common aligned on the SPSUpdate pattern: one function per file under Public/ (Get-SPSInstalledProductVersion, Get-SPSMissingServerDependencies and the six Remove-SPS* cleanups) and the internal SQL helpers under Private/ (Get-SQLMissing*). A loader .psm1 dot-sources Private + Public and exports only the public functions, and a clean .psd1 manifest (ModuleVersion 1.3.0, correct FunctionsToExport) replaces the mis-named, never-imported .util.util.psd1. The former module-level classes, ArrayLists and jsonObject are folded into Get-SPSMissingServerDependencies (their only consumer) so the module holds no mutable state, and the import-time prelude is dropped from the module (relocated to the entry script in a follow-up commit) making the module import-safe. Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…encies.Common Move SPSCleanDependencies.ps1 to src/ and import the SPSCleanDependencies.Common module through its manifest (.psd1) instead of the old flat .psm1. The script version is now sourced from the module manifest via (Get-Module SPSCleanDependencies.Common).Version, replacing the hard-coded '1.2.0' string. The import-time prelude (administrator check, High Performance power plan and SharePoint snap-in / SharePointServer module load) is relocated from the module into the entry script, running after the module import so it can call the public Get-SPSInstalledProductVersion. Module cleanup now targets the named module instead of Remove-Module *. The former scripts/ tree (flat util module and old entry script) is removed. Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Point the entry-script tests at src/SPSCleanDependencies.ps1 and assert it now imports SPSCleanDependencies.Common via its manifest and sources the version from (Get-Module SPSCleanDependencies.Common).Version. Rename the module test file to SPSCleanDependencies.Common.Tests.ps1 and adapt it to the new structure: import via the .psd1 manifest, resolve the internal Get-SQLMissing* helpers through InModuleScope (they are now Private and no longer exported), assert FunctionsToExport matches the exported set, and match the SPMissing* class definitions against Public/Get-SPSMissingServerDependencies.ps1. Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the CI workflows for the new src/ module layout and refresh the GitHub Actions that GitHub had deprecated (Node 20 runtime warnings): - pester.yml: trigger on src/** (plus PSScriptAnalyzerSettings.psd1), point PSScriptAnalyzer at ./src/SPSCleanDependencies.ps1 and the ./src/Modules/SPSCleanDependencies.Common module, add the checks/pull-requests permissions and make the publish step continue-on-error; actions/checkout@v4 -> v7, actions/upload-artifact@v4 -> v7. - release.yml: zip the *contents* of src/ (extracts straight to Modules/ and SPSCleanDependencies.ps1) and add contents: write permission; actions/checkout@v4 -> v7, softprops/action-gh-release@v2 -> v3. - wiki.yml: actions/checkout@v4 -> v7. Closes the separate 'CI: bump deprecated GitHub actions' backlog item for this repo. Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the 1.3.0 entry to CHANGELOG.md and rewrite RELEASE-NOTES.md for this release: the SPSCleanDependencies.Common module restructure (Public/Private + manifest), the src/ entry-script relocation with manifest-based versioning, the relocated prelude, the test updates and the CI layout/action-bump changes. Also correct wiki/Home.md to describe the WebParts and Orphaned Sites cleanups as implemented (they stopped being placeholders in 1.2.0). Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a _Sidebar.md navigation aligned with the sibling luigilink projects, plus new reference pages: - Release-Process.md: how to ship a version (manifest-driven ModuleVersion, v* tag, release workflow). - Dependency-Types.md: reference for the seven dependency categories the tool detects and cleans, their remediation and the results JSON shape. - Troubleshooting.md: common issues (SqlServer module, elevation, missing JSON, -WhatIf preview, audit-only MissingSiteDefinition, log locations). Cross-link the new pages from Home.md and Usage.md, and correct the Home key features list. Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pester Test Results74 tests 74 ✅ 1s ⏱️ Results for commit 1918a95. ♻️ This comment has been updated with latest results. |
Combine the two-argument (positional) Write-Output calls in Remove-SPSMissingFeature/Configuration/SetupFile into single interpolated strings, clearing the PSAvoidUsingPositionalParameters findings that failed the Code Quality job on Windows PowerShell (PSScriptAnalyzer reports these at Information severity, which the CI job treats as a failure). No behaviour change. Refs #6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6
Summary
Structural refactor of the toolkit into a clean, versioned module aligned on the
SPSUpdatepattern. No behaviour change on a real SharePoint farm. Target release: 1.3.0.What changed
Module (
src/Modules/SPSCleanDependencies.Common)Public/(Get-SPSInstalledProductVersion,Get-SPSMissingServerDependencies, the sixRemove-SPS*), internal SQL helpers underPrivate/(Get-SQLMissing*, no longer exported)..psm1dot-sources Private + Public and exports only the public functions..psd1manifest (ModuleVersion1.3.0, correctFunctionsToExport) replacing the mis-named, never-importedSPSCleanDependencies.util.util.psd1.jsonObjectfolded intoGet-SPSMissingServerDependencies→ no module-level mutable state.Entry script (
src/SPSCleanDependencies.ps1)(Get-Module SPSCleanDependencies.Common).Version(was hard-coded'1.2.0').Tests
SPSCleanDependencies.Common.Tests.ps1, adapted to the manifest import,InModuleScopefor the now-private SQL helpers, andFunctionsToExportassertion.src/and assert manifest-based import + version sourcing.CI
src/layout (paths, analyzer targets, release ZIP ofsrc/contents).checkout@v4→v7,upload-artifact@v4→v7,action-gh-release@v2→v3— closes the separate 'CI: bump deprecated actions' backlog item.Docs
_Sidebar.md,Release-Process.md,Dependency-Types.md,Troubleshooting.md; Home/Usage cross-links.Commits (atomic)
Out of scope (follow-up)