Build(deps): bump date-fns from 2.30.0 to 3.0.3 #1604

Merged
argoyle merged 1 commits from dependabot-npm_and_yarn-date-fns-3.0.3 into master 2023-12-21 20:54:58 +00:00
argoyle commented 2023-12-21 04:40:16 +00:00 (Migrated from gitlab.com)

Bumps date-fns from 2.30.0 to 3.0.3.

Release notes

Sourced from date-fns's releases.

v3.0.3

Fixed

  • Rolled back pointing ESM types to the same d.ts files. Instead, now it copies the content to avoid the Masquerading as CJS problem reported by "Are the types wrong?".

v3.0.2

Fixed

v3.0.1

Fixed

  • Fixed an error in certain environments caused by d.mts files exporting only types.

v3.0.0

Changed

  • BREAKING: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the package.json. The ESM files now have .mjs extension.

  • BREAKING: The package now has a flat structure, meaning functions are now named node_modules/date-fns/add.mjs, locales are node_modules/date-fns/locale/enUS.mjs, etc.

  • BREAKING: Now all file content’s exported via named exports instead of export default, which will require change direct imports i.e. const addDays = require(‘date-fns/addDays’) to const { addDays } = require(‘date-fns/addDays’).

  • BREAKING: TypeScript types are now completely rewritten, check out the d.ts files for more information.

  • BREAKING: constants now is not exported via the index, so to import one use import { daysInYear } from "date-fns/constants";. It improves compatibility with setups that modularize imports like Next.js.

  • BREAKING: Functions now don’t check the number of passed arguments, delegating this task to type checkers. The functions are now slimmer because of this.

  • BREAKING The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.

  • BREAKING: Functions that accept Interval arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an Invalid Date, these functions also do not throw and handle them as invalid intervals.

    • areIntervalsOverlapping normalize intervals before comparison, so { start: a, end: b } is practically equivalent to { start: b, end: a }. When comparing intervals with one of the properties being Invalid Date, the function will return false unless the others are valid and equal, given the inclusive option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return false.

    • getOverlappingDaysInIntervals now normalizes intervals before comparison, so { start: a, end: b } is practically equivalent to { start: b, end: a }. If any of the intervals’ properties is an Invalid Date, the function will always return 0.

    • isWithinInterval now normalizes intervals before comparison, so { start: a, end: b } is practically equivalent to { start: b, end: a }. If any of the intervals’ properties is an Invalid Date, the function will always return false.

    • intervalToDuration now returns negative durations for negative intervals. If one or both of the interval properties are invalid, the function will return an empty object.

    • The eachXOfInterval functions (eachDayOfInterval, eachHourOfInterval, eachMinuteOfInterval, eachMonthOfInterval, eachWeekendOfInterval, eachWeekendOfMonth, eachWeekendOfYear, eachWeekOfInterval, eachYearOfInterval) now return a reversed array if the passed interval’s start is after the end. Invalid properties will result in an empty array. Functions that accept the step option now also allow negative, 0, and NaN values and return reversed results if the step is negative and an empty array otherwise.

  • BREAKING: intervalToDuration now skips 0 values in the resulting duration, resulting in more compact objects with only relevant properties.

... (truncated)

Changelog

Sourced from date-fns's changelog.

v3.0.3 - 2023-12-21

Fixed

  • Rolled back pointing ESM types to the same d.ts files. Instead now it copies the content to avoid the Masquerading as CJS problem reported by "Are the types wrong?".

v3.0.2 - 2023-12-21

Fixed

v3.0.1 - 2023-12-20

Fixed

  • Fixed an error in certain environments caused by d.mts files exporting only types.

v3.0.0 - 2023-12-18

Changed

  • BREAKING: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the package.json. The ESM files now have .mjs extension.

  • BREAKING: The package now has a flat structure, meaning functions are now named node_modules/date-fns/add.mjs, locales are node_modules/date-fns/locale/enUS.mjs, etc.

  • BREAKING: Now all file content’s exported via named exports instead of export default, which will require change direct imports i.e. const addDays = require(‘date-fns/addDays’) to const { addDays } = require(‘date-fns/addDays’).

  • BREAKING: TypeScript types are now completely rewritten, check out the d.ts files for more information.

  • BREAKING: constants now is not exported via the index, so to import one use import { daysInYear } from "date-fns/constants";. It improves compatibility with setups that modularize imports like Next.js.

  • BREAKING: Functions now don’t check the number of passed arguments, delegating this task to type checkers. The functions are now slimmer because of this.

  • BREAKING The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.

  • BREAKING: Functions that accept Interval arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an Invalid Date, these functions also do not throw and handle them as invalid intervals.

    • areIntervalsOverlapping normalize intervals before comparison, so { start: a, end: b } is practically equivalent to { start: b, end: a }. When comparing intervals with one of the properties being Invalid Date, the function will return false unless the others are valid and equal, given the inclusive option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return false.

    • getOverlappingDaysInIntervals now normalizes intervals before comparison, so { start: a, end: b } is practically equivalent to { start: b, end: a }. If any of the intervals’ properties is an Invalid Date, the function will always return 0.

    • isWithinInterval now normalizes intervals before comparison, so { start: a, end: b } is practically equivalent to { start: b, end: a }. If any of the intervals’ properties is an Invalid Date, the function will always return false.

    • intervalToDuration now returns negative durations for negative intervals. If one or both of the interval properties are invalid, the function will return an empty object.

