Skip to content

Commit

Permalink
Update date-fns to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
djizco committed Aug 23, 2019
1 parent 8a93ecd commit 3388203
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions client/components/molecules/Todo/Todo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { useDispatch } from 'react-redux';
import { distanceInWordsToNow } from 'date-fns';
import { parseISO, formatDistanceToNow } from 'date-fns';

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTrashAlt, faBan, faPencilAlt, faSave } from '@fortawesome/free-solid-svg-icons';
Expand All @@ -10,7 +10,7 @@ import { faSquare, faCheckSquare } from '@fortawesome/free-regular-svg-icons';
import { attemptToggleCompleteTodo, attemptUpdateTodo, attemptDeleteTodo } from '_thunks/todos';
import ConfirmModal from '_organisms/ConfirmModal';

const fromNow = date => distanceInWordsToNow(date, { addSuffix: true });
const fromNow = date => formatDistanceToNow(parseISO(date), { addSuffix: true });

export default function Todo({ id, text, completed, createdAt, updatedAt }) {
const dispatch = useDispatch();
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mern-boilerplate",
"version": "0.5.0",
"version": "0.5.1",
"description": "A full MERN stack boilerplate",
"main": "server/index.js",
"scripts": {
Expand Down Expand Up @@ -49,26 +49,26 @@
"node": ">=10.0.0"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.21",
"@fortawesome/free-brands-svg-icons": "^5.10.1",
"@fortawesome/free-regular-svg-icons": "^5.10.1",
"@fortawesome/free-solid-svg-icons": "^5.10.1",
"@fortawesome/fontawesome-svg-core": "^1.2.22",
"@fortawesome/free-brands-svg-icons": "^5.10.2",
"@fortawesome/free-regular-svg-icons": "^5.10.2",
"@fortawesome/free-solid-svg-icons": "^5.10.2",
"@fortawesome/react-fontawesome": "^0.1.4",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"clean-webpack-plugin": "^3.0.0",
"connect-mongo": "^3.0.0",
"connected-react-router": "^6.5.2",
"core-js": "^3.2.1",
"date-fns": "^1.30.1",
"date-fns": "^2.0.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"express": "^4.17.1",
"express-session": "^1.16.2",
"history": "^4.9.0",
"immutability-helper": "^3.0.1",
"json-style-converter": "^1.0.3",
"mongoose": "^5.6.9",
"mongoose": "^5.6.10",
"mongoose-auto-increment-reworked": "^1.2.1",
"mongoose-immutable": "0.0.2",
"passport": "^0.4.0",
Expand All @@ -87,7 +87,7 @@
"redux-thunk": "^2.3.0",
"regenerator-runtime": "^0.13.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"uuid": "^3.3.2",
"uuid": "^3.3.3",
"webpack": "^4.39.2",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-cli": "^3.3.7"
Expand All @@ -103,26 +103,26 @@
"bulma": "0.7.5",
"classnames": "^2.2.6",
"css-loader": "^3.2.0",
"eslint": "^6.1.0",
"eslint": "^6.2.1",
"eslint-config-airbnb": "^18.0.1",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.7.0",
"eslint-plugin-react-hooks": "^2.0.1",
"favicons-webpack-plugin": "1.0.1",
"file-loader": "^4.2.0",
"html-webpack-plugin": "^3.2.0",
"image-webpack-loader": "^5.0.0",
"jest": "^24.9.0",
"jest-environment-jsdom": "^24.9.0",
"jest-environment-jsdom-global": "^1.2.0",
"less": "^3.10.1",
"less": "^3.10.3",
"less-loader": "^5.0.0",
"mini-css-extract-plugin": "^0.8.0",
"node-sass": "^4.12.0",
"nodemon": "^1.19.1",
"sass-loader": "^7.2.0",
"sass-loader": "^7.3.1",
"style-loader": "^1.0.0",
"superagent": "^5.1.0",
"supertest": "^4.0.2",
Expand Down

0 comments on commit 3388203

Please sign in to comment.