Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: long live date-fns
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-calavera authored and sunnygleason committed Aug 30, 2019
1 parent 7e6b156 commit 0df526c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ const {override, addBabelPlugin} = require('customize-cra');
module.exports = override(
// addBabelPlugin('lodash'),
addBabelPlugin('react-hot-loader/babel'),
addBabelPlugin('date-fns'),
);
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"command-exists": "^1.2.8",
"copy-to-clipboard": "^3.2.0",
"cors": "^2.8.5",
"date-fns": "^2.0.1",
"express": "^4.17.1",
"express-ws": "^4.0.0",
"geoip-lite": "^1.3.7",
Expand Down Expand Up @@ -54,6 +55,7 @@
"axios": "^0.19.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^10.0.3",
"babel-plugin-date-fns": "^0.2.1",
"babel-plugin-lodash": "^3.3.4",
"babel-preset-env": "^1.7.0",
"chart.js": "^2.8.0",
Expand Down
4 changes: 2 additions & 2 deletions src/v2/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const TDS_STAGES = [
{
id: 3,
title: 'Stage 3',
startDate: '2019-11-4T17:00:00.0Z',
endDate: '2019-11-8T17:00:00.0Z',
startDate: '2019-11-04T17:00:00.0Z',
endDate: '2019-11-08T17:00:00.0Z',
duration: TDS_DEFAULT_STAGE_LENGTH_BLOCKS,
},
];
5 changes: 3 additions & 2 deletions src/v2/stores/networkOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
observe,
computed,
} from 'mobx';
import moment from 'moment';
import parseISO from 'date-fns/parseISO';
import format from 'date-fns/format';
import {
map,
keys,
Expand Down Expand Up @@ -73,7 +74,7 @@ class OverviewStore {
map(([date, value = 0]) => ({
y: Math.round((parseFloat(value) / 60) * 100) / 100,
x: date,
date: moment(date, 'YYYYMMDDTHH:mm', true).format('MMM D hh:mmA'),
date: format(parseISO(date), 'MMM d hh:mma'),
})),
toPairs,
pickBy(identity),
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,13 @@ babel-plugin-check-es2015-constants@^6.22.0:
dependencies:
babel-runtime "^6.22.0"

babel-plugin-date-fns@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/babel-plugin-date-fns/-/babel-plugin-date-fns-0.2.1.tgz#17b6e4666a05411857ac04af4318ff5fb72895f2"
integrity sha512-XdcYohZbmetNsEHG32QV+uC17J3LKfE5O5/47N+Ee9zR1xdqXPRm/Am1VbGidva7dFpRzXmdk4TYofS9Qq+1Tw==
dependencies:
lodash.snakecase "^4.1.1"

[email protected], babel-plugin-dynamic-import-node@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f"
Expand Down Expand Up @@ -5286,6 +5293,11 @@ date-fns@^1.27.2:
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==

date-fns@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.0.1.tgz#c5f30e31d3294918e6b6a82753a4e719120e203d"
integrity sha512-C14oTzTZy8DH1Eq8N78owrCWvf3+cnJw88BTK/N3DYWVxDJuJzPaNdplzYxDYuuXXGvqBcO4Vy5SOrwAooXSWw==

date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
Expand Down Expand Up @@ -9944,6 +9956,11 @@ lodash.set@^4.3.2:
resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=

lodash.snakecase@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=

lodash.some@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
Expand Down

0 comments on commit 0df526c

Please sign in to comment.