Skip to content

Commit df647b0

Browse files
committed
build: eslint-config-standard@10.2.1
1 parent aebc4cc commit df647b0

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cache:
1717
before_install:
1818
# Setup Node.js version-specific dependencies
1919
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
20-
- "test $(echo $TRAVIS_NODE_VERSION | cut -d'.' -f1) -ge 4 || npm rm --save-dev eslint eslint-config-standard eslint-plugin-markdown eslint-plugin-promise eslint-plugin-standard"
20+
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev $(grep -E '\"eslint\\S*\"' package.json | cut -d'\"' -f2)"
2121
# Update Node.js modules
2222
- "test ! -d node_modules || npm prune"
2323
- "test ! -d node_modules || npm rebuild"

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
"unpipe": "~1.0.0"
1616
},
1717
"devDependencies": {
18-
"eslint": "3.18.0",
19-
"eslint-config-standard": "7.1.0",
18+
"eslint": "3.19.0",
19+
"eslint-config-standard": "10.2.1",
20+
"eslint-plugin-import": "2.2.0",
2021
"eslint-plugin-markdown": "1.0.0-beta.4",
22+
"eslint-plugin-node": "4.2.2",
2123
"eslint-plugin-promise": "3.5.0",
22-
"eslint-plugin-standard": "2.1.1",
24+
"eslint-plugin-standard": "3.0.1",
2325
"istanbul": "0.4.5",
2426
"mocha": "2.5.3",
2527
"readable-stream": "2.1.2",
28+
"safe-buffer": "5.0.1",
2629
"supertest": "1.1.0"
2730
},
2831
"files": [

test/test.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
var Buffer = require('safe-buffer').Buffer
23
var finalhandler = require('..')
34
var http = require('http')
45
var utils = require('./support/utils')
@@ -270,10 +271,9 @@ describe('finalhandler(req, res)', function () {
270271
})
271272

272273
it('should not hang/error if there is a request body', function (done) {
273-
var buf = new Buffer(1024 * 16)
274+
var buf = Buffer.alloc(1024 * 16, '.')
274275
var server = createServer()
275276
var test = request(server).post('/foo')
276-
buf.fill('.')
277277
test.write(buf)
278278
test.write(buf)
279279
test.write(buf)
@@ -333,18 +333,17 @@ describe('finalhandler(req, res)', function () {
333333

334334
describe('when there is a request body', function () {
335335
it('should not hang/error when unread', function (done) {
336-
var buf = new Buffer(1024 * 16)
336+
var buf = Buffer.alloc(1024 * 16, '.')
337337
var server = createServer(new Error('boom!'))
338338
var test = request(server).post('/foo')
339-
buf.fill('.')
340339
test.write(buf)
341340
test.write(buf)
342341
test.write(buf)
343342
test.expect(500, done)
344343
})
345344

346345
it('should not hang/error when actively piped', function (done) {
347-
var buf = new Buffer(1024 * 16)
346+
var buf = Buffer.alloc(1024 * 16, '.')
348347
var server = createServer(function (req, res, next) {
349348
req.pipe(stream)
350349
process.nextTick(function () {
@@ -353,15 +352,14 @@ describe('finalhandler(req, res)', function () {
353352
})
354353
var stream = createSlowWriteStream()
355354
var test = request(server).post('/foo')
356-
buf.fill('.')
357355
test.write(buf)
358356
test.write(buf)
359357
test.write(buf)
360358
test.expect(500, done)
361359
})
362360

363361
it('should not hang/error when read', function (done) {
364-
var buf = new Buffer(1024 * 16)
362+
var buf = Buffer.alloc(1024 * 16, '.')
365363
var server = createServer(function (req, res, next) {
366364
// read off the request
367365
req.once('end', function () {
@@ -370,7 +368,6 @@ describe('finalhandler(req, res)', function () {
370368
req.resume()
371369
})
372370
var test = request(server).post('/foo')
373-
buf.fill('.')
374371
test.write(buf)
375372
test.write(buf)
376373
test.write(buf)

0 commit comments

Comments
 (0)