Skip to content

Commit 09e93aa

Browse files
committed
chore: remove obsolete dependency
1 parent 07364bc commit 09e93aa

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

benchmark/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const Benchmark = require('benchmark')
66
const suite = new Benchmark.Suite()
77
const Parser = require('./../')
8-
const Buffer = require('safe-buffer').Buffer
8+
const Buffer = require('buffer').Buffer
99
const HiredisParser = require('../test/hiredis')
1010

1111
function returnError (error) {}
@@ -47,7 +47,7 @@ for (i = 0; i < bigArraySize; i++) {
4747
// A chunk has a maximum size of 2^16 bytes.
4848
size = 65000 + i
4949
if (i % 2) {
50-
// The "x" in the beginning is important to prevent benchmark manipulation due to a minor jsparser optimization
50+
// The "x" in the beginning is important to prevent benchmark manipulation due to a minor JSParser optimization
5151
bigArrayChunks.push(Buffer.from('x\r\n$' + size + '\r\n' + Array(size + 1).join('a') + '\r\n:' + (Math.random() * 1000000 | 0)))
5252
} else {
5353
bigArrayChunks.push(Buffer.from('\r\n+this is some short text about nothing\r\n:' + size + '\r\n$' + size + '\r\n' + Array(size).join('b')))

lib/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
const Buffer = require('safe-buffer').Buffer
3+
const Buffer = require('buffer').Buffer
44
const StringDecoder = require('string_decoder').StringDecoder
55
const decoder = new StringDecoder()
66
const errors = require('redis-errors')

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
"node": ">=6"
3131
},
3232
"dependencies": {
33-
"redis-errors": "^1.0.0",
34-
"safe-buffer": "^5.0.1"
33+
"redis-errors": "^1.0.0"
3534
},
3635
"devDependencies": {
3736
"benchmark": "^2.1.0",

test/parsers.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
const assert = require('assert')
77
const util = require('util')
8-
const Buffer = require('safe-buffer').Buffer
8+
const Buffer = require('buffer').Buffer
99
const JavascriptParser = require('../')
1010
const HiredisParser = require('./hiredis')
1111
const errors = require('redis-errors')

0 commit comments

Comments
 (0)