/ node_modules / semver / internal / constants.js
constants.js
 1  'use strict'
 2  
 3  // Note: this is the semver.org version of the spec that it implements
 4  // Not necessarily the package version of this code.
 5  const SEMVER_SPEC_VERSION = '2.0.0'
 6  
 7  const MAX_LENGTH = 256
 8  const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
 9  /* istanbul ignore next */ 9007199254740991
10  
11  // Max safe segment length for coercion.
12  const MAX_SAFE_COMPONENT_LENGTH = 16
13  
14  // Max safe length for a build identifier. The max length minus 6 characters for
15  // the shortest version with a build 0.0.0+BUILD.
16  const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
17  
18  const RELEASE_TYPES = [
19    'major',
20    'premajor',
21    'minor',
22    'preminor',
23    'patch',
24    'prepatch',
25    'prerelease',
26  ]
27  
28  module.exports = {
29    MAX_LENGTH,
30    MAX_SAFE_COMPONENT_LENGTH,
31    MAX_SAFE_BUILD_LENGTH,
32    MAX_SAFE_INTEGER,
33    RELEASE_TYPES,
34    SEMVER_SPEC_VERSION,
35    FLAG_INCLUDE_PRERELEASE: 0b001,
36    FLAG_LOOSE: 0b010,
37  }