Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jest/unit/components/__mocks__/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { Base64 } from 'js-base64';
import addHours from 'date-fns/add_hours';
import addHours from 'date-fns/addHours';

export function generateTokenWithTimeRange(limit = 0) {
const payload = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"concurrently": "5.0.0",
"cross-env": "6.0.3",
"css-loader": "3.2.0",
"date-fns": "1.30.1",
"date-fns": "2.6.0",
"detect-secrets": "1.0.4",
"emotion": "9.2.12",
"enzyme": "3.10.0",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isObject } from 'util';
import { UpLinks } from '@verdaccio/types';
import isString from 'lodash/isString';
import format from 'date-fns/format';
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';
import formatDistanceToNow from 'date-fns/formatDistanceToNow';

import { Time } from '../../types/packageMeta';

Expand Down Expand Up @@ -56,7 +56,7 @@ export function formatDate(lastUpdate: string | number): string {
}

export function formatDateDistance(lastUpdate: Date | string | number): string {
return distanceInWordsToNow(new Date(lastUpdate));
return formatDistanceToNow(new Date(lastUpdate));
}

/**
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4526,16 +4526,16 @@ data-urls@^1.0.0, data-urls@^1.1.0:
whatwg-mimetype "^2.2.0"
whatwg-url "^7.0.0"

date-fns@1.30.1, date-fns@^1.27.2:
version "1.30.1"
resolved "https://registry.verdaccio.org/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==

date-fns@^2.0.1:
date-fns@2.6.0, date-fns@^2.0.1:
version "2.6.0"
resolved "https://registry.verdaccio.org/date-fns/-/date-fns-2.6.0.tgz#a5bc82e6a4c3995ae124b0ba1a71aec7b8cbd666"
integrity sha512-F55YxqRdEfP/eYQmQjLN798v0AwLjmZ8nMBjdQvNwEE3N/zWVrlkkqT+9seBlPlsbkybG4JmWg3Ee3dIV9BcGQ==

date-fns@^1.27.2:
version "1.30.1"
resolved "https://registry.verdaccio.org/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==

date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.verdaccio.org/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
Expand Down