main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
859 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | // Note: this is the semver.org version of the spec that it implements
|
---|
| 2 | // Not necessarily the package version of this code.
|
---|
| 3 | const SEMVER_SPEC_VERSION = '2.0.0'
|
---|
| 4 |
|
---|
| 5 | const MAX_LENGTH = 256
|
---|
| 6 | const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
---|
| 7 | /* istanbul ignore next */ 9007199254740991
|
---|
| 8 |
|
---|
| 9 | // Max safe segment length for coercion.
|
---|
| 10 | const MAX_SAFE_COMPONENT_LENGTH = 16
|
---|
| 11 |
|
---|
| 12 | // Max safe length for a build identifier. The max length minus 6 characters for
|
---|
| 13 | // the shortest version with a build 0.0.0+BUILD.
|
---|
| 14 | const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
|
---|
| 15 |
|
---|
| 16 | const RELEASE_TYPES = [
|
---|
| 17 | 'major',
|
---|
| 18 | 'premajor',
|
---|
| 19 | 'minor',
|
---|
| 20 | 'preminor',
|
---|
| 21 | 'patch',
|
---|
| 22 | 'prepatch',
|
---|
| 23 | 'prerelease',
|
---|
| 24 | ]
|
---|
| 25 |
|
---|
| 26 | module.exports = {
|
---|
| 27 | MAX_LENGTH,
|
---|
| 28 | MAX_SAFE_COMPONENT_LENGTH,
|
---|
| 29 | MAX_SAFE_BUILD_LENGTH,
|
---|
| 30 | MAX_SAFE_INTEGER,
|
---|
| 31 | RELEASE_TYPES,
|
---|
| 32 | SEMVER_SPEC_VERSION,
|
---|
| 33 | FLAG_INCLUDE_PRERELEASE: 0b001,
|
---|
| 34 | FLAG_LOOSE: 0b010,
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.