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()