Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): Bump the date-fns group across 1 directory with 2 updates #443

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 30, 2024

Bumps the date-fns group with 2 updates in the / directory: date-fns and date-fns-tz.

Updates date-fns from 2.30.0 to 4.1.0

Release notes

Sourced from date-fns's releases.

v4.1.0

This release adds time zone support to format functions (that I somehow missed when working on the feature) and fixes a few bugs.

Make sure also upgrade TZDate to v1.0.2 as it includes a bunch of critical bug fixes.

Fixed

  • Fixed internal constructFrom throwing an exception on null arguments. While null isn't allowed, the functions should rather return Invalid Date or NaN in such cases. See #3885.

Added

  • Added missing time zone support to format, formatISO, formatISO9075, formatRelative and formatRFC3339. See #3886.

v4.0.0

I have great news! First, ten years after its release, date-fns finally gets first-class time zone support.

Another great news is that there aren't many breaking changes in this release. All of them are type-related and will affect only those explicitly using internal date-fns types. Finally, it has been less than a year since the last major release, which is an improvement over the previous four years between v2 and v3. I plan on keeping the pace and minimizing breaking changes moving forward.

Read more about the release in the announcement blog post.

- Sasha @​kossnocorp

Added

  • Added time zones support via @date-fns/tz's TZDate class and tz helper function. See its README for the details about the API.

  • All relevant functions now accept the context in option, which allows to specify the time zone to make the calculations in. If the function also returns a date, it will be in the specified time zone:

    import { addDays, startOfDay } from "date-fns";
    import { tz } from "@date-fns/tz";
    startOfDay(addDays(Date.now(), 5, { in: tz("Asia/Singapore") }));
    //=> "2024-09-16T00:00:00.000+08:00"

    In the example, addDays will get the current date and time in Singapore and add 5 days to it. startOfDay will inherit the date type and return the start of the day in Singapore.

