Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@elastic/transport

Package Overview
Dependencies
Maintainers
64
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elastic/transport - npm Package Compare versions

Comparing version 8.4.1 to 8.5.0

3

lib/connection/BaseConnection.d.ts

@@ -7,3 +7,2 @@ /// <reference types="node" />

/// <reference types="node" />
/// <reference types="node" />
import { inspect } from 'util';

@@ -29,2 +28,3 @@ import * as http from 'http';

caFingerprint?: string;
maxEventListeners?: number;
}

@@ -70,2 +70,3 @@ export interface ConnectionRequestParams {

weight: number;
maxEventListeners: number;
[kStatus]: string;

@@ -72,0 +73,0 @@ [kCaFingerprint]: string | null;

@@ -30,3 +30,3 @@ "use strict";

constructor(opts) {
var _d, _e, _f, _g, _h, _j;
var _d, _e, _f, _g, _h, _j, _k;
Object.defineProperty(this, "url", {

@@ -86,2 +86,8 @@ enumerable: true,

});
Object.defineProperty(this, "maxEventListeners", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, _a, {

@@ -114,5 +120,6 @@ enumerable: true,

this._openRequests = 0;
this[symbols_1.kStatus] = (_g = opts.status) !== null && _g !== void 0 ? _g : BaseConnection.statuses.ALIVE;
this[symbols_1.kDiagnostic] = (_h = opts.diagnostic) !== null && _h !== void 0 ? _h : new Diagnostic_1.default();
this[symbols_1.kCaFingerprint] = (_j = opts.caFingerprint) !== null && _j !== void 0 ? _j : null;
this.maxEventListeners = (_g = opts.maxEventListeners) !== null && _g !== void 0 ? _g : 100;
this[symbols_1.kStatus] = (_h = opts.status) !== null && _h !== void 0 ? _h : BaseConnection.statuses.ALIVE;
this[symbols_1.kDiagnostic] = (_j = opts.diagnostic) !== null && _j !== void 0 ? _j : new Diagnostic_1.default();
this[symbols_1.kCaFingerprint] = (_k = opts.caFingerprint) !== null && _k !== void 0 ? _k : null;
if (!['http:', 'https:'].includes(this.url.protocol)) {

@@ -119,0 +126,0 @@ throw new errors_1.ConfigurationError(`Invalid protocol: '${this.url.protocol}'`);

@@ -61,2 +61,3 @@ "use strict";

this[symbols_1.kEmitter] = new events_1.EventEmitter();
this[symbols_1.kEmitter].setMaxListeners(this.maxEventListeners);
const undiciOptions = {

@@ -129,3 +130,2 @@ keepAliveTimeout: 600e3,

if (options.signal != null) {
// @ts-expect-error Event is a Node.js global
options.signal.dispatchEvent(new Event('abort'));

@@ -155,2 +155,3 @@ }

case 'UND_ERR_ABORTED':
case DOMException.ABORT_ERR:
throw (timedout ? new errors_1.TimeoutError('Request timed out') : new errors_1.RequestAbortedError('Request aborted'));

@@ -157,0 +158,0 @@ case 'UND_ERR_HEADERS_TIMEOUT':

@@ -27,12 +27,18 @@ "use strict";

}
if (typeof value === 'object' && !Array.isArray(value) && value !== null) {
if (seen.get(value) !== true) {
// if this Object hasn't been seen, recursively redact it
seen.set(value, true);
value = doRedact(value);
if (typeof value === 'object' && value !== null) {
if (Array.isArray(value)) {
// if it's an array, redact each item
value = value.map(v => doRedact(v));
}
else {
// if it has been seen, set the value that goes in newObj to null
// this is what prevents the circular references
value = null;
if (seen.get(value) !== true) {
// if this Object hasn't been seen, recursively redact it
seen.set(value, true);
value = doRedact(value);
}
else {
// if it has been seen, set the value that goes in newObj to null
// this is what prevents the circular references
value = null;
}
}

@@ -39,0 +45,0 @@ }

/// <reference types="node" />
/// <reference types="node" />
import * as http from 'http';

@@ -4,0 +3,0 @@ import { Connection } from './connection';

{
"name": "@elastic/transport",
"version": "8.4.1",
"version": "8.5.0",
"description": "Transport classes and utilities shared among Node.js Elastic client libraries",

@@ -37,3 +37,3 @@ "main": "index.js",

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -44,8 +44,6 @@ "devDependencies": {

"@types/ms": "^0.7.31",
"@types/node": "^17.0.31",
"@types/node": "^18.19.21",
"@types/sinonjs__fake-timers": "^8.1.2",
"@types/stoppable": "^1.1.1",
"@types/tap": "^15.0.7",
"@types/ungap__structured-clone": "^0.3.3",
"@ungap/structured-clone": "^1.2.0",
"into-stream": "^6.0.0",

@@ -69,3 +67,3 @@ "license-checker": "^25.0.1",

"tslib": "^2.4.0",
"undici": "^5.22.1"
"undici": "^6.7.0"
},

@@ -72,0 +70,0 @@ "tap": {

@@ -17,5 +17,5 @@ <img align="right" width="auto" height="auto" src="https://www.elastic.co/static-res/images/elastic-logo-200.png">

NOTE: The minimum supported version of Node.js is `v16`.
NOTE: The minimum supported version of Node.js is `v18`.
The client versioning follows the Elastc Stack versioning, this means that
The client versioning follows the Elastic Stack versioning, this means that
major, minor, and patch releases are done following a precise schedule that

@@ -35,8 +35,9 @@ often does not coincide with the [Node.js release](https://nodejs.org/en/about/releases/) times.

| Node.js Version | Node.js EOL date | End of support |
| --------------- |------------------| ---------------------- |
| `8.x` | `December 2019` | `7.11` (early 2021) |
| `10.x` | `April 2021` | `7.12` (mid 2021) |
| `12.x` | `April 2022` | `8.2` (early 2022) |
| `14.x` | `April 2023` | `8.8` (early 2023) |
| Node.js Version | Node.js EOL date | End of support |
| --------------- |------------------| -------------- |
| `8.x` | December 2019 | `7.11` (early 2021) |
| `10.x` | April 2021 | `7.12` (mid 2021) |
| `12.x` | April 2022 | `8.2` (early 2022) |
| `14.x` | April 2023 | `8.8` (early 2023) |
| `16.x` | October 2023 | `8.14` (early 2024) |

@@ -43,0 +44,0 @@ ## API

@@ -24,3 +24,4 @@ {

"lib": [
"esnext"
"esnext",
"dom"
]

@@ -27,0 +28,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc