Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow pre-releases when the range uses them #184

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Aug 9, 2022

  1. Allow pre-releases when the range uses them

    Currently, when a range uses a pre-release, such as 1.0.0-alpha.1 -
    1.1.0, all pre-release versions are being rejected when the constraint
    is checked because the upper part of the range does not include a pre-release.
    For example, 1.0.0-alpha.2 should match that range, but it is rejected
    right now.
    
    I have updated how we evaluate constraints so that it checks whether a
    constraint part uses pre-releases OR the larger constraint range that it
    is part of uses a pre-release. When either part of a range uses a
    pre-release, the entire range should allow pre-release versions.
    
    Fixes Masterminds#177
    
    Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
    carolynvs committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    6b3ebcf View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. Limit prerelease detection to individual ranges

    Previously, I was detecting if any range in a larger constraint set contained a prerelease, and allowed prereleases for any constraint in the set. This incorrectly allowed prereleases on constraints that did not participate in a range that had prereleases.
    
    When rewriteRange is called, we lose key information about if a constraint was originally part of a range:
    
    1.0.0-alpha.1 - 1.0.0 becomes >=1.0.0-alpha.1, <=1.0.0
    
    I have updated rewriteRange so that it also returns any constraints that were originally part of a range that used a prerelease. Then when we are parsing constraints, allowPrerelease on that constraint is enabled if it was originally detected as participating in a range with prereleases. This ensures that only the individual ranges have allowPrerelease enabled.
    
    Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
    carolynvs committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    e74be44 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into fix-constraint-range-with-prerelease

    Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
    carolynvs committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    ba9fc58 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Merge branch 'master' into fix-constraint-range-with-prerelease

    Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
    carolynvs committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    127c65c View commit details
    Browse the repository at this point in the history
  2. Run goimports

    Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
    carolynvs committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    17277ec View commit details
    Browse the repository at this point in the history