[Snyk] Upgrade date-fns from 2.30.0 to 3.3.1 #1644
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade date-fns from 2.30.0 to 3.3.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: date-fns
Kudos to @ kossnocorp and @ fturmel for working on the release.
Fixed
Fixed DST issue in
getOverlappingDaysInIntervals
, resulting in an inconsistent number of days returned for intervals starting and ending in different DST periods.Fixed functions incorrectly using
trunc
instead ofround
. The bug was introduced in v3.3.0. The affected functions:differenceInCalendarDays
,differenceInCalendarISOWeeks
,differenceInCalendarWeeks
,getISOWeek
,getWeek
, andgetISOWeeksInYear
.On this release worked @ kossnocorp, @ TheKvikk, @ fturmel and @ ckcherry23.
Fixed
Fixed the bug in
getOverlappingDaysInIntervals
caused by incorrect sorting of interval components that led to 0 for timestamps of different lengths.Fixed bugs when working with negative numbers caused by using
Math.floor
(-1.1
→-2
) instead ofMath.trunc
(-1.1
→-1
). Most of the conversion functions (i.e.,hoursToMinutes
) were affected when passing some negative fractional input. Also, some other functions that could be possibly affected by unfortunate timezone/date combinations were fixed.The functions that were affected:
format
,parse
,getUnixTime
,daysToWeeks
,hoursToMilliseconds
,hoursToMinutes
,hoursToSeconds
,milliseconds
,minutesToMilliseconds
,millisecondsToMinutes
,monthsToYears
,millisecondsToHours
,millisecondsToSeconds
,minutesToHours
,minutesToSeconds
,yearsToQuarters
,yearsToMonths
,yearsToDays
,weeksToDays
,secondsToMinutes
,secondsToHours
,quartersToYears
,quartersToMonths
andmonthsToQuarters
.Fixed the Czech locale's
formatDistance
to include1
informatDistance
.Fixed
differenceInSeconds
and other functions relying on rounding options that can produce a negative 0.Added a preprocessor to the locales API, enabling fixing a long-standing bug in the French locale. (#1391)
Added missing
yearsToDays
to the FP submodule.Made functions using rounding methods always return
0
instead of-0
.Added
format
aliasformatDate
with correspondingFormatDateOptions
interface.This release is brought to you by @ kossnocorp, @ fturmel, @ grossbart, @ MelvinVermeer, and @ jcarstairs-scottlogic.
Fixed
Fixed types compatibility with Lodash's
flow
and fp-ts'spipe
. (#3641)Fixed inconsistent behavior of
roundToNearestMinutes
.Added
format
,lightFormat
, andparse
internals that enable 3rd-parties to consume those.This release is brought to you by @ kossnocorp, @ makstyle119 and @ dmgawel.
Fixed
Added
Added
yearsToDays
function.Added a warning about using protected tokens like
Y
orD
without passing a corresponding option. See #2950.On this release worked @ imwh0im, @ jamcry and @ tyrw.
Fixed
areIntervalsOverlapping
caused by incorrect sorting (#3614)This release is brought to you by @ goku4199.
Fixed
toDate
not processing string arguments properlyThis release is brought to you by @ kossnocorp.
Fixed
Fixed
d.ts
files. Instead, now it copies the content to avoid the Masquerading as CJS problem reported by "Are the types wrong?".Fixed
Fixed yet another issue caused by ESM types by pointing to the same
d.ts
files.Added
package.json
to exports to provide access to tooling.Fixed TypeScript 5.4 build break by using the latest type names.
Fixed
d.mts
files exporting only types.Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs