Skip to content

Commit c8e14cb

Browse files
author
Tim De Pauw
committed
Replace fecha with date-fns
1 parent c9787d5 commit c8e14cb

File tree

4 files changed

+79
-19
lines changed

4 files changed

+79
-19
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"base16": "^1.0.0",
30-
"fecha": "^4.2.1",
30+
"date-fns": "^2.22.1",
3131
"file-saver": "^2.0.5",
3232
"font-awesome": "^4.7.0",
3333
"iab-vast-loader": "^2.5.1",
@@ -44,7 +44,7 @@
4444
"react-redux": "^7.2.4",
4545
"react-router-dom": "^5.0.1",
4646
"react-tabs": "^3.2.2",
47-
"react-textarea-autosize": "^8.3.2",
47+
"react-textarea-autosize": "^8.3.3",
4848
"react-toggle": "^4.1.2",
4949
"redux": "^4.1.0",
5050
"redux-actions": "^2.6.5",
@@ -56,7 +56,7 @@
5656
"upper-case-first": "^2.0.2"
5757
},
5858
"devDependencies": {
59-
"eslint": "^7.27.0",
59+
"eslint": "^7.28.0",
6060
"eslint-config-standard": "^16.0.3",
6161
"eslint-plugin-import": "^2.23.4",
6262
"eslint-plugin-node": "^11.1.0",

src/components/Log.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fecha from 'fecha'
1+
import { format } from 'date-fns'
22
import React from 'react'
33
import FontAwesome from 'react-fontawesome'
44

@@ -48,7 +48,7 @@ class LogItem extends React.PureComponent {
4848
<>
4949
<tr className={`${classNames} first`}>
5050
<td className="time" title={timeTooltip}>
51-
{fecha.format(timestamp, 'HH:mm:ss.SSS')}
51+
{format(timestamp, 'HH:mm:ss.SSS')}
5252
</td>
5353
<td className="level">
5454
<span className="icon">

src/containers/Share.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import fecha from 'fecha'
1+
import { format } from 'date-fns'
22
import { saveAs } from 'file-saver'
33
import React from 'react'
44
import CopyToClipboard from 'react-copy-to-clipboard'
@@ -24,7 +24,7 @@ const getLogData = () =>
2424
})
2525

2626
const getLogFileName = () =>
27-
'vast-tester-' + fecha.format(new Date(), 'YYYY-MM-DD-HH-mm-ss') + '.json'
27+
'vast-tester-' + format(new Date(), 'yyyy-MM-dd-HH-mm-ss') + '.json'
2828

2929
const onActivateDownloadLog = () => {
3030
const blob = new Blob([getLogData()], { type: LOG_MIME_TYPE })

yarn.lock

+72-12
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,21 @@
12341234
minimatch "^3.0.4"
12351235
strip-json-comments "^3.1.1"
12361236

1237+
"@eslint/eslintrc@^0.4.2":
1238+
version "0.4.2"
1239+
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179"
1240+
integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==
1241+
dependencies:
1242+
ajv "^6.12.4"
1243+
debug "^4.1.1"
1244+
espree "^7.3.0"
1245+
globals "^13.9.0"
1246+
ignore "^4.0.6"
1247+
import-fresh "^3.2.1"
1248+
js-yaml "^3.13.1"
1249+
minimatch "^3.0.4"
1250+
strip-json-comments "^3.1.1"
1251+
12371252
12381253
version "2.1.4"
12391254
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
@@ -4116,6 +4131,11 @@ data-urls@^2.0.0:
41164131
whatwg-mimetype "^2.3.0"
41174132
whatwg-url "^8.0.0"
41184133

4134+
date-fns@^2.22.1:
4135+
version "2.22.1"
4136+
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.22.1.tgz#1e5af959831ebb1d82992bf67b765052d8f0efc4"
4137+
integrity sha512-yUFPQjrxEmIsMqlHhAhmxkuH769baF21Kk+nZwZGyrMoyLA+LugaQtC0+Tqf9CBUUULWwUJt6Q5ySI3LJDDCGg==
4138+
41194139
[email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
41204140
version "2.6.9"
41214141
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -4911,7 +4931,7 @@ eslint@^5.0.0:
49114931
table "^5.2.3"
49124932
text-table "^0.2.0"
49134933

4914-
eslint@^7.11.0, eslint@^7.27.0:
4934+
eslint@^7.11.0:
49154935
version "7.27.0"
49164936
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7"
49174937
integrity sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA==
@@ -4956,6 +4976,51 @@ eslint@^7.11.0, eslint@^7.27.0:
49564976
text-table "^0.2.0"
49574977
v8-compile-cache "^2.0.3"
49584978

4979+
eslint@^7.28.0:
4980+
version "7.28.0"
4981+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.28.0.tgz#435aa17a0b82c13bb2be9d51408b617e49c1e820"
4982+
integrity sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==
4983+
dependencies:
4984+
"@babel/code-frame" "7.12.11"
4985+
"@eslint/eslintrc" "^0.4.2"
4986+
ajv "^6.10.0"
4987+
chalk "^4.0.0"
4988+
cross-spawn "^7.0.2"
4989+
debug "^4.0.1"
4990+
doctrine "^3.0.0"
4991+
enquirer "^2.3.5"
4992+
escape-string-regexp "^4.0.0"
4993+
eslint-scope "^5.1.1"
4994+
eslint-utils "^2.1.0"
4995+
eslint-visitor-keys "^2.0.0"
4996+
espree "^7.3.1"
4997+
esquery "^1.4.0"
4998+
esutils "^2.0.2"
4999+
fast-deep-equal "^3.1.3"
5000+
file-entry-cache "^6.0.1"
5001+
functional-red-black-tree "^1.0.1"
5002+
glob-parent "^5.1.2"
5003+
globals "^13.6.0"
5004+
ignore "^4.0.6"
5005+
import-fresh "^3.0.0"
5006+
imurmurhash "^0.1.4"
5007+
is-glob "^4.0.0"
5008+
js-yaml "^3.13.1"
5009+
json-stable-stringify-without-jsonify "^1.0.1"
5010+
levn "^0.4.1"
5011+
lodash.merge "^4.6.2"
5012+
minimatch "^3.0.4"
5013+
natural-compare "^1.4.0"
5014+
optionator "^0.9.1"
5015+
progress "^2.0.0"
5016+
regexpp "^3.1.0"
5017+
semver "^7.2.1"
5018+
strip-ansi "^6.0.0"
5019+
strip-json-comments "^3.1.0"
5020+
table "^6.0.9"
5021+
text-table "^0.2.0"
5022+
v8-compile-cache "^2.0.3"
5023+
49595024
esm@^3.2.25:
49605025
version "3.2.25"
49615026
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
@@ -5283,11 +5348,6 @@ fb-watchman@^2.0.0:
52835348
dependencies:
52845349
bser "2.1.1"
52855350

5286-
fecha@^4.2.1:
5287-
version "4.2.1"
5288-
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.1.tgz#0a83ad8f86ef62a091e22bb5a039cd03d23eecce"
5289-
integrity sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q==
5290-
52915351
figgy-pudding@^3.5.1:
52925352
version "3.5.2"
52935353
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
@@ -5703,7 +5763,7 @@ glob-parent@^3.1.0:
57035763
is-glob "^3.1.0"
57045764
path-dirname "^1.0.0"
57055765

5706-
glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0:
5766+
glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.0:
57075767
version "5.1.2"
57085768
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
57095769
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -5750,7 +5810,7 @@ globals@^12.1.0:
57505810
dependencies:
57515811
type-fest "^0.8.1"
57525812

5753-
globals@^13.6.0:
5813+
globals@^13.6.0, globals@^13.9.0:
57545814
version "13.9.0"
57555815
resolved "https://registry.yarnpkg.com/globals/-/globals-13.9.0.tgz#4bf2bf635b334a173fb1daf7c5e6b218ecdc06cb"
57565816
integrity sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==
@@ -10202,10 +10262,10 @@ react-tabs@^3.2.2:
1020210262
clsx "^1.1.0"
1020310263
prop-types "^15.5.0"
1020410264

10205-
react-textarea-autosize@^8.3.2:
10206-
version "8.3.2"
10207-
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.2.tgz#4f9374d357b0a6f6469956726722549124a1b2db"
10208-
integrity sha512-JrMWVgQSaExQByP3ggI1eA8zF4mF0+ddVuX7acUeK2V7bmrpjVOY72vmLz2IXFJSAXoY3D80nEzrn0GWajWK3Q==
10265+
react-textarea-autosize@^8.3.3:
10266+
version "8.3.3"
10267+
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.3.tgz#f70913945369da453fd554c168f6baacd1fa04d8"
10268+
integrity sha512-2XlHXK2TDxS6vbQaoPbMOfQ8GK7+irc2fVK6QFIcC8GOnH3zI/v481n+j1L0WaPVvKxwesnY93fEfH++sus2rQ==
1020910269
dependencies:
1021010270
"@babel/runtime" "^7.10.2"
1021110271
use-composed-ref "^1.0.0"

0 commit comments

Comments
 (0)