Skip to content

Accept versions with a 'v' prefix #57

Open

Description

@kgbaird

A common convention I have seen across various projects is to prefix the semantic version string with a v (e.g. v1.2.3). I was wondering if there would be interest in supporting it here. I would believe the scope to be fairly limited (allow users to specify strings prefixed with v when instantiating and make the str of the Version class include a v prefix, if appropriate).

I respect this deviates from the semver standards and would understand if you declined the request. I was unsure how you were balancing strictly following the semver standards versus user convenience in this library.

The development team at my employer uses this library a ton and has adapted the current version to accept v prefixes. We would be willing to share our implementation if there was an appetite for supporting this customization, but are, of course, open to other implementations and suggestions.

Thank you again for all of your work on this project. We have found it very useful and use it almost everywhere.

Activity

  1. rbarrois commented on Jun 18, 2018

    @rbarrois
    Owner

    That sounds like an interesting feature indeed.

    The next step would be to suggest the way to include this feature in the current API, so that we can go ahead and implement / document / test it ;)

  2. smiller171 commented on Sep 16, 2020

    @smiller171

    I think Version.coerce() should check for a v at the beginning of the string and strip it

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status:DesignNeededThis issue is waiting for somewhat to suggest a new designTopic:APIImprovements to the library APIType:Enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions