Skip to content

Commit 5ae2e3e

Browse files
authored
chore(deps,api): update date-fns and add date-fns-tz (freeCodeCamp#61048)
1 parent 98326d2 commit 5ae2e3e

File tree

4 files changed

+33
-27
lines changed

4 files changed

+33
-27
lines changed

api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/pino": "^7.0.5",
2121
"ajv": "8.12.0",
2222
"ajv-formats": "2.1.1",
23-
"date-fns": "2.30.0",
23+
"date-fns": "4.1.0",
2424
"dotenv": "16.4.5",
2525
"fast-uri": "2.3.0",
2626
"fastify": "5.2.0",

client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
"browser-cookies": "1.2.0",
6767
"canvas-confetti": "^1.6.0",
6868
"crypto-browserify": "3.12.0",
69-
"date-fns": "2.30.0",
69+
"date-fns": "4.1.0",
70+
"date-fns-tz": "3.2.0",
7071
"final-form": "4.20.10",
7172
"gatsby": "3.15.0",
7273
"gatsby-cli": "3.15.0",

client/src/components/profile/components/heat-map.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
22
// @ts-ignore
33
import CalendarHeatMap from 'react-calendar-heatmap';
4-
// TODO: Check if we can import { addDays, addMonths ... } from 'date-fns'
5-
// without bundling all of the package then we can remove the disable-next-line
6-
// comments.
7-
8-
// eslint-disable-next-line import/no-duplicates
9-
import addDays from 'date-fns/addDays';
10-
// eslint-disable-next-line import/no-duplicates
11-
import addMonths from 'date-fns/addMonths';
12-
// eslint-disable-next-line import/no-duplicates
13-
import isEqual from 'date-fns/isEqual';
14-
// eslint-disable-next-line import/no-duplicates
15-
import startOfDay from 'date-fns/startOfDay';
4+
5+
import { addDays, addMonths, isEqual, startOfDay } from 'date-fns';
166
import React, { Component } from 'react';
177
import type { TFunction } from 'i18next';
188
import { useTranslation } from 'react-i18next';
@@ -22,8 +12,6 @@ import { Row, Spacer } from '@freecodecamp/ui';
2212
import 'react-calendar-heatmap/dist/styles.css';
2313
import './heatmap.css';
2414

25-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
26-
// @ts-ignore
2715
import envData from '../../../../config/env.json';
2816
import { getLangCode } from '../../../../../shared/config/i18n';
2917
import { User } from '../../../redux/prop-types';

pnpm-lock.yaml

Lines changed: 28 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)