Upgrade packages (#21)

This commit is contained in:
Manuel Bouza 2019-09-18 05:53:17 +02:00 committed by Tobias Miesel
parent 986fc64998
commit 5e62e16751
6 changed files with 2631 additions and 2207 deletions

View File

@ -17,18 +17,18 @@
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.4.0", "@babel/polyfill": "^7.4.0",
"axios": "^0.18.0", "axios": "^0.19.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"date-fns": "^1.30.1", "date-fns": "^2.2.1",
"dotenv": "^7.0.0", "dotenv": "^8.1.0",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"mobx": "^5.5.0", "mobx": "^5.5.0",
"mobx-react": "^5.2.8", "mobx-react": "^6.1.3",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"query-string": "^6.2.0", "query-string": "^6.2.0",
"react": "^16.8.0", "react": "^16.8.0",
"react-dom": "^16.8.0", "react-dom": "^16.8.0",
"react-select": "^2.3.0", "react-select": "^3.0.4",
"react-spring": "^8.0.7", "react-spring": "^8.0.7",
"url-pattern": "^1.0.3" "url-pattern": "^1.0.3"
}, },
@ -42,23 +42,23 @@
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4", "babel-loader": "^8.0.4",
"babel-plugin-module-resolver": "^3.1.1", "babel-plugin-module-resolver": "^3.1.1",
"clean-webpack-plugin": "^1.0.1", "clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^4.6.0", "copy-webpack-plugin": "^5.0.4",
"copyfiles": "^2.1.0", "copyfiles": "^2.1.0",
"css-loader": "^2.1.0", "css-loader": "^3.2.0",
"eslint": "^5.7.0", "eslint": "^6.4.0",
"eslint-config-prettier": "^4.1.0", "eslint-config-prettier": "^6.3.0",
"eslint-plugin-jest": "^22.2.2", "eslint-plugin-jest": "^22.2.2",
"eslint-plugin-prettier": "^3.0.1", "eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.11.1", "eslint-plugin-react": "^7.11.1",
"file-loader": "^3.0.1", "file-loader": "^4.2.0",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"jest": "^24.1.0", "jest": "^24.1.0",
"mini-css-extract-plugin": "^0.5.0", "mini-css-extract-plugin": "^0.8.0",
"node-sass": "^4.11.0", "node-sass": "^4.11.0",
"prettier": "^1.16.4", "prettier": "^1.16.4",
"sass-loader": "^7.1.0", "sass-loader": "^8.0.0",
"style-loader": "^0.23.1", "style-loader": "^1.0.0",
"uuid": "^3.3.2", "uuid": "^3.3.2",
"webpack": "^4.15.0", "webpack": "^4.15.0",
"webpack-cli": "^3.0.8", "webpack-cli": "^3.0.8",

View File

@ -16,10 +16,10 @@ import {
findTask, findTask,
formatDate, formatDate,
} from "utils" } from "utils"
import { parseISO } from "date-fns"
import InvalidConfigurationError from "components/Errors/InvalidConfigurationError" import InvalidConfigurationError from "components/Errors/InvalidConfigurationError"
import UpgradeRequiredError from "components/Errors/UpgradeRequiredError" import UpgradeRequiredError from "components/Errors/UpgradeRequiredError"
import UnknownError from "components/Errors/UnknownError" import UnknownError from "components/Errors/UnknownError"
import { parse } from "date-fns"
import Header from "./shared/Header" import Header from "./shared/Header"
import { head } from "lodash" import { head } from "lodash"
import TimeInputParser from "utils/TimeInputParser" import TimeInputParser from "utils/TimeInputParser"
@ -193,8 +193,8 @@ class App extends Component {
{() => ( {() => (
<> <>
<Calendar <Calendar
fromDate={parse(fromDate)} fromDate={parseISO(fromDate)}
toDate={parse(toDate)} toDate={parseISO(toDate)}
activities={activities} activities={activities}
schedules={schedules} schedules={schedules}
selectedDate={new Date(this.changesetWithDefaults.date)} selectedDate={new Date(this.changesetWithDefaults.date)}

View File

@ -2,7 +2,7 @@ import React from "react"
import PropTypes from "prop-types" import PropTypes from "prop-types"
import Day from "./Day" import Day from "./Day"
import { formatDate } from "utils" import { formatDate } from "utils"
import { eachDay } from "date-fns" import { eachDayOfInterval } from "date-fns"
import { pathEq } from "lodash/fp" import { pathEq } from "lodash/fp"
const findAbsence = (date, schedules) => schedules.find(pathEq("date", formatDate(date))) const findAbsence = (date, schedules) => schedules.find(pathEq("date", formatDate(date)))
@ -14,7 +14,7 @@ const hoursAtDate = (date, activities) =>
const Calendar = ({ fromDate, toDate, selectedDate, activities, schedules, onChange }) => ( const Calendar = ({ fromDate, toDate, selectedDate, activities, schedules, onChange }) => (
<div className="moco-bx-calendar"> <div className="moco-bx-calendar">
{eachDay(fromDate, toDate).map(date => ( {eachDayOfInterval({ start: fromDate, end: toDate }).map(date => (
<Day <Day
key={date} key={date}
date={date} date={date}

View File

@ -89,7 +89,7 @@ export const trace = curry((tag, value) => {
}) })
export const weekStartsOn = 1 export const weekStartsOn = 1
export const formatDate = date => format(date, "YYYY-MM-DD") export const formatDate = date => format(date, "yyyy-MM-dd")
export const extensionSettingsUrl = () => `chrome://extensions/?id=${chrome.runtime.id}` export const extensionSettingsUrl = () => `chrome://extensions/?id=${chrome.runtime.id}`

View File

@ -2,7 +2,7 @@ require("dotenv").config()
const path = require("path") const path = require("path")
const webpack = require("webpack") const webpack = require("webpack")
const CleanWebpackPlugin = require("clean-webpack-plugin") const { CleanWebpackPlugin } = require("clean-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin") const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const HtmlWebpackPlugin = require("html-webpack-plugin") const HtmlWebpackPlugin = require("html-webpack-plugin")
const ZipPlugin = require("zip-webpack-plugin") const ZipPlugin = require("zip-webpack-plugin")
@ -31,7 +31,9 @@ module.exports = env => {
{ {
loader: "sass-loader", loader: "sass-loader",
options: { options: {
includePaths: [path.join(__dirname, "src/css")], sassOptions: {
includePaths: [path.join(__dirname, "src/css")],
},
}, },
}, },
], ],
@ -55,7 +57,7 @@ module.exports = env => {
], ],
}, },
plugins: [ plugins: [
new CleanWebpackPlugin([`build/${env.browser}`]), new CleanWebpackPlugin(),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify(env.NODE_ENV), "process.env.NODE_ENV": JSON.stringify(env.NODE_ENV),
}), }),

4790
yarn.lock

File diff suppressed because it is too large Load Diff