Skip to content

Commit

Permalink
Merge pull request #702 from oddbird/dependabot/npm_and_yarn/npm-majo…
Browse files Browse the repository at this point in the history
…r-upgrades-84cf62e183

Bump date-fns from 3.6.0 to 4.0.0 in the npm-major-upgrades group
  • Loading branch information
jgerigmeyer authored Sep 16, 2024
2 parents 29dc23c + 01ffbf0 commit 6250c80
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@11ty/is-land": "^4.0.0",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@date-fns/utc": "^2.1.0",
"@netlify/plugin-a11y": "^1.0.0-beta.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^26.0.1",
Expand All @@ -74,8 +75,7 @@
"chalk": "^5.3.0",
"chokidar-cli": "^3.0.0",
"core-js": "^3.38.1",
"date-fns": "^3.6.0",
"date-fns-tz": "^3.1.3",
"date-fns": "^4.0.0",
"dotenv": "^16.4.5",
"doxray": "^0.10.1",
"eslint": "^9.10.0",
Expand Down Expand Up @@ -114,5 +114,5 @@
"typescript": "^5.6.2",
"typogr": "^0.6.8"
},
"packageManager": "yarn@4.4.1"
"packageManager": "yarn@4.5.0"
}
4 changes: 2 additions & 2 deletions src/filters/time.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UTCDateMini } from '@date-fns/utc';
import { format as dateFormat } from 'date-fns';
import { toZonedTime } from 'date-fns-tz';

/* @docs
label: Date & Time Filters
Expand Down Expand Up @@ -34,7 +34,7 @@ const formatDate = (date, format) => {
// eslint-disable-next-line no-console
console.warn(`Unknown date format used: "${format}"`);
}
return dateFormat(toZonedTime(date, '+00:00'), formats[format] || format);
return dateFormat(new UTCDateMini(date), formats[format] || format);
};

/* @docs
Expand Down
28 changes: 13 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,13 @@ __metadata:
languageName: node
linkType: hard

"@date-fns/utc@npm:^2.1.0":
version: 2.1.0
resolution: "@date-fns/utc@npm:2.1.0"
checksum: 10/924ca45afa948a6f618ade184e490deb6d0cfdaab40ac833afd409cf5fc0b09cfab14e37c4503a790711178a5e27e2a68172f15208cd9e0542d635aa24ab4113
languageName: node
linkType: hard

"@dual-bundle/import-meta-resolve@npm:^4.1.0":
version: 4.1.0
resolution: "@dual-bundle/import-meta-resolve@npm:4.1.0"
Expand Down Expand Up @@ -4423,19 +4430,10 @@ __metadata:
languageName: node
linkType: hard

"date-fns-tz@npm:^3.1.3":
version: 3.1.3
resolution: "date-fns-tz@npm:3.1.3"
peerDependencies:
date-fns: ^3.0.0
checksum: 10/eb5cb3b2cd152340004efda9f7905e571cf5140b8e85267b1eaa36c2f1eaa54a0f2e3b26e19794f2aca4d3b15aa3d52a5b2dadb540fcec74b239049c7792a981
languageName: node
linkType: hard

"date-fns@npm:^3.6.0":
version: 3.6.0
resolution: "date-fns@npm:3.6.0"
checksum: 10/cac35c58926a3b5d577082ff2b253612ec1c79eb6754fddef46b6a8e826501ea2cb346ecbd211205f1ba382ddd1f9d8c3f00bf433ad63cc3063454d294e3a6b8
"date-fns@npm:^4.0.0":
version: 4.0.0
resolution: "date-fns@npm:4.0.0"
checksum: 10/928045b380087cf3bd5459daf80bf8dc8b23f354184a590531b2a679efc4f10192fb7e7a235a17157b579dc8f8eb412d90996d653e669809b8484769744494c7
languageName: node
linkType: hard

Expand Down Expand Up @@ -9118,6 +9116,7 @@ __metadata:
"@algolia/algoliasearch-netlify-frontend": "npm:^1.0.15"
"@babel/core": "npm:^7.25.2"
"@babel/preset-env": "npm:^7.25.4"
"@date-fns/utc": "npm:^2.1.0"
"@netlify/plugin-a11y": "npm:^1.0.0-beta.1"
"@rollup/plugin-babel": "npm:^6.0.4"
"@rollup/plugin-commonjs": "npm:^26.0.1"
Expand All @@ -9131,8 +9130,7 @@ __metadata:
chokidar-cli: "npm:^3.0.0"
core-js: "npm:^3.38.1"
cssremedy: "npm:^0.1.0-beta.2"
date-fns: "npm:^3.6.0"
date-fns-tz: "npm:^3.1.3"
date-fns: "npm:^4.0.0"
dotenv: "npm:^16.4.5"
doxray: "npm:^0.10.1"
eslint: "npm:^9.10.0"
Expand Down

0 comments on commit 6250c80

Please sign in to comment.