upgrading to v2.29.2 because 2.29.1 introduced a breaking change on intervalToDuration

This commit is contained in:
Julie Plantey 2022-08-18 18:31:27 +02:00
parent 2ae55c2739
commit 73b12aa94d
8 changed files with 13 additions and 11 deletions

View File

@ -37,6 +37,8 @@ jest.spyOn(axiosInstance, 'get').mockResolvedValue({
}, },
}); });
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01T08:00:00.000Z'));
const client = new QueryClient({ const client = new QueryClient({
defaultOptions: { defaultOptions: {
queries: { queries: {
@ -908,7 +910,7 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
datetime="2021-11-15T00:00:00.000Z" datetime="2021-11-15T00:00:00.000Z"
title="11/15/2021 12:00 AM" title="11/15/2021 12:00 AM"
> >
9 months ago in 6 years
</time> </time>
</span> </span>
</td> </td>

View File

@ -65,7 +65,7 @@
"codemirror": "^5.65.6", "codemirror": "^5.65.6",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"css-loader": "6.7.1", "css-loader": "6.7.1",
"date-fns": "2.29.1", "date-fns": "2.29.2",
"dotenv": "8.5.1", "dotenv": "8.5.1",
"esbuild-loader": "^2.19.0", "esbuild-loader": "^2.19.0",
"execa": "^1.0.0", "execa": "^1.0.0",

View File

@ -31,7 +31,7 @@
"test:unit": "jest --verbose" "test:unit": "jest --verbose"
}, },
"dependencies": { "dependencies": {
"date-fns": "2.29.1", "date-fns": "2.29.2",
"debug": "4.3.1", "debug": "4.3.1",
"fs-extra": "10.0.0", "fs-extra": "10.0.0",
"knex": "1.0.7", "knex": "1.0.7",

View File

@ -8,7 +8,7 @@ const RelativeTime = ({ timestamp }) => {
const interval = intervalToDuration({ const interval = intervalToDuration({
start: timestamp, start: timestamp,
end: new Date(), end: Date.now(),
}); });
const unit = ['years', 'months', 'days', 'hours', 'minutes', 'seconds'].find((intervalUnit) => { const unit = ['years', 'months', 'days', 'hours', 'minutes', 'seconds'].find((intervalUnit) => {

View File

@ -45,7 +45,7 @@
"@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"axios": "0.25.0", "axios": "0.25.0",
"date-fns": "2.29.1", "date-fns": "2.29.2",
"formik": "^2.2.6", "formik": "^2.2.6",
"immer": "9.0.6", "immer": "9.0.6",
"invariant": "^2.2.1", "invariant": "^2.2.1",

View File

@ -28,7 +28,7 @@
"@strapi/utils": "4.3.4", "@strapi/utils": "4.3.4",
"byte-size": "7.0.1", "byte-size": "7.0.1",
"cropperjs": "1.5.12", "cropperjs": "1.5.12",
"date-fns": "2.29.1", "date-fns": "2.29.2",
"fs-extra": "10.0.0", "fs-extra": "10.0.0",
"immer": "9.0.15", "immer": "9.0.15",
"koa-range": "0.3.0", "koa-range": "0.3.0",

View File

@ -36,7 +36,7 @@
}, },
"dependencies": { "dependencies": {
"@sindresorhus/slugify": "1.1.0", "@sindresorhus/slugify": "1.1.0",
"date-fns": "2.29.1", "date-fns": "2.29.2",
"http-errors": "1.8.1", "http-errors": "1.8.1",
"lodash": "4.17.21", "lodash": "4.17.21",
"yup": "0.32.9" "yup": "0.32.9"

View File

@ -9555,10 +9555,10 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0" whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0" whatwg-url "^8.0.0"
date-fns@2.29.1: date-fns@2.29.2:
version "2.29.1" version "2.29.2"
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.1.tgz#9667c2615525e552b5135a3116b95b1961456e60" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.2.tgz#0d4b3d0f3dff0f920820a070920f0d9662c51931"
integrity sha512-dlLD5rKaKxpFdnjrs+5azHDFOPEu4ANy/LTh04A1DTzMM7qoajmKCBc8pkKRFT41CNzw+4gQh79X5C+Jq27HAw== integrity sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==
dateformat@^3.0.0: dateformat@^3.0.0:
version "3.0.3" version "3.0.3"