@elastic/transport
Advanced tools
Comparing version 8.3.1 to 8.3.2
@@ -299,2 +299,4 @@ "use strict"; | ||
const url = this.url; | ||
let search = url.search; | ||
let pathname = url.pathname; | ||
const request = { | ||
@@ -305,8 +307,3 @@ protocol: url.protocol, | ||
: url.hostname, | ||
hash: url.hash, | ||
search: url.search, | ||
pathname: url.pathname, | ||
path: '', | ||
href: url.href, | ||
origin: url.origin, | ||
// https://github.com/elastic/elasticsearch-js/issues/843 | ||
@@ -322,10 +319,10 @@ port: url.port !== '' ? url.port : undefined, | ||
if (key === 'path') { | ||
request.pathname = resolve(request.pathname, params[key]); | ||
pathname = resolve(pathname, params[key]); | ||
} | ||
else if (key === 'querystring' && Boolean(params[key])) { | ||
if (request.search === '') { | ||
request.search = `?${params[key]}`; | ||
if (search === '') { | ||
search = `?${params[key]}`; | ||
} | ||
else { | ||
request.search += `&${params[key]}`; | ||
search += `&${params[key]}`; | ||
} | ||
@@ -341,3 +338,3 @@ } | ||
} | ||
request.path = request.pathname + request.search; | ||
request.path = pathname + search; | ||
return request; | ||
@@ -344,0 +341,0 @@ } |
@@ -168,2 +168,3 @@ "use strict"; | ||
} | ||
// @ts-expect-error Assume header is not string[] for now. | ||
const contentEncoding = ((_o = response.headers['content-encoding']) !== null && _o !== void 0 ? _o : '').toLowerCase(); | ||
@@ -170,0 +171,0 @@ const isCompressed = contentEncoding.includes('gzip') || contentEncoding.includes('deflate'); // eslint-disable-line |
{ | ||
"name": "@elastic/transport", | ||
"version": "8.3.1", | ||
"version": "8.3.2", | ||
"description": "Transport classes and utilities shared among Node.js Elastic client libraries", | ||
@@ -65,3 +65,3 @@ "main": "index.js", | ||
"tslib": "^2.4.0", | ||
"undici": "^5.5.1" | ||
"undici": "^5.22.1" | ||
}, | ||
@@ -68,0 +68,0 @@ "tap": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232872
3620
3
Updatedundici@^5.22.1