Comparing version 2.3.0 to 2.4.0
@@ -79,2 +79,3 @@ const zlib = require('zlib') | ||
) { | ||
const hrtimeStart = process.hrtime() | ||
compressedFiles.push(filePath) | ||
@@ -88,6 +89,9 @@ const fileInfo = await this[compressFile]( | ||
if (fileInfo) { | ||
const [seconds, nanoseconds] = process.hrtime(hrtimeStart) | ||
this.logger.info( | ||
`File ${file} has been compressed ${ | ||
fileInfo.beforeSize | ||
}Kb -> ${fileInfo.afterSize}Kb.` | ||
`File ${file} has been compressed ${fileInfo.beforeSize.toFixed( | ||
4 | ||
)}Kb -> ${fileInfo.afterSize.toFixed(4)}Kb (${ | ||
seconds ? seconds + 's ' : '' | ||
}${nanoseconds / 1e6}ms)` | ||
) | ||
@@ -94,0 +98,0 @@ } |
{ | ||
"name": "gzipper", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "CLI for compressing files.", | ||
@@ -38,10 +38,10 @@ "main": "index.js", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^11.11.2", | ||
"@types/sinon": "^7.0.10", | ||
"eslint": "^5.15.1", | ||
"@types/node": "^11.13.4", | ||
"@types/sinon": "^7.0.11", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"mocha": "^6.0.2", | ||
"mocha": "^6.1.2", | ||
"prettier": "^1.16.4", | ||
"sinon": "^7.2.7" | ||
"sinon": "^7.3.1" | ||
}, | ||
@@ -52,4 +52,4 @@ "engines": { | ||
"dependencies": { | ||
"commander": "^2.19.0" | ||
"commander": "^2.20.0" | ||
} | ||
} |
@@ -18,3 +18,3 @@ const assert = require('assert') | ||
const VERBOSE_REGEXP = /File [^\s]+ has been compressed [^\s]+Kb -> [^\s]+Kb./ | ||
const VERBOSE_REGEXP = /File [^\s]+ has been compressed [^\s]+Kb -> [^\s]+Kb/ | ||
const MESSAGE_REGEXP = /[^\s]+ files have been compressed./ | ||
@@ -21,0 +21,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67656
872
Updatedcommander@^2.20.0