GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: incorrect results from diff sometimes with prerelease versions by tjenkinson · Pull Request #546 · npm/node-semver Conversation
|
|
Yeah I think the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Gonna kind of spam those test lines w/ comments sorry for the noise but this deserves a good paper trail |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['1.0.0', '1.0.0', null], | ||
| ['1.0.0-1', '1.0.0-1', null], | ||
| ['0.0.2-1', '0.0.2', 'patch'], | ||
| ['0.0.2-1', '0.0.3', 'patch'], |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The difference is actually two .inc patches, but that's still a patch difference. A good test
> semver.inc('0.0.2-1', 'patch')
'0.0.2'
> semver.inc('0.0.2', 'patch')
'0.0.3'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['1.0.0-1', '1.0.0-1', null], | ||
| ['0.0.2-1', '0.0.2', 'patch'], | ||
| ['0.0.2-1', '0.0.3', 'patch'], | ||
| ['0.0.2-1', '0.1.0', 'minor'], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
> semver.inc('0.0.2-1', 'minor')
'0.1.0'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['0.0.2-1', '0.0.2', 'patch'], | ||
| ['0.0.2-1', '0.0.3', 'patch'], | ||
| ['0.0.2-1', '0.1.0', 'minor'], | ||
| ['0.0.2-1', '1.0.0', 'major'], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
> semver.inc('0.0.2-1', 'major')
'1.0.0'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['1.1.0', '1.1.0-pre', 'minor'], | ||
| ['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'], | ||
| ['1.0.0', '1.0.0', null], | ||
| ['1.0.0-1', '1.0.0-1', null], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
> semver.eq('1.0.0-1', '1.0.0-1')
true
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['0.1.0-1', '0.1.0', 'minor'], | ||
| ['1.0.0-1', '1.0.0', 'major'], | ||
| ['0.0.0-1', '0.0.0', 'prerelease'], | ||
| ['1.0.1-1', '1.0.1', 'patch'], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
> semver.inc('1.0.1-1', 'patch')
'1.0.1'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['1.0.0-1', '1.0.0', 'major'], | ||
| ['0.0.0-1', '0.0.0', 'prerelease'], | ||
| ['1.0.1-1', '1.0.1', 'patch'], | ||
| ['0.0.0-1', '0.0.0', 'major'], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
> semver.inc('0.0.0-1', 'major')
'0.0.0'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ['0.0.0-1', '0.0.0', 'prerelease'], | ||
| ['1.0.1-1', '1.0.1', 'patch'], | ||
| ['0.0.0-1', '0.0.0', 'major'], | ||
| ['1.0.0-1', '2.0.0', 'major'], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Again this is two major .inc operations but that's still a major diff
> semver.inc('1.0.0-1', 'major')
'1.0.0'
> semver.inc('1.0.0', 'major')
'2.0.0'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
This still seems like premajor as per my comment on the test fixture: > semver.inc('1.0.0', 'premajor') '2.0.0-0' |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hmm yeh prerelease to prerelease on a different version is a bit confusing. Maybe prerelease to prerelease should also always be pre* ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is the definition of pre* meant to be ‘going to a prerelease version’? If that’s the case those 3 tests should be pre* |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.