8000 Make New-ModuleManifest consistent with Update-ModuleManifest by pougetat · Pull Request #9104 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Make New-ModuleManifest consistent with Update-ModuleManifest#9104

Merged
anmenaga merged 7 commits intoPowerShell:masterfrom
pougetat:improve-newmodulemanifest
Mar 13, 2019
Merged

Make New-ModuleManifest consistent with Update-ModuleManifest#9104
anmenaga merged 7 commits intoPowerShell:masterfrom
pougetat:improve-newmodulemanifest

Conversation

@pougetat
Copy link

PR Summary

The purpose of this PR is to make New-ModuleManifest consistent with Update-ModuleManifest by adding Prerelease, RequireLicenseAcceptance, and ExternalModuleDependencies properties.

PR Context

#8585

PR Checklist

Copy link
Collaborator
@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests for new properties.

@pougetat
Copy link
Author

@iSazonov I have updated the tests :).

/// <summary>
/// Specify that the module is prerelease.
/// </summary>
[Parameter(Mandatory = false)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to set defaults.

Suggested change
[Parameter(Mandatory = false)]
[Parameter]

Below too.

/// Specify whether the module requires explicit user acceptance for install/update/save.
/// </summary>
[Parameter(Mandatory = false)]
public SwitchParameter RequireLicenseAcceptance { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect that default is true.
@SteveL-MSFT what do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In anticipation I set the default to true. :)

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Mar 13, 2019
BuildModuleManifest(result, "ProjectUri", Modules.ProjectUri, ProjectUri != null, () => QuoteName(ProjectUri), streamWriter);
BuildModuleManifest(result, "IconUri", Modules.IconUri, IconUri != null, () => QuoteName(IconUri), streamWriter);
BuildModuleManifest(result, "ReleaseNotes", Modules.ReleaseNotes, !string.IsNullOrEmpty(ReleaseNotes), () => QuoteName(ReleaseNotes), streamWriter);
BuildModuleManifest(result, "Prerelease", Modules.Prerelease, !string.IsNullOrEmpty( 8000 Prerelease), () => QuoteName(Prerelease), streamWriter);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could use nameof() in BuildModuleManifest() like nameof(Prerelease).
It is question only.
/cc @daxian-dbw

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be good :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pougetat Could you please make the change in all calls of BuildModuleManifest()?

Copy link
Author
@pougetat pougetat Mar 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. I do want to point out there are a few inconsistencies between variable names here and there. For example :

  • HelpInfoUri and Modules.HelpInfoURI
  • ClrVersion and Modules.CLRVersion

This could be fixed in another PR.

Copy link
Collaborator
@iSazonov iSazonov Mar 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to pull new PR or open new tracking issue.

@anmenaga anmenaga merged commit a79ed1e into PowerShell:master Mar 13, 2019
@iSazonov
Copy link
Collaborator
iSazonov commented Mar 14, 2019

@pougetat Please create new issue in PowerShell-Docs repo and reference in the PR description. (Current link points to source issue that is wrong)

Thanks for you contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0