Skip to content

Commit

Permalink
update: handle v16.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Aug 27, 2023
1 parent aa2ae8e commit a3873e4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bench/stream-readable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { skipIfVersion } = require('../utils')
skipIfVersion('<= 16.5.0')
const Benchmark = require('benchmark')
const suite = new Benchmark.Suite;
const { Readable } = require('node:stream')
Expand Down
2 changes: 2 additions & 0 deletions bench/stream-writable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { skipIfVersion } = require('../utils')
skipIfVersion('<= 16.5.0')
const Benchmark = require('benchmark')
const suite = new Benchmark.Suite;
const { Writable } = require('node:stream')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"fastify": "^4.4.0",
"on-net-listen": "^1.1.2",
"privsym": "^1.0.0",
"semver": "^7.3.7"
"semver": "^7.5.4"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
11 changes: 11 additions & 0 deletions utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const semver = require('semver')

function skipIfVersion(version) {
if (semver.satisfies(process.version, version)) {
process.exit(0)
}
}

module.exports = {
skipIfVersion,
}

0 comments on commit a3873e4

Please sign in to comment.