Giter Club home page Giter Club logo

poshsemanticversion's Introduction

Hi there ๐Ÿ‘‹

poshsemanticversion's People

Contributors

chiprunner1995 avatar mvromer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mvromer yarobear

poshsemanticversion's Issues

Add support for SemVer 1.0.0 spec

It may be useful to support previous versions of the SemVer specification.
For example, the PowerShell gallery has basic support for adding SemVer 1.0.0 style prerelease labels to published scripts and modules.

Output type should be immutable

Just as System.Version, and System.Management.Automation.SemanticVersion are immutable, so should this module's primary output type. This will also ease the transition to v5.0 classes and support for the v6.0 SemanticVersion type.

The current output objects are mutable, because they can be modified using the Increment() method. In order to work as an immutable object, Increment() should return a new object instead of changing the current object. Changing Increment() in this way would be considered a breaking change.

Make New-SemanticVersion work with incomplete input

New-SemanticVersion with error if -InputObject is not a complete version number. This is because it validates the input before generating the SemanticVersion object. From a usability perspective, the commands should try and work with incomplete version numbers.

Create ConvertTo-SemanticVersion

  • Convert from string to semver object.
  • The conversion should be done in the function or static class function, not built into the semver object.

Remove-Variable Exception in Ubuntu Environment

I tried import the module after installation on a Linux environment via an Azure build pipeline task and I received an exception with the following error 'Remove-Variable: Cannot find a variable with the name 'key'.

After narrowing it down I figured the error was coming from the last line in the module (.psm1) file.
Remove-Variable privateScriptFiles, publicScriptFiles, file, localizedMessages, key

It appears that since on line 106 of the same, the Import-LocalizedData command is invoked with an ErrorAction parameter value of 'SilentlyContinue',
Import-LocalizedData -BindingVariable localizedMessages -Filename messages -ErrorAction SilentlyContinue
If it turns out that there are no localized data present in the environment, then the 'key' variable used in the loop on line 108 is never created. As a result, when Remove-Variable is invoked, it fails to find the 'key' variable then throws an exception.
foreach ($key in $localizedMessages.Keys) { $messages[$key] = $localizedMessages[$key] }

Create core semver model object class

Use a .Net class so semver objects can be compared for precedence using IComparable interface. This will make it easier to compare objects using standard methods.

Create function ConvertFrom-SemanticVersion

  • Convert an object to a string, then to a .Net System Version. Convert from SemVer to System.Version.
  • The conversion should be done in the function or static class function, not built into the semver object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.