Skip to content

Commit

Permalink
refactor: drop safe-buffer dependency in favor of native Buffer (#3438)
Browse files Browse the repository at this point in the history
This library is a polyfill for Buffer's static methods on ancient Node versions (new methods are available since [at least Node 4](https://nodejs.org/docs/latest-v4.x/api/buffer.html)). No reason to have this polyfill given that Karma support Node 10+.

When these methods are supported natively library exports native `Buffer` ([code](https://github.com/feross/safe-buffer/blob/master/index.js#L11)), so this removal should not affect anything.
  • Loading branch information
devoto13 committed Mar 16, 2020
1 parent cb1bcbf commit 131d154
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/middleware/common.js
Expand Up @@ -5,7 +5,6 @@

const mime = require('mime')
const parseRange = require('range-parser')
const Buffer = require('safe-buffer').Buffer
const log = require('../logger').create('web-server')

function createServeFile (fs, directory, config) {
Expand Down
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -411,7 +411,6 @@
"qjobs": "^1.1.4",
"range-parser": "^1.2.0",
"rimraf": "^2.6.0",
"safe-buffer": "^5.0.1",
"socket.io": "2.1.1",
"source-map": "^0.6.1",
"tmp": "0.0.33",
Expand Down

0 comments on commit 131d154

Please sign in to comment.