diff --git a/go.mod b/go.mod index 2f424b6d8..64264a7f6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module esm.sh go 1.16 require ( - github.com/Masterminds/semver v1.5.0 + github.com/Masterminds/semver/v3 v3.1.1 github.com/aws/aws-sdk-go v1.42.53 github.com/dgraph-io/ristretto v0.1.0 github.com/evanw/esbuild v0.14.25 diff --git a/go.sum b/go.sum index df6edd478..68dff4ce6 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/aws/aws-sdk-go v1.42.53 h1:56T04NWcmc0ZVYFbUc6HdewDQ9iHQFlmS6hj96dRjJs= diff --git a/server/nodejs.go b/server/nodejs.go index 940eba2af..c3050f738 100644 --- a/server/nodejs.go +++ b/server/nodejs.go @@ -19,7 +19,7 @@ import ( "esm.sh/server/storage" - "github.com/Masterminds/semver" + "github.com/Masterminds/semver/v3" "github.com/ije/gox/utils" ) @@ -337,7 +337,7 @@ func fetchPackageInfo(name string, version string) (info NpmPackage, err error) var c *semver.Constraints c, err = semver.NewConstraint(version) if err != nil { - return + return fetchPackageInfo(name, "latest") } vs := make([]*semver.Version, len(h.Versions)) i := 0