... (truncated)

Commits
  • d1773c3 Promote to v3.0.3
  • 647334b Copy d.mts files instead
  • 138e318 Revert "Fix ESM types problem by removing d.mts"
  • 70cfd9b Promote to v3.0.2
  • e86a5be Add change log entry for v3.0.2
  • fe8868e Fix ESM types problem by removing d.mts
  • 25c8237 Add package.json to exports
  • fdb7c7c Removed Flow from README with v3.0.0 (#3619)
  • 7461f65 Fix TypeScript 5.4 build break
  • 2b588a1 Add docs & blog links to README
  • Additional commits viewable in compare view


Dependabot commands
You can trigger Dependabot actions by commenting on this MR
  • $dependabot recreate will recreate this MR rewriting all the manual changes and resolving conflicts
Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.30.0 to 3.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/date-fns/date-fns/releases">date-fns's releases</a>.</em></p> <blockquote> <h2>v3.0.3</h2> <h3>Fixed</h3> <ul> <li>Rolled back pointing ESM types to the same <code>d.ts</code> files. Instead, now it copies the content to avoid <a href="https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md">the Masquerading as CJS problem</a> reported by &quot;Are the types wrong?&quot;.</li> </ul> <h2>v3.0.2</h2> <h3>Fixed</h3> <ul> <li> <p>Fixed <a href="https://github.com/date-fns/date-fns/issues/3620">yet another issue caused by ESM types</a> by pointing to the same <code>d.ts</code> files.</p> </li> <li> <p><a href="https://github.com/date-fns/date-fns/pull/3601">Added <code>package.json</code> to exports</a> to provide access to tooling.</p> </li> <li> <p><a href="https://github.com/date-fns/date-fns/pull/3598">Fixed TypeScript 5.4 build break</a> by using the latest type names.</p> </li> </ul> <h2>v3.0.1</h2> <h2>Fixed</h2> <ul> <li><a href="https://github.com/date-fns/date-fns/pull/3618">Fixed an error</a> in certain environments caused by <code>d.mts</code> files exporting only types.</li> </ul> <h2>v3.0.0</h2> <h2>Changed</h2> <ul> <li> <p><strong>BREAKING</strong>: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the <code>package.json</code>. The ESM files now have <code>.mjs</code> extension.</p> </li> <li> <p><strong>BREAKING</strong>: The package now has a flat structure, meaning functions are now named <code>node_modules/date-fns/add.mjs</code>, locales are <code>node_modules/date-fns/locale/enUS.mjs</code>, etc.</p> </li> <li> <p><strong>BREAKING</strong>: Now all file content’s exported via named exports instead of <code>export default</code>, which will require change direct imports i.e. <code>const addDays = require(‘date-fns/addDays’)</code> to <code>const { addDays } = require(‘date-fns/addDays’)</code>.</p> </li> <li> <p><strong>BREAKING</strong>: TypeScript types are now completely rewritten, check out the <code>d.ts</code> files for more information.</p> </li> <li> <p><strong>BREAKING</strong>: <code>constants</code> now is not exported via the index, so to import one use <code>import { daysInYear } from &quot;date-fns/constants&quot;;</code>. It improves compatibility with setups that modularize imports <a href="https://twitter.com/kossnocorp/status/1731181274579325260">like Next.js</a>.</p> </li> <li> <p><strong>BREAKING</strong>: Functions now don’t check the number of passed arguments, delegating this task to type checkers. The functions are now slimmer because of this.</p> </li> <li> <p><strong>BREAKING</strong> The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.</p> </li> <li> <p><strong>BREAKING</strong>: Functions that accept <code>Interval</code> arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an <code>Invalid Date</code>, these functions also do not throw and handle them as invalid intervals.</p> <ul> <li> <p><code>areIntervalsOverlapping</code> normalize intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. When comparing intervals with one of the properties being <code>Invalid Date</code>, the function will return false unless the others are valid and equal, given the <code>inclusive</code> option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return <code>false</code>.</p> </li> <li> <p><code>getOverlappingDaysInIntervals</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return 0.</p> </li> <li> <p><code>isWithinInterval</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return false.</p> </li> <li> <p><code>intervalToDuration</code> now returns negative durations for negative intervals. If one or both of the interval properties are invalid, the function will return an empty object.</p> </li> <li> <p>The eachXOfInterval functions (<code>eachDayOfInterval</code>, <code>eachHourOfInterval</code>, <code>eachMinuteOfInterval</code>, <code>eachMonthOfInterval</code>, <code>eachWeekendOfInterval</code>, <code>eachWeekendOfMonth</code>, <code>eachWeekendOfYear</code>, <code>eachWeekOfInterval</code>, <code>eachYearOfInterval</code>) now return a reversed array if the passed interval’s start is after the end. Invalid properties will result in an empty array. Functions that accept the <code>step</code> option now also allow negative, 0, and NaN values and return reversed results if the step is negative and an empty array otherwise.</p> </li> </ul> </li> <li> <p><strong>BREAKING</strong>: <code>intervalToDuration</code> now skips 0 values in the resulting duration, resulting in more compact objects with only relevant properties.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/date-fns/date-fns/blob/main/CHANGELOG.md">date-fns's changelog</a>.</em></p> <blockquote> <h2>v3.0.3 - 2023-12-21</h2> <h3>Fixed</h3> <ul> <li>Rolled back pointing ESM types to the same <code>d.ts</code> files. Instead now it copies the content to avoid <a href="https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md">the Masquerading as CJS problem</a> reported by &quot;Are the types wrong?&quot;.</li> </ul> <h2>v3.0.2 - 2023-12-21</h2> <h3>Fixed</h3> <ul> <li> <p>Fixed <a href="https://github.com/date-fns/date-fns/issues/3620">yet another issue caused by ESM types</a> by pointing to the same <code>d.ts</code> files.</p> </li> <li> <p><a href="https://github.com/date-fns/date-fns/pull/3601">Added <code>package.json</code> to exports</a> to provide access to tooling.</p> </li> <li> <p><a href="https://github.com/date-fns/date-fns/pull/3598">Fixed TypeScript 5.4 build break</a> by using the latest type names.</p> </li> </ul> <h2>v3.0.1 - 2023-12-20</h2> <h3>Fixed</h3> <ul> <li><a href="https://github.com/date-fns/date-fns/pull/3618">Fixed an error</a> in certain environments caused by <code>d.mts</code> files exporting only types.</li> </ul> <h2>v3.0.0 - 2023-12-18</h2> <h3>Changed</h3> <ul> <li> <p><strong>BREAKING</strong>: date-fns is now a dual-package with the support of both ESM and CommonJS. The files exports are now explicitly in the <code>package.json</code>. The ESM files now have <code>.mjs</code> extension.</p> </li> <li> <p><strong>BREAKING</strong>: The package now has a flat structure, meaning functions are now named <code>node_modules/date-fns/add.mjs</code>, locales are <code>node_modules/date-fns/locale/enUS.mjs</code>, etc.</p> </li> <li> <p><strong>BREAKING</strong>: Now all file content’s exported via named exports instead of <code>export default</code>, which will require change direct imports i.e. <code>const addDays = require(‘date-fns/addDays’)</code> to <code>const { addDays } = require(‘date-fns/addDays’)</code>.</p> </li> <li> <p><strong>BREAKING</strong>: TypeScript types are now completely rewritten, check out the <code>d.ts</code> files for more information.</p> </li> <li> <p><strong>BREAKING</strong>: <code>constants</code> now is not exported via the index, so to import one use <code>import { daysInYear } from &quot;date-fns/constants&quot;;</code>. It improves compatibility with setups that modularize imports <a href="https://twitter.com/kossnocorp/status/1731181274579325260">like Next.js</a>.</p> </li> <li> <p><strong>BREAKING</strong>: Functions now don’t check the number of passed arguments, delegating this task to type checkers. The functions are now slimmer because of this.</p> </li> <li> <p><strong>BREAKING</strong> The arguments are not explicitly converted to the target types. Instead, they are passed as is, delegating this task to type checkers.</p> </li> <li> <p><strong>BREAKING</strong>: Functions that accept <code>Interval</code> arguments now do not throw an error if the start is before the end and handle it as a negative interval. If one of the properties in an <code>Invalid Date</code>, these functions also do not throw and handle them as invalid intervals.</p> <ul> <li> <p><code>areIntervalsOverlapping</code> normalize intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. When comparing intervals with one of the properties being <code>Invalid Date</code>, the function will return false unless the others are valid and equal, given the <code>inclusive</code> option is passed. Otherwise, and when even one of the intervals has both properties invalid, the function will always return <code>false</code>.</p> </li> <li> <p><code>getOverlappingDaysInIntervals</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return 0.</p> </li> <li> <p><code>isWithinInterval</code> now normalizes intervals before comparison, so <code>{ start: a, end: b }</code> is practically equivalent to <code>{ start: b, end: a }</code>. If any of the intervals’ properties is an <code>Invalid Date</code>, the function will always return false.</p> </li> <li> <p><code>intervalToDuration</code> now returns negative durations for negative intervals. If one or both of the interval properties are invalid, the function will return an empty object.</p> </li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/date-fns/date-fns/commit/d1773c3b5469289750a70759ad5f7bee1f49ecc4"><code>d1773c3</code></a> Promote to v3.0.3</li> <li><a href="https://github.com/date-fns/date-fns/commit/647334b4d130ae2ae1381d1a59966891dba035a4"><code>647334b</code></a> Copy d.mts files instead</li> <li><a href="https://github.com/date-fns/date-fns/commit/138e31895204f98e25ea5b66723f25870be2a715"><code>138e318</code></a> Revert &quot;Fix ESM types problem by removing d.mts&quot;</li> <li><a href="https://github.com/date-fns/date-fns/commit/70cfd9b5ad3ec8400b07c2377d5e8dd65b04d9c0"><code>70cfd9b</code></a> Promote to v3.0.2</li> <li><a href="https://github.com/date-fns/date-fns/commit/e86a5be2b9944f942599f205dd819de9077a261c"><code>e86a5be</code></a> Add change log entry for v3.0.2</li> <li><a href="https://github.com/date-fns/date-fns/commit/fe8868eded5022fd50f57d8fb572431d87089db7"><code>fe8868e</code></a> Fix ESM types problem by removing d.mts</li> <li><a href="https://github.com/date-fns/date-fns/commit/25c8237ad90578bc2eb44b436ed4871d0972e0f8"><code>25c8237</code></a> Add package.json to exports</li> <li><a href="https://github.com/date-fns/date-fns/commit/fdb7c7c24727a4ea04187cbd22099c3e38aa431d"><code>fdb7c7c</code></a> Removed Flow from README with v3.0.0 (<a href="https://github.com/date-fns/date-fns/issues/3619">#3619</a>)</li> <li><a href="https://github.com/date-fns/date-fns/commit/7461f6539715188126347727e55c6d8650b34fd8"><code>7461f65</code></a> Fix TypeScript 5.4 build break</li> <li><a href="https://github.com/date-fns/date-fns/commit/2b588a11dbca9f00cf52fab111db3457fa840cd9"><code>2b588a1</code></a> Add docs &amp; blog links to README</li> <li>Additional commits viewable in <a href="https://github.com/date-fns/date-fns/compare/v2.30.0...v3.0.3">compare view</a></li> </ul> </details> <br /> --- <details> <summary>Dependabot commands</summary> <br /> You can trigger Dependabot actions by commenting on this MR - `$dependabot recreate` will recreate this MR rewriting all the manual changes and resolving conflicts </details>
argoyle commented 2023-12-21 04:40:20 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1551

mentioned in merge request !1551
argoyle commented 2023-12-21 20:48:17 +00:00 (Migrated from gitlab.com)

added 1 commit

  • e5b63603 - Build(deps): bump date-fns from 2.30.0 to 3.0.3

Compare with previous version

added 1 commit <ul><li>e5b63603 - Build(deps): bump date-fns from 2.30.0 to 3.0.3</li></ul> [Compare with previous version](/unboundsoftware/dancefinder/dancefinder-app/-/merge_requests/1555/diffs?diff_id=879403068&start_sha=f99f86fe71abbbb5de46223d08c60f8802e60f35)
argoyle commented 2023-12-21 20:48:36 +00:00 (Migrated from gitlab.com)

added 2 commits

  • dc389a0d - 1 commit from branch master
  • 10ec605a - Build(deps): bump date-fns from 2.30.0 to 3.0.3

Compare with previous version

added 2 commits <ul><li>dc389a0d - 1 commit from branch <code>master</code></li><li>10ec605a - Build(deps): bump date-fns from 2.30.0 to 3.0.3</li></ul> [Compare with previous version](/unboundsoftware/dancefinder/dancefinder-app/-/merge_requests/1555/diffs?diff_id=879403196&start_sha=e5b636035680436154af1e25a95370478e84192d)
argoyle (Migrated from gitlab.com) scheduled this pull request to auto merge when all checks succeed 2023-12-21 20:48:58 +00:00
argoyle (Migrated from gitlab.com) merged commit into master 2023-12-21 20:54:58 +00:00
Sign in to join this conversation.