loggj 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -197,7 +197,8 @@ module.exports.compileFormat = compileFormat = function(text, _defaultDateFormat
|
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
const fs = require('fs').promises;
|
|
200
|
-
|
|
200
|
+
const util = require('util');
|
|
201
|
+
var glob = util.promisify(require('./re-glob'));
|
|
201
202
|
var path = require('path');
|
|
202
203
|
|
|
203
204
|
var stat = fs.stat;
|
|
@@ -220,9 +221,7 @@ function compareByTime(f1, f2) {
|
|
|
220
221
|
FileRemover.prototype.deleteOldFiles = function() {
|
|
221
222
|
var that = this;
|
|
222
223
|
|
|
223
|
-
return
|
|
224
|
-
glob(this.filesFormat, resolve);
|
|
225
|
-
}).then(function(matchedFiles) {
|
|
224
|
+
return glob(this.filesFormat).then(function(matchedFiles) {
|
|
226
225
|
return Promise.all(matchedFiles.map(function(file) {
|
|
227
226
|
if(that.timeCache[file])
|
|
228
227
|
return Promise.resolve([file, that.timeCache[file]]);
|