PowerShell / PowerShell/PSResourceGet

Publish-Module Violates Single Responsibility Principle

Open
#1,393 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-nupkg Area-Publish feature_request
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Summary of the new feature / enhancement

As a user, I expect Publish-Module to publish a module, not package AND publish a module. As a user, I also expect that I can issue Package-Module to create a new module package that can then be published to one or more places, such as the PowerShellGallery and/or private package feeds.

Proposed technical implementation details (optional)

For example, the following workflows are what I desire:

PS C:\MyProject> Package-Module -Path ./out/MyModule

 ModuleName      Version    Path
 ----------      -------    -------------------------
 MyModule        1.0.0      C:\MyProject\artifacts\MyModule-1.0.0.nupkg

and then, combined with Publish-Module, perhaps something like:

PS C:\MyProject> Package-Module -Path ./out/MyModule -PassThru | Publish-Module ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing Publish-Module behavior and the package-generation flow in PSResourceGet. Compare the requested Package-Module and Publish-Module workflows, then define completion as packaging being usable independently and the resulting package being publishable to one or more repositories.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.