mirror of
https://github.com/zoriya/flood.git
synced 2026-06-09 13:01:54 +00:00
Update dependencies (non-breaking)
This change uses the best-effort approach to update dependencies. Changelogs of each dependency have been manually reviewed and all dependency that doesn't *actually* have BREAKING changes or have minimal changes are bumped to their latest versions. In most cases, the maintainers of those dependencies don't actually understand semvar and inappropriately bumped major version for trivial, non-breaking changes. In other cases, the minimum supported Node version is upgraded, which is indeed breaking but that's not a concern for this project as a recent Node version is always expected. Or, the dependency does have certain breaking changes but those changes are not relevant to functions used by this project. Also bumped versions of dependencies if only minimal changes are required: * autoprefixer: transform from "browsers" property to browserslist * prettier: reformated sources after update Signed-off-by: Jesse Chan <jc@linux.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const moment = require('moment');
|
||||
|
||||
const formatUtil = {
|
||||
secondsToDuration: cumSeconds => {
|
||||
secondsToDuration: (cumSeconds) => {
|
||||
const years = Math.floor(cumSeconds / 31536000);
|
||||
const weeks = Math.floor((cumSeconds % 31536000) / 604800);
|
||||
const days = Math.floor(((cumSeconds % 31536000) % 604800) / 86400);
|
||||
@@ -27,9 +27,9 @@ const formatUtil = {
|
||||
return timeRemaining;
|
||||
},
|
||||
|
||||
minToHumanReadable: min => moment.duration(min * 60 * 1000).humanize(),
|
||||
minToHumanReadable: (min) => moment.duration(min * 60 * 1000).humanize(),
|
||||
|
||||
parsePeers: string => {
|
||||
parsePeers: (string) => {
|
||||
// This lovely delimiter is defined in clientResponseUtil.
|
||||
const markerPosition = string.indexOf('@!@');
|
||||
return string.substr(0, markerPosition);
|
||||
|
||||
@@ -47,7 +47,7 @@ const objectUtil = {
|
||||
}, []);
|
||||
|
||||
if (shouldCheckForRemovals) {
|
||||
prevObjectKeys.forEach(key => {
|
||||
prevObjectKeys.forEach((key) => {
|
||||
if (nextObject[key] == null) {
|
||||
diff.push({
|
||||
action: diffActionTypes.ITEM_REMOVED,
|
||||
@@ -60,7 +60,7 @@ const objectUtil = {
|
||||
return diff;
|
||||
},
|
||||
|
||||
reflect: object =>
|
||||
reflect: (object) =>
|
||||
Object.keys(object).reduce((memo, key) => {
|
||||
memo[key] = object[key];
|
||||
memo[object[key]] = key;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
capitalize: string => string.charAt(0).toUpperCase() + string.slice(1),
|
||||
capitalize: (string) => string.charAt(0).toUpperCase() + string.slice(1),
|
||||
|
||||
pluralize: (string, count) => {
|
||||
if (count !== 1) {
|
||||
@@ -12,5 +12,5 @@ module.exports = {
|
||||
return string;
|
||||
},
|
||||
|
||||
withoutTrailingSlash: input => input.replace(/\/{1,}$/, ''),
|
||||
withoutTrailingSlash: (input) => input.replace(/\/{1,}$/, ''),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user