[Backport 7.x] Prereleases in meta header should be displayed as p (#1390)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2be23c0946
commit
5eab7e9c75
7
index.js
7
index.js
@ -33,7 +33,12 @@ const Serializer = require('./lib/Serializer')
|
||||
const errors = require('./lib/errors')
|
||||
const { ConfigurationError } = errors
|
||||
const { prepareHeaders } = Connection.internals
|
||||
const clientVersion = require('./package.json').version
|
||||
let clientVersion = require('./package.json').version
|
||||
/* istanbul ignore next */
|
||||
if (clientVersion.includes('-')) {
|
||||
// clean prerelease
|
||||
clientVersion = clientVersion.slice(0, clientVersion.indexOf('-')) + 'p'
|
||||
}
|
||||
const nodeVersion = process.versions.node
|
||||
|
||||
const kInitialOptions = Symbol('elasticsearchjs-initial-options')
|
||||
|
||||
Reference in New Issue
Block a user