Changed

  • The function arguments, as well as Interval's start and end, now can be of different types, allowing you to mix UTCDate, TZDate, Date, and other extensions, as well as primitives (strings and numbers).

    The functions will normalize these values, make calculations, and return the result in the same type, preventing any bugs caused by the discrepancy. If passed, the type will be inferred from the context in option or the first encountered argument object type. The Interval's start and end will be considered separately, starting from start.

    In the given example, the result will be in the TZDate as the first argument is a number, and the start takes precedence over the end.

    clamp(Date.now(), {
      start: new TZDate(start, "Asia/Singapore"),
      end: new UTCDate(),

... (truncated)

Changelog

Sourced from date-fns's changelog.

v4.1.0 - 2024-09-17

This release adds time zone support to format functions (that I somehow missed when working on the feature) and fixes a few bugs.

Make sure also upgrade TZDate to v1.0.2 as it includes a bunch of critical bug fixes.

Fixed

  • Fixed internal constructFrom throwing an exception on null arguments. While null isn't allowed, the functions should rather return Invalid Date or NaN in such cases. See #3885.

Added

  • Added missing time zone support to format, formatISO, formatISO9075, formatRelative and formatRFC3339. See #3886.

v4.0.0 - 2024-09-16

I have great news! First, ten years after its release, date-fns finally gets first-class time zone support.

Another great news is that there aren't many breaking changes in this release. All of them are type-related and will affect only those explicitly using internal date-fns types. Finally, it has been less than a year since the last major release, which is an improvement over the previous four years between v2 and v3. I plan on keeping the pace and minimizing breaking changes moving forward.

Read more about the release in the announcement blog post.

- Sasha @​kossnocorp

Added

  • Added time zones support via @date-fns/tz's TZDate class and tz helper function. See its README for the details about the API.

  • All relevant functions now accept the context in option, which allows to specify the time zone to make the calculations in. If the function also returns a date, it will be in the specified time zone:

    import { addDays, startOfDay } from "date-fns";
    import { tz } from "@date-fns/tz";
    startOfDay(addDays(Date.now(), 5, { in: tz("Asia/Singapore") }));
    //=> "2024-09-16T00:00:00.000+08:00"

    In the example, addDays will get the current date and time in Singapore and add 5 days to it. startOfDay will inherit the date type and return the start of the day in Singapore.

Changed

  • The function arguments, as well as Interval's start and end, now can be of different types, allowing you to mix UTCDate, TZDate, Date, and other extensions, as well as primitives (strings and numbers).

    The functions will normalize these values, make calculations, and return the result in the same type, preventing any bugs caused by the discrepancy. If passed, the type will be inferred from the context in option or the first encountered argument object type. The Interval's start and end will be considered separately, starting from start.

    In the given example, the result will be in the TZDate as the first argument is a number, and the start takes precedence over the end.

    clamp(Date.now(), {

... (truncated)

Commits
  • 313b902 Fix v4.1.0 change log entry
  • 26cd336 Promote to v4.1.0
  • 97b53b9 Cover time zone edge cases
  • 59b7563 Add missing time zone support to format, formatISO, formatISO9075, formatRela...
  • 0121164 Prevent constructFrom from throwing an error on null
  • bd87ef5 Update @​date-fns/docs
  • 99b4e67 Prepare v4.0
  • 8df1706 Rewrite the time zones doc
  • e351977 Promote to v4.0.0-beta.1
  • 8523656 Fix scripts/test/types.sh
  • Additional commits viewable in compare view

Updates date-fns-tz from 2.0.0 to 3.2.0

Release notes

Sourced from date-fns-tz's releases.

v3.0.0

This release adds support for date-fns v3. Thank you @​christopherklint97 (#265) and everyone who helped test and fix the beta releases.

BREAKING CHANGES

  • date-fns v2 is no longer supported
  • Renamed utcToZonedTime to toZonedTime to make the name less confusing, just search & replace
  • Renamed zonedTimeToUtc to fromZonedTime to make the name less confusing, just search & replace
  • All functions are now exported using named exports, this requires changing direct imports from import formatInTimeZone from 'date-fns-tz/formatInTimeZone' to import { formatInTimeZone } from 'date-fns-tz/formatInTimeZone'
  • Functions now don’t check the number of passed arguments, delegating this task to type checkers similar to date-fns v3
  • Arguments are not explicitly converted to the target types; instead, they are passed as is, delegating this task to type checkers similar to date-fns v3
  • IE is no longer supported since date-fns no longer supports it
  • Removed flow support since date-fns also removed it
Changelog

Sourced from date-fns-tz's changelog.

v3.2.0 (27 September 2024)

v3.1.3 (17 April 2024)

  • [BUGFIX] Make getTimeZoneOffset's 2nd arg optional

v3.1.2 (16 April 2024)

  • [BUGFIX] Fix formatInTimeZone use of timeZone string (#280)

v3.1.1 (16 April 2024)

  • [BUGFIX] getTimeZoneOffset's 2nd arg should be optional (#281)

v3.1.0 (15 April 2024)

  • [REFACTOR] Full rewrite in TypeScript (#278) Thank you, @​brettwillis
  • [BREAKING CHANGE] OptionsWithTZ is now either FormatOptionsWithTZ or ToDateOptionsWithTZ, matching date-fns

v3.0.1 (10 April 2024)

  • [BUGFIX] Fix named export typings (#277)

v3.0.0 (6 April 2024)

  • [UPGRADE] Support date-fns v3 (#265) Thank you, @​christopherklint97
  • [BUGFIX] Correct import of date-fns@v3 format and use Babel Webpack loader for mjs files (#271)
  • [BREAKING CHANGE] date-fns v2 is no longer supported
  • [BREAKING CHANGE] Renamed utcToZonedTime to toZonedTime to make the name less confusing, just search & replace
  • [BREAKING CHANGE] Renamed zonedTimeToUtc to fromZonedTime to make the name less confusing, just search & replace
  • [BREAKING CHANGE] All functions are now exported using named exports, this requires changing direct imports from import formatInTimeZone from 'date-fns-tz/formatInTimeZone' to import { formatInTimeZone } from 'date-fns-tz/formatInTimeZone'
  • [BREAKING CHANGE] Functions now don’t check the number of passed arguments, delegating this task to type checkers (This isn't fully implemented yet, but it should be the assumption moving forward, as it is in date-fns)
  • [BREAKING CHANGE] Arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers (This isn't fully implemented yet, but it should be the assumption moving forward, as it is in date-fns)
  • [BREAKING CHANGE] IE is no longer supported since date-fns no longer supports it
  • [BREAKING CHANGE] Removed flow support since date-fns also removed it

v2.0.1 (9 March 2024)

  • [DOCS] Fix incorrect output comment (#270)
  • [DEPS] Limit to date-fns 2.x (#262, #267)

... (truncated)

Commits
  • b882090 3.2.0
  • 62b11e3 Peer dep date-fns ^3.0.0 || ^4.0.0
  • 142a409 Merge pull request #286 from yangchristina/get-default-options
  • 9877487 Merge pull request #297 from callstack-internal/hur/perf/extract-testDateForm...
  • 772f07c Merge pull request #284 from yangchristina/docs
  • e7a6122 Merge pull request #301 from eshimischi/master
  • 16a355b Yarn: upgrade
  • 7ecd332 Merge pull request #1 from eshimischi/eshimischi-patch-1
  • a70c07a date-fns v4.1.0
  • 79bb229 perf: extract testDateFormatted to avoid re-initialising each time getDateTie...
  • Additional commits viewable in compare view

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Sep 30, 2024
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@github-actions github-actions bot added the help wanted Extra attention is needed label Sep 30, 2024
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 4e72f99 to 6bfb582 Compare September 30, 2024 16:26
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 6bfb582 to 1f9eb1e Compare October 7, 2024 17:10
Copy link

github-actions bot commented Oct 7, 2024

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 1f9eb1e to 77c5733 Compare October 14, 2024 16:44
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 77c5733 to af99f42 Compare October 21, 2024 16:31
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from af99f42 to 3b70ff8 Compare October 28, 2024 16:37
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 3b70ff8 to 857eca3 Compare October 28, 2024 16:50
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 857eca3 to 5c7d451 Compare November 18, 2024 17:44
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 5c7d451 to 4a77ece Compare December 2, 2024 19:18
Copy link

github-actions bot commented Dec 2, 2024

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 4a77ece to 466efbf Compare December 23, 2024 17:00
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 466efbf to d3c7c06 Compare December 30, 2024 16:57
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from d3c7c06 to cfd71b2 Compare January 13, 2025 16:25
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from cfd71b2 to 70be976 Compare January 20, 2025 16:04
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 70be976 to 43ae1c3 Compare January 27, 2025 17:10
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

Bumps the date-fns group with 2 updates in the / directory: [date-fns](https://github.com/date-fns/date-fns) and [date-fns-tz](https://github.com/marnusw/date-fns-tz).


Updates `date-fns` from 2.30.0 to 4.1.0
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/main/CHANGELOG.md)
- [Commits](date-fns/date-fns@v2.30.0...v4.1.0)

Updates `date-fns-tz` from 2.0.0 to 3.2.0
- [Release notes](https://github.com/marnusw/date-fns-tz/releases)
- [Changelog](https://github.com/marnusw/date-fns-tz/blob/master/CHANGELOG.md)
- [Commits](marnusw/date-fns-tz@v2.0.0...v3.2.0)

---
updated-dependencies:
- dependency-name: date-fns
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: date-fns
- dependency-name: date-fns-tz
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: date-fns
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/date-fns-8257031782 branch from 43ae1c3 to 0997e97 Compare January 27, 2025 17:11
Copy link

I do not approve this PR because it includes a major update of a dependency used in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file help wanted Extra attention is needed javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants