[Snyk] Upgrade date-fns from 2.30.0 to 3.6.0 #6
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.
Snyk has created this PR to upgrade date-fns from 2.30.0 to 3.6.0.
ℹ️ 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.
The recommended version is 21 versions ahead of your current version.
The recommended version was released on 4 months ago.
Release notes
Package name: date-fns
On this release worked @ kossnocorp and @ world1dan. Also, thanks to @ seated for sponsoring me.
Fixed
formatDistance
.Added
Kudos to @ fturmel, @ kossnocorp, @ makstyle119, @ tan75, @ marcreichel, @ tareknatsheh and @ audunru for working on the release. Also, thanks to @ seated for sponsoring me.
Fixed
Fixed functions that use current date internally and made them work with date extensions like
UTCDate
.Fixed
daysToWeeks
returning negative 0.Fixed German grammar for the "half a minute" string.
Added
Added the Northern Sámi (
se
) locale.Added the
constructNow
function that creates the current date using the passed reference date's constructor.Kudos to @ kossnocorp, @ sakamossan, and @ Revan99 for working on the release. Also, thanks to @ seated for sponsoring me.
Added
Added
roundToNearestHours
function.Added Central Kurdish (
ckb
) locale.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
Important
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: