Skip to content

Commit

Permalink
Drop node v10 support (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
delvedor committed May 20, 2021
1 parent 9a021f8 commit 4ec3260
Show file tree
Hide file tree
Showing 33 changed files with 655 additions and 668 deletions.
2 changes: 1 addition & 1 deletion .ci/test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ STACK_VERSION:
- 7.x-SNAPSHOT

NODE_JS_VERSION:
- 16
- 14
- 12
- 10

TEST_SUITE:
- free
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

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

steps:
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand Down
11 changes: 0 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

'use strict'

const nodeMajor = Number(process.versions.node.split('.')[0])

const { EventEmitter } = require('events')
const { URL } = require('url')
const debug = require('debug')('elasticsearch')
Expand All @@ -47,15 +45,6 @@ const kEventEmitter = Symbol('elasticsearchjs-event-emitter')

const ESAPI = require('./api')

/* istanbul ignore next */
if (nodeMajor >= 10 && nodeMajor < 12) {
process.emitWarning('You are using a version of Node.js that will reach EOL in April 2021. ' +
'The support for this version will be dropped in 7.13. ' +
'Please refer to https://ela.st/nodejs-support for additional information.',
'DeprecationWarning'
)
}

class Client extends ESAPI {
constructor (opts = {}) {
super({ ConfigurationError })
Expand Down
4 changes: 2 additions & 2 deletions lib/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const hpagent = require('hpagent')
const http = require('http')
const https = require('https')
const debug = require('debug')('elasticsearch')
const pump = require('pump')
const { pipeline } = require('stream')
const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/
const {
ConnectionError,
Expand Down Expand Up @@ -133,7 +133,7 @@ class Connection {

// starts the request
if (isStream(params.body) === true) {
pump(params.body, request, err => {
pipeline(params.body, request, err => {
/* istanbul ignore if */
if (err != null && cleanedListeners === false) {
cleanListeners()
Expand Down
26 changes: 12 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,39 +48,38 @@
},
"devDependencies": {
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
"@types/node": "^14.14.28",
"convert-hrtime": "^3.0.0",
"@types/node": "^15.3.1",
"convert-hrtime": "^5.0.0",
"cross-zip": "^4.0.0",
"dedent": "^0.7.0",
"deepmerge": "^4.2.2",
"dezalgo": "^1.0.3",
"fast-deep-equal": "^3.1.3",
"into-stream": "^6.0.0",
"js-yaml": "^4.0.0",
"js-yaml": "^4.1.0",
"license-checker": "^25.0.1",
"minimist": "^1.2.5",
"node-fetch": "^2.6.1",
"ora": "^5.3.0",
"ora": "^5.4.0",
"pretty-hrtime": "^1.0.3",
"proxy": "^1.0.2",
"rimraf": "^3.0.2",
"semver": "^7.3.4",
"simple-git": "^2.35.0",
"simple-statistics": "^7.4.1",
"semver": "^7.3.5",
"simple-git": "^2.39.0",
"simple-statistics": "^7.7.0",
"split2": "^3.2.2",
"standard": "^16.0.3",
"stoppable": "^1.1.0",
"tap": "^14.11.0",
"tsd": "^0.14.0",
"tap": "^15.0.9",
"tsd": "^0.15.1",
"workq": "^3.0.0",
"xmlbuilder2": "^2.4.0"
"xmlbuilder2": "^2.4.1"
},
"dependencies": {
"debug": "^4.3.1",
"hpagent": "^0.1.1",
"ms": "^2.1.3",
"pump": "^3.0.0",
"secure-json-parse": "^2.3.1"
"secure-json-parse": "^2.4.0"
},
"license": "Apache-2.0",
"repository": {
Expand All @@ -91,13 +90,12 @@
"url": "https://github.com/elastic/elasticsearch-js/issues"
},
"engines": {
"node": ">=10"
"node": ">=12"
},
"tsd": {
"directory": "test/types"
},
"tap": {
"esm": false,
"ts": false,
"jsx": false,
"flow": false,
Expand Down
Loading

0 comments on commit 4ec3260

Please sign in to comment.