Skip to content

Commit

Permalink
chore(package) v3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jan 10, 2017
1 parent 2acd444 commit b950572
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 46 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2017.01.10, v3.3.0

fix:
- (readify) empty owner when uid = 0

feature:
- (readify) add accents support
- (package) nyc v10.0.0


2016.11.23, v3.2.2

feature:
Expand Down
62 changes: 23 additions & 39 deletions dist/readify.js
Original file line number Diff line number Diff line change
Expand Up @@ -23281,7 +23281,7 @@ module.exports = require('./lib/zames');
'use strict';

var promisify = require('es6-promisify');
var currify = require('currify');
var currify = require('currify/legacy');

module.exports = function (fn, ctx) {
check(fn);
Expand All @@ -23307,34 +23307,12 @@ function checkCount(count) {
}


},{"currify":129,"es6-promisify":18}],129:[function(require,module,exports){
'use strict';

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }

module.exports = currify;

var tail = function tail(list) {
return [].slice.call(list, 1);
};

function currify(fn) {
check(fn);

var args = tail(arguments);

if (args.length >= fn.length) return fn.apply(undefined, _toConsumableArray(args));else return function () {
return currify.apply(undefined, [fn].concat(_toConsumableArray(args), Array.prototype.slice.call(arguments)));
};
}

function check(fn) {
if (typeof fn !== 'function') throw Error('fn should be function!');
}
},{}],"readify.js":[function(require,module,exports){
},{"currify/legacy":12,"es6-promisify":18}],"readify.js":[function(require,module,exports){
(function (process){
'use strict';

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var format = require('format-io');
var exec = require('execon');
var squad = require('squad');
Expand Down Expand Up @@ -23366,9 +23344,9 @@ var nicki = !WIN && !BROWSER && require('nicki/legacy');

var readdir = promisify(fs.readdir, fs);

/* sorting on Win and node v0.8.0 */
// http://www.jstips.co/en/sorting-strings-with-accented-characters/
var sortFiles = sort(function (a, b) {
return a.name > b.name ? 1 : -1;
return a.name.localeCompare(b.name);
});

var good = function good(f) {
Expand Down Expand Up @@ -23432,6 +23410,7 @@ function emptyStat() {
mode: 0,
size: 0,
mtime: 0,
uid: 0,
isDirectory: function isDirectory() {}
};
}
Expand Down Expand Up @@ -23466,7 +23445,7 @@ function parseStat(type, stat) {

/* Переводим права доступа в 8-ричную систему */
var modeStr = Number(stat.mode).toString(8);
var owner = stat.uid || '';
var owner = stat.uid;
var mode = Number(modeStr) || '';
var mtime = !stat.mtime ? '' : shortdate(stat.mtime, {
order: 'little'
Expand Down Expand Up @@ -23498,24 +23477,18 @@ function fillJSON(path, stats, type, callback) {
if (type === 'raw') return callback(null, json);

changeUIDToName(json, function (error, files) {
json.files = files;
json.files = files || json.files;
callback(null, json);
});
}

function changeUIDToName(json, callback) {
if (!nicki) callback(null, json.files);else nicki(function (error, names) {
var files = void 0;

if (error) files = json.files.slice();else files = json.files.map(function (file) {
var owner = file.owner;
if (error) return callback(error);

if (names[owner]) file.owner = names[owner];
var files = replaceFromList(names, 'owner', json.files);

return file;
});

callback(error, files);
callback(null, files);
});
}

Expand All @@ -23538,6 +23511,17 @@ function changeOrder(json) {
return sorted;
}

function replaceFromList(obj, prop, array) {
return array.map(function (a) {
var n = a[prop];
var data = obj[n];

if (!data) return a;

return Object.assign(a, _defineProperty({}, prop, data));
});
}

}).call(this,require('_process'))
},{"_process":92,"currify/legacy":12,"es6-promisify":18,"execon":20,"filer":34,"format-io":47,"fs":7,"nicki/legacy":84,"shortdate":106,"squad":110,"zames/legacy":127}]},{},["readify.js"])("readify.js")
});
8 changes: 3 additions & 5 deletions dist/readify.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/readify.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "readify",
"version": "3.2.2",
"version": "3.3.0",
"author": "coderaiser <[email protected]> (https://github.com/coderaiser)",
"description": "Read directory content with file attributes: size, date, owner, mode",
"homepage": "http://github.com/coderaiser/readify",
Expand Down

0 comments on commit b950572

Please sign in to comment.