From 9ca79b76d46f9690b91d26f7997859b6fb45e0a3 Mon Sep 17 00:00:00 2001 From: Sunny Gleason Date: Thu, 29 Aug 2019 15:02:54 -0400 Subject: [PATCH] fix: use our existing momentjs dep instead of date-fns (for now) --- package.json | 2 -- src/v2/stores/networkOverview.js | 5 ++--- yarn.lock | 17 ----------------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index c583432b..11f254cd 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "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", @@ -55,7 +54,6 @@ "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", diff --git a/src/v2/stores/networkOverview.js b/src/v2/stores/networkOverview.js index a6ff3d3e..397dc612 100644 --- a/src/v2/stores/networkOverview.js +++ b/src/v2/stores/networkOverview.js @@ -7,8 +7,7 @@ import { observe, computed, } from 'mobx'; -import parseISO from 'date-fns/parseISO'; -import format from 'date-fns/format'; +import moment from 'moment'; import { map, keys, @@ -74,7 +73,7 @@ class OverviewStore { map(([date, value = 0]) => ({ y: Math.round((parseFloat(value) / 60) * 100) / 100, x: date, - date: format(parseISO(date), 'MMM d hh:mma'), + date: moment(date, 'YYYYMMDDTHH:mm', true).format('MMM D hh:mmA'), })), toPairs, pickBy(identity), diff --git a/yarn.lock b/yarn.lock index b383580a..9efd7de1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2919,13 +2919,6 @@ 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" - babel-plugin-dynamic-import-node@2.3.0, 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" @@ -5293,11 +5286,6 @@ 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" @@ -9956,11 +9944,6 @@ 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"