n1ru4l / envelop

Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
https://envelop.dev
MIT License
788 stars 128 forks source link

fix(deps): update dependency date-fns to v4 #2298

Open renovate[bot] opened 1 month ago

renovate[bot] commented 1 month ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
date-fns 3.6.0 -> 4.1.0 age adoption passing confidence

Release Notes

date-fns/date-fns (date-fns) ### [`v4.1.0`](https://redirect.github.com/date-fns/date-fns/blob/HEAD/CHANGELOG.md#v410---2024-09-17) [Compare Source](https://redirect.github.com/date-fns/date-fns/compare/v4.0.0...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](https://redirect.github.com/date-fns/tz/blob/main/CHANGELOG.md#v102---2024-09-14). ##### 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](https://redirect.github.com/date-fns/date-fns/issues/3885). ##### Added - Added missing time zone support to `format`, `formatISO`, `formatISO9075`, `formatRelative` and `formatRFC3339`. See [#​3886](https://redirect.github.com/date-fns/date-fns/issues/3886). ### [`v4.0.0`](https://redirect.github.com/date-fns/date-fns/blob/HEAD/CHANGELOG.md#v400---2024-09-16) [Compare Source](https://redirect.github.com/date-fns/date-fns/compare/v3.6.0...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](https://blog.date-fns.org/v40-with-time-zone-support/). \- [Sasha @​kossnocorp](https://twitter.com/kossnocorp) ##### Added - Added time zones support via [`@date-fns/tz`](https://redirect.github.com/date-fns/tz)'s `TZDate` class and `tz` helper function. See its [README](https://redirect.github.com/date-fns/tz) 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: ```ts 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`. ```ts clamp(Date.now(), { start: new TZDate(start, "Asia/Singapore"), end: new UTCDate(), }); //=> TZDate ``` - **BREAKING**: This release contains a bunch of types changes that should not affect the library's expected usage. The changes are primarily internal and nuanced, so rather than listing them here, I recommend you running the type checker after the upgrade. If there are unfixable problems, please [open an issue](https://redirect.github.com/date-fns/date-fns/issues/new). - **BREAKING**: The package now is ESM-first. The CommonJS is still support and It should not affect most users, but it might break in certains environments. If you encounter any issues, please [report them](https://redirect.github.com/date-fns/date-fns/issues/new). ##### Fixed - Fixed CDN build compatibility with jQuery and other tools that expose `$` by properly wrapping the code in an IIFE.

Configuration

πŸ“… Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: af8f4a68cfdcb24fa419ed9eb40d8348866b807e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

github-actions[bot] commented 1 month ago
### πŸ’» Website Preview The latest changes are available as preview in: [https://40bc80f0.envelop.pages.dev](https://40bc80f0.envelop.pages.dev)
theguild-bot commented 1 month ago

βœ… Benchmark Results

     βœ“ no_errors
     βœ“ expected_result

     checks.............................................: 100.00% βœ“ 754880      βœ— 0     
     βœ“ { mode:envelop-cache-and-no-internal-tracing }...: 100.00% βœ“ 160966      βœ— 0     
     βœ“ { mode:envelop-cache-jit }.......................: 100.00% βœ“ 336668      βœ— 0     
     βœ“ { mode:envelop-just-cache }......................: 100.00% βœ“ 161424      βœ— 0     
     βœ“ { mode:graphql-js }..............................: 100.00% βœ“ 95822       βœ— 0     
     data_received......................................: 2.9 GB  24 MB/s
     data_sent..........................................: 164 MB  1.4 MB/s
     envelop_init.......................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     envelop_total......................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     event_loop_lag.....................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-and-no-internal-tracing }...: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_context....................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_execute....................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_parse......................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     graphql_validate...................................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-cache-jit }.......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:envelop-just-cache }......................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     βœ“ { mode:graphql-js }..............................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_blocked...................................: avg=2.02Β΅s  min=651ns    med=1.78Β΅s  max=4.3ms   p(90)=2.4Β΅s   p(95)=2.72Β΅s 
     http_req_connecting................................: avg=20ns    min=0s       med=0s      max=1.7ms   p(90)=0s      p(95)=0s     
     http_req_duration..................................: avg=2.88ms  min=154.12Β΅s med=2.79ms  max=47.21ms p(90)=5.44ms  p(95)=6.26ms 
       { expected_response:true }.......................: avg=2.88ms  min=154.12Β΅s med=2.79ms  max=47.21ms p(90)=5.44ms  p(95)=6.26ms 
     βœ“ { mode:envelop-cache-and-no-internal-tracing }...: avg=3.45ms  min=386.77Β΅s med=3.08ms  max=25.6ms  p(90)=5.81ms  p(95)=6.32ms 
     βœ“ { mode:envelop-cache-jit }.......................: avg=1.47ms  min=154.12Β΅s med=1.22ms  max=18.03ms p(90)=2.45ms  p(95)=2.62ms 
     βœ“ { mode:envelop-just-cache }......................: avg=3.43ms  min=440.84Β΅s med=3.04ms  max=23.67ms p(90)=5.78ms  p(95)=6.26ms 
     βœ“ { mode:graphql-js }..............................: avg=5.95ms  min=815.71Β΅s med=5.1ms   max=47.21ms p(90)=9.75ms  p(95)=10.75ms
     http_req_failed....................................: 0.00%   βœ“ 0           βœ— 377440
     http_req_receiving.................................: avg=36.04Β΅s min=12.99Β΅s  med=31.29Β΅s max=10.18ms p(90)=46.82Β΅s p(95)=51.46Β΅s
     http_req_sending...................................: avg=13.86Β΅s min=4.73Β΅s   med=11.05Β΅s max=8.4ms   p(90)=20.22Β΅s p(95)=21.64Β΅s
     http_req_tls_handshaking...........................: avg=0s      min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...................................: avg=2.83ms  min=126.94Β΅s med=2.74ms  max=47.09ms p(90)=5.38ms  p(95)=6.2ms  
     http_reqs..........................................: 377440  3145.293349/s
     iteration_duration.................................: avg=3.17ms  min=362.76Β΅s med=3.05ms  max=47.58ms p(90)=5.75ms  p(95)=6.55ms 
     iterations.........................................: 377440  3145.293349/s
     vus................................................: 10      min=10        max=10  
     vus_max............................................: 20      min=20        max=20