Skip to content

Not equal expression with wildcards !=1.0.x checks failure #80

Open

Description

@ByteF1sh

hi, i want to exclude all the versions in 1.1.x and set a range like this "!=1.1.x",but all the versions are checked failure.
Here's the test code.

import (
	"github.com/blang/semver/v4"
	"testing"
)

func TestV(t *testing.T) {
	versionRange := "!=1.0.x"
	expectedRange, err := semver.ParseRange(versionRange)
	if err != nil { //wrong range exp
		t.Fail()
	}
	v, _ := semver.Parse("1.1.1")
	if !expectedRange(v) { // expectedRange(v) == false,want true but got false
		t.Fail()
	}
}

I noticed that this range will expand to <1.1.0 and >=1.2.0 ,and it should link with OR but not AND .
Is there any plan to fix it ?

Activity

  1. mamachanko commented on Aug 29, 2024

    @mamachanko

    This repository is unmaintained. I think your options are to fork+fix or use another module like masterminds/semver. Alternatively, you may get some response on the fork of blang/semver we maintain in carvel-dev/semver.

  2. ByteF1sh commented on Aug 29, 2024

    @ByteF1sh
    Author

    This repository is unmaintained. I think your options are to fork+fix or use another module like masterminds/semver. Alternatively, you may get some response on the fork of blang/semver we maintain in carvel-dev/semver.

    it works,thx a lot

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions