Skip to content

Commit fe6a73b

Browse files
committed
Drop node v10 support (#1471)
1 parent 6001e5a commit fe6a73b

33 files changed

+655
-668
lines changed

.ci/test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ STACK_VERSION:
33
- 7.13.0-SNAPSHOT
44

55
NODE_JS_VERSION:
6+
- 16
67
- 14
78
- 12
8-
- 10
99

1010
TEST_SUITE:
1111
- free

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [10.x, 12.x, 14.x, 15.x]
12+
node-version: [12.x, 14.x, 16.x]
1313
os: [ubuntu-latest, windows-latest, macOS-latest]
1414

1515
steps:
@@ -46,7 +46,7 @@ jobs:
4646

4747
strategy:
4848
matrix:
49-
node-version: [10.x, 12.x, 14.x]
49+
node-version: [12.x, 14.x, 16.x]
5050

5151
steps:
5252
- uses: actions/checkout@v2

index.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
'use strict'
2121

22-
const nodeMajor = Number(process.versions.node.split('.')[0])
23-
2422
const { EventEmitter } = require('events')
2523
const { URL } = require('url')
2624
const debug = require('debug')('elasticsearch')
@@ -47,15 +45,6 @@ const kEventEmitter = Symbol('elasticsearchjs-event-emitter')
4745

4846
const ESAPI = require('./api')
4947

50-
/* istanbul ignore next */
51-
if (nodeMajor >= 10 && nodeMajor < 12) {
52-
process.emitWarning('You are using a version of Node.js that will reach EOL in April 2021. ' +
53-
'The support for this version will be dropped in 7.13. ' +
54-
'Please refer to https://ela.st/nodejs-support for additional information.',
55-
'DeprecationWarning'
56-
)
57-
}
58-
5948
class Client extends ESAPI {
6049
constructor (opts = {}) {
6150
super({ ConfigurationError })

lib/Connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const hpagent = require('hpagent')
2525
const http = require('http')
2626
const https = require('https')
2727
const debug = require('debug')('elasticsearch')
28-
const pump = require('pump')
28+
const { pipeline } = require('stream')
2929
const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/
3030
const {
3131
ConnectionError,
@@ -133,7 +133,7 @@ class Connection {
133133

134134
// starts the request
135135
if (isStream(params.body) === true) {
136-
pump(params.body, request, err => {
136+
pipeline(params.body, request, err => {
137137
/* istanbul ignore if */
138138
if (err != null && cleanedListeners === false) {
139139
cleanListeners()

package.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,39 +48,38 @@
4848
},
4949
"devDependencies": {
5050
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
51-
"@types/node": "^14.14.28",
52-
"convert-hrtime": "^3.0.0",
51+
"@types/node": "^15.3.1",
52+
"convert-hrtime": "^5.0.0",
5353
"cross-zip": "^4.0.0",
5454
"dedent": "^0.7.0",
5555
"deepmerge": "^4.2.2",
5656
"dezalgo": "^1.0.3",
5757
"fast-deep-equal": "^3.1.3",
5858
"into-stream": "^6.0.0",
59-
"js-yaml": "^4.0.0",
59+
"js-yaml": "^4.1.0",
6060
"license-checker": "^25.0.1",
6161
"minimist": "^1.2.5",
6262
"node-fetch": "^2.6.1",
63-
"ora": "^5.3.0",
63+
"ora": "^5.4.0",
6464
"pretty-hrtime": "^1.0.3",
6565
"proxy": "^1.0.2",
6666
"rimraf": "^3.0.2",
67-
"semver": "^7.3.4",
68-
"simple-git": "^2.35.0",
69-
"simple-statistics": "^7.4.1",
67+
"semver": "^7.3.5",
68+
"simple-git": "^2.39.0",
69+
"simple-statistics": "^7.7.0",
7070
"split2": "^3.2.2",
7171
"standard": "^16.0.3",
7272
"stoppable": "^1.1.0",
73-
"tap": "^14.11.0",
74-
"tsd": "^0.14.0",
73+
"tap": "^15.0.9",
74+
"tsd": "^0.15.1",
7575
"workq": "^3.0.0",
76-
"xmlbuilder2": "^2.4.0"
76+
"xmlbuilder2": "^2.4.1"
7777
},
7878
"dependencies": {
7979
"debug": "^4.3.1",
8080
"hpagent": "^0.1.1",
8181
"ms": "^2.1.3",
82-
"pump": "^3.0.0",
83-
"secure-json-parse": "^2.3.1"
82+
"secure-json-parse": "^2.4.0"
8483
},
8584
"license": "Apache-2.0",
8685
"repository": {
@@ -91,13 +90,12 @@
9190
"url": "https://github.com/elastic/elasticsearch-js/issues"
9291
},
9392
"engines": {
94-
"node": ">=10"
93+
"node": ">=12"
9594
},
9695
"tsd": {
9796
"directory": "test/types"
9897
},
9998
"tap": {
100-
"esm": false,
10199
"ts": false,
102100
"jsx": false,
103101
"flow": false,

0 commit comments

Comments
 (0)