Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: remove unnecessary require for global Buffer #6146

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ unreleased
========================

* Remove `Object.setPrototypeOf` polyfill
* cleanup: remove unnecessary require for global Buffer

5.0.1 / 2024-10-08
==========
Expand Down
1 change: 0 additions & 1 deletion lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* @private
*/

var Buffer = require('node:buffer').Buffer
var contentDisposition = require('content-disposition');
var createError = require('http-errors')
var encodeUrl = require('encodeurl');
Expand Down
1 change: 0 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* @api private
*/

var Buffer = require('node:buffer').Buffer
var contentType = require('content-type');
var etag = require('etag');
var mime = require('mime-types')
Expand Down
1 change: 0 additions & 1 deletion test/express.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var assert = require('assert')
var asyncHooks = tryRequire('async_hooks')
var Buffer = require('node:buffer').Buffer
var express = require('..')
var request = require('supertest')

Expand Down
1 change: 0 additions & 1 deletion test/express.raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var assert = require('assert')
var asyncHooks = tryRequire('async_hooks')
var Buffer = require('node:buffer').Buffer
var express = require('..')
var request = require('supertest')

Expand Down
1 change: 0 additions & 1 deletion test/express.static.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

var assert = require('assert')
var Buffer = require('node:buffer').Buffer
var express = require('..')
var path = require('path')
var request = require('supertest')
Expand Down
1 change: 0 additions & 1 deletion test/express.text.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var assert = require('assert')
var asyncHooks = tryRequire('async_hooks')
var Buffer = require('node:buffer').Buffer
var express = require('..')
var request = require('supertest')

Expand Down
1 change: 0 additions & 1 deletion test/express.urlencoded.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var assert = require('assert')
var asyncHooks = tryRequire('async_hooks')
var Buffer = require('node:buffer').Buffer
var express = require('..')
var request = require('supertest')

Expand Down
1 change: 0 additions & 1 deletion test/res.attachment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

var Buffer = require('node:buffer').Buffer
var express = require('../')
, request = require('supertest');

Expand Down
1 change: 0 additions & 1 deletion test/res.download.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var after = require('after');
var assert = require('assert')
var asyncHooks = tryRequire('async_hooks')
var Buffer = require('node:buffer').Buffer
var express = require('..');
var path = require('path')
var request = require('supertest');
Expand Down
1 change: 0 additions & 1 deletion test/res.send.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

var assert = require('assert')
var Buffer = require('node:buffer').Buffer
var express = require('..');
var methods = require('methods');
var request = require('supertest');
Expand Down
1 change: 0 additions & 1 deletion test/res.sendFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
var after = require('after');
var assert = require('assert')
var asyncHooks = tryRequire('async_hooks')
var Buffer = require('node:buffer').Buffer
var express = require('../')
, request = require('supertest')
var onFinished = require('on-finished');
Expand Down
1 change: 0 additions & 1 deletion test/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

var assert = require('assert');
var Buffer = require('node:buffer').Buffer

/**
* Module exports.
Expand Down
1 change: 0 additions & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict'

var assert = require('assert');
var Buffer = require('node:buffer').Buffer
var utils = require('../lib/utils');

describe('utils.etag(body, encoding)', function(){
Expand Down
Loading