We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b933963 commit 11702f0Copy full SHA for 11702f0
classes/semver.js
@@ -111,11 +111,25 @@ class SemVer {
111
other = new SemVer(other, this.options)
112
}
113
114
- return (
115
- compareIdentifiers(this.major, other.major) ||
116
- compareIdentifiers(this.minor, other.minor) ||
117
- compareIdentifiers(this.patch, other.patch)
118
- )
+ if (this.major < other.major) {
+ return -1
+ }
+ if (this.major > other.major) {
+ return 1
119
120
+ if (this.minor < other.minor) {
121
122
123
+ if (this.minor > other.minor) {
124
125
126
+ if (this.patch < other.patch) {
127
128
129
+ if (this.patch > other.patch) {
130
131
132
+ return 0
133
134
135
comparePre (other) {
0 commit comments