🩹 [Patch]: Remove initialization step and dependency on Utilities#114
Merged
MariusStorhaug merged 11 commits intomainfrom Jun 1, 2025
Merged
🩹 [Patch]: Remove initialization step and dependency on Utilities#114MariusStorhaug merged 11 commits intomainfrom
Utilities#114MariusStorhaug merged 11 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the dependency on the Utilities module and the initialization step from the project, simplifying the code and workflows.
- Removed the "#Requires -Modules Utilities" line from scripts/main.ps1 to drop the Utilities dependency.
- Removed the "Initialize environment" step from multiple jobs in the Action-Test workflow.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/main.ps1 | Removed the dependency on the Utilities module. |
| .github/workflows/Action-Test.yml | Removed the initialization step from the GitHub Actions workflow. |
Comments suppressed due to low confidence (2)
scripts/main.ps1:7
- Ensure that all functionality previously provided by the Utilities module has been removed or replaced to prevent runtime issues.
#Requires -Modules Utilities
.github/workflows/Action-Test.yml:25
- Verify that the removal of the 'Initialize environment' step does not impact the workflow execution, and that any required setup is handled elsewhere.
- - name: Initialize environment
…Export and Get-PSModuleCmdletsToExport functions
…Base and Build-PSModuleRootModule functions
…ributes in Get-PSModuleAliasesToExport and Get-PSModuleClassesToExport functions
…leCmdletsToExport function
…adability in module export functions
…ng all scripts in helpers directory
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.
Description
This pull request simplifies the codebase by removing redundant module dependencies and improving code readability across various scripts. It also consolidates file exclusions in the
.jscpd.jsonconfiguration and updates logic for handling module manifest properties.Module Dependency Removal:
#Requiresstatements for unused module dependencies (GitHub,Utilities,Hashtable) across multiple scripts, includingBuild-PSModule.ps1,Build-PSModuleManifest.ps1, andBuild-PSModuleRootModule.ps1files. [1] [2] [3] [4]Configuration Updates:
.github/linters/.jscpd.jsonby replacing specific file paths with a wildcard (**/scripts/helpers/**).Workflow Simplification:
Initialize-PSModulestep from theAction-Test.ymlworkflow, streamlining the setup process. [1] [2] [3]Code Readability Improvements:
IsNotNullOrEmptyfunction calls with native.NETmethods like[string]::IsNullOrEmptyfor better clarity and maintainability in scripts such asBuild-PSModuleManifest.ps1andGet-PSModuleAliasesToExport.ps1. [1] [2] [3] [4]Suppression Attribute Adjustments:
Diagnostics.CodeAnalysis.SuppressMessageAttributeto includeScope = 'Function'for consistency in scripts likeGet-PSModuleClassesToExport.ps1andGet-PSModuleCmdletsToExport.ps1. [1] [2]Type of change
Checklist