From ebba4d3016ff761fb54a2d90b627c707425f0fef Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Thu, 26 Apr 2018 16:57:03 +0200 Subject: [PATCH] be latest standard --- headers.js | 2 +- pack.js | 2 +- package.json | 7 ++++--- test/extract.js | 2 +- test/pack.js | 2 +- test/slow.js | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/headers.js b/headers.js index cf978e1..6efbc4a 100644 --- a/headers.js +++ b/headers.js @@ -9,7 +9,7 @@ var MASK = parseInt('7777', 8) var clamp = function (index, len, defaultValue) { if (typeof index !== 'number') return defaultValue - index = ~~index // Coerce to integer. + index = ~~index // Coerce to integer. if (index >= len) return len if (index >= 0) return index index += len diff --git a/pack.js b/pack.js index 0bb57f6..72d96a0 100644 --- a/pack.js +++ b/pack.js @@ -1,4 +1,4 @@ -var constants = require('constants') +var constants = require('fs-constants') var eos = require('end-of-stream') var util = require('util') var alloc = require('buffer-alloc') diff --git a/package.json b/package.json index 83d3475..f593a30 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,15 @@ "bl": "^1.0.0", "buffer-alloc": "^1.1.0", "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", "readable-stream": "^2.0.0", "to-buffer": "^1.1.0", "xtend": "^4.0.0" }, "devDependencies": { - "concat-stream": "^1.4.6", - "standard": "^5.3.1", - "tape": "^3.0.3" + "concat-stream": "^1.6.2", + "standard": "^11.0.1", + "tape": "^4.9.0" }, "scripts": { "test": "standard && tape test/extract.js test/pack.js", diff --git a/test/extract.js b/test/extract.js index 0cf3123..09887b5 100644 --- a/test/extract.js +++ b/test/extract.js @@ -6,7 +6,7 @@ var fs = require('fs') var clamp = function (index, len, defaultValue) { if (typeof index !== 'number') return defaultValue - index = ~~index // Coerce to integer. + index = ~~index // Coerce to integer. if (index >= len) return len if (index >= 0) return index index += len diff --git a/test/pack.js b/test/pack.js index 946879e..fef5dc1 100644 --- a/test/pack.js +++ b/test/pack.js @@ -111,7 +111,7 @@ test('types', function (t) { gname: 'staff', uid: 501, gid: 20, - size: 9 // Should convert to zero + size: 9 // Should convert to zero }) pack.finalize() diff --git a/test/slow.js b/test/slow.js index c8a1bc0..44bec54 100644 --- a/test/slow.js +++ b/test/slow.js @@ -10,7 +10,7 @@ test('huge', function (t) { var extract = tar.extract() var noEntries = false - var hugeFileSize = 8804630528 // ~8.2GB + var hugeFileSize = 8804630528 // ~8.2GB var dataLength = 0 var countStream = new stream.Writable()