This repository has been archived by the owner. It is now read-only.

default to ^ instead of ~ #4589

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@mikolalysenko
Contributor

mikolalysenko commented Feb 2, 2014

See:
#4587

@rlidwka

This comment has been minimized.

Show comment
Hide comment
@rlidwka

rlidwka Feb 2, 2014

Contributor

You can remove that semver.gte probably, since ^ semantics cover this.

Contributor

rlidwka commented Feb 2, 2014

You can remove that semver.gte probably, since ^ semantics cover this.

@grncdr

This comment has been minimized.

Show comment
Hide comment
@grncdr

grncdr Feb 2, 2014

Contributor

Given what the semver specification says about versions < 1.0.0 [0], I'd propose leaving it in and comparing against "1.0.0" instead of "0.1.0". So < 1.0.0 should default to a fixed version, but gte 1.0.0 should default to the "^" operator.

[0] From http://semver.org:

  1. Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
Contributor

grncdr commented Feb 2, 2014

Given what the semver specification says about versions < 1.0.0 [0], I'd propose leaving it in and comparing against "1.0.0" instead of "0.1.0". So < 1.0.0 should default to a fixed version, but gte 1.0.0 should default to the "^" operator.

[0] From http://semver.org:

  1. Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
@rlidwka

This comment has been minimized.

Show comment
Hide comment
@rlidwka

rlidwka Feb 3, 2014

Contributor

So < 1.0.0 should default to a fixed version

Isn't that what ^ already does?

Contributor

rlidwka commented Feb 3, 2014

So < 1.0.0 should default to a fixed version

Isn't that what ^ already does?

@grncdr

This comment has been minimized.

Show comment
Hide comment
@grncdr

grncdr Feb 3, 2014

Contributor

Just went and read the semver source, and you are right. The code that expands the caret operator checks whether the major version is zero and if it is, matches up to the next minor version instead of major. Good stuff 👍

Contributor

grncdr commented Feb 3, 2014

Just went and read the semver source, and you are right. The code that expands the caret operator checks whether the major version is zero and if it is, matches up to the next minor version instead of major. Good stuff 👍

@isaacs

This comment has been minimized.

Show comment
Hide comment
@isaacs

isaacs Feb 15, 2014

Member

Landed on 0a3151c.

Member

isaacs commented Feb 15, 2014

Landed on 0a3151c.

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