Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
18 stars 31 forks source link

Update dependency @date-io/moment to v3 (v3) #2738

Closed renovate[bot] closed 4 days ago

renovate[bot] commented 5 days ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@date-io/moment 1.3.13 -> 3.0.0 age adoption passing confidence

Release Notes

dmtrKovalenko/date-io (@​date-io/moment) ### [`v3.0.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v3.0.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.17.0...v3.0.0) #### Breaking changes: - chore(deps): bump date-fns to v3 by [@​frsimond](https://redirect.github.com/frsimond) in [https://github.com/dmtrKovalenko/date-io/pull/656](https://redirect.github.com/dmtrKovalenko/date-io/pull/656) This involves peer lib version upgrade please make sure that some underlying localised formats might be changed as well - feat: Remove date-io/type definition by [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) in [https://github.com/dmtrKovalenko/date-io/pull/657](https://redirect.github.com/dmtrKovalenko/date-io/pull/657) The type inference that doesn't work with modern typescript was removed. Please make sure to upgrade typescript to v5 - feat: Improve utils.date typescript typings by [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) in [https://github.com/dmtrKovalenko/date-io/pull/658](https://redirect.github.com/dmtrKovalenko/date-io/pull/658) Changed signature of `Utils.date` and the underlying logic. Now if the value can't be parsed returns current date instead of `null`. #### Other changes - fix(js-jods): Proper support for date-only and time-only in mergeDateAndTime method by [@​joshkel](https://redirect.github.com/joshkel) in [https://github.com/dmtrKovalenko/date-io/pull/653](https://redirect.github.com/dmtrKovalenko/date-io/pull/653) You can support the maintenance of this project by visiting https://github.com/sponsors/dmtrKovalenko. Your support will help us respond faster and deliver requested features. We extend our heartfelt thanks to our contributors and sponsors ❤️. #### New Contributors - [@​frsimond](https://redirect.github.com/frsimond) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/656](https://redirect.github.com/dmtrKovalenko/date-io/pull/656) - [@​joshkel](https://redirect.github.com/joshkel) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/653](https://redirect.github.com/dmtrKovalenko/date-io/pull/653) **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.17.0...v3.0.0 ### [`v2.17.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.17.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.16.1...v2.17.0) #### New features - feat: isBeforeMonth and isAfterMonth by [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) in [https://github.com/dmtrKovalenko/date-io/pull/648](https://redirect.github.com/dmtrKovalenko/date-io/pull/648) #### What's Changed - chore(build): change build to target `ES6` by [@​LukasTy](https://redirect.github.com/LukasTy) in [https://github.com/dmtrKovalenko/date-io/pull/645](https://redirect.github.com/dmtrKovalenko/date-io/pull/645) - fix(luxon): Use `DateTime.isDateTime` instead of `instanceof` by [@​alex-kuck](https://redirect.github.com/alex-kuck) in [https://github.com/dmtrKovalenko/date-io/pull/639](https://redirect.github.com/dmtrKovalenko/date-io/pull/639) - Unfiy behavior across adapter in invalid scenarios [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) in [https://github.com/dmtrKovalenko/date-io/pull/650](https://redirect.github.com/dmtrKovalenko/date-io/pull/650) - Improve typescript typing and support [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) in [https://github.com/dmtrKovalenko/date-io/pull/650](https://redirect.github.com/dmtrKovalenko/date-io/pull/650) #### New Contributors - [@​LukasTy](https://redirect.github.com/LukasTy) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/645](https://redirect.github.com/dmtrKovalenko/date-io/pull/645) - [@​alex-kuck](https://redirect.github.com/alex-kuck) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/639](https://redirect.github.com/dmtrKovalenko/date-io/pull/639) **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.16.1...v2.17.0 ### [`v2.16.1`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.16.1) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.16.0...v2.16.1) #### Fixes - Do not error when the second argument does not have a time part by [@​dspiteself](https://redirect.github.com/dspiteself) in [https://github.com/dmtrKovalenko/date-io/pull/628](https://redirect.github.com/dmtrKovalenko/date-io/pull/628) - \[moment] use this.locale when specified by [@​alexfauquette](https://redirect.github.com/alexfauquette) in [https://github.com/dmtrKovalenko/date-io/pull/630](https://redirect.github.com/dmtrKovalenko/date-io/pull/630) - \[luxon] fix: use the day of the month instead of a day of week in keyboard format by [@​alexfauquette](https://redirect.github.com/alexfauquette) in [https://github.com/dmtrKovalenko/date-io/pull/632](https://redirect.github.com/dmtrKovalenko/date-io/pull/632) - Add peer dependency support for Luxon 3 by [@​trevorr](https://redirect.github.com/trevorr) in [https://github.com/dmtrKovalenko/date-io/pull/629](https://redirect.github.com/dmtrKovalenko/date-io/pull/629) #### New Contributors - [@​trevorr](https://redirect.github.com/trevorr) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/629](https://redirect.github.com/dmtrKovalenko/date-io/pull/629) **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.16.0...v2.16.1 ### [`v2.16.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.16.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.15.0...v2.16.0) ##### What's Changed - feat: new methods `setDate` / `getDate` by [@​flaviendelangle](https://redirect.github.com/flaviendelangle) in [https://github.com/dmtrKovalenko/date-io/pull/625](https://redirect.github.com/dmtrKovalenko/date-io/pull/625) **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.15.0...v2.16.0 ### [`v2.15.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.15.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.14.0...v2.15.0) #### What's Changed - feat: New method `addYears` by [@​flaviendelangle](https://redirect.github.com/flaviendelangle) in [https://github.com/dmtrKovalenko/date-io/pull/623](https://redirect.github.com/dmtrKovalenko/date-io/pull/623) - chore(deps-dev): bump moment from 2.29.1 to 2.29.4 by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/dmtrKovalenko/date-io/pull/622](https://redirect.github.com/dmtrKovalenko/date-io/pull/622) **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.14.0...v2.15.0 ### [`v2.14.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.14.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.13.2...v2.14.0) ##### What's Changed - feat: New methods `startOfYear` and `endOfYear` by [@​flaviendelangle](https://redirect.github.com/flaviendelangle) in [https://github.com/dmtrKovalenko/date-io/pull/614](https://redirect.github.com/dmtrKovalenko/date-io/pull/614) - Remove useless date clone in dayjs adapter by [@​flaviendelangle](https://redirect.github.com/flaviendelangle) in [https://github.com/dmtrKovalenko/date-io/pull/615](https://redirect.github.com/dmtrKovalenko/date-io/pull/615) ##### New Collaborator - Welcome [@​flaviendelangle](https://redirect.github.com/flaviendelangle) as a collaborator on this project! **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.13.2...v2.14.0 ### [`v2.13.2`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.13.2) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.13.1...v2.13.2) ##### What's Changed - Fix typo in doc by [@​alexfauquette](https://redirect.github.com/alexfauquette) in [https://github.com/dmtrKovalenko/date-io/pull/612](https://redirect.github.com/dmtrKovalenko/date-io/pull/612) - Fix incorrect date validation from dayjs by [@​RCout1nho](https://redirect.github.com/RCout1nho) in [https://github.com/dmtrKovalenko/date-io/pull/608](https://redirect.github.com/dmtrKovalenko/date-io/pull/608) ##### New Contributors - [@​alexfauquette](https://redirect.github.com/alexfauquette) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/612](https://redirect.github.com/dmtrKovalenko/date-io/pull/612) - [@​RCout1nho](https://redirect.github.com/RCout1nho) made their first contribution in [https://github.com/dmtrKovalenko/date-io/pull/608](https://redirect.github.com/dmtrKovalenko/date-io/pull/608) **Full Changelog**: https://github.com/dmtrKovalenko/date-io/compare/v2.13.1...v2.13.2 ### [`v2.13.1`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.11.0...v2.13.1) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.11.0...v2.13.1) ### [`v2.11.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.11.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.11...v2.11.0) ##### Features - `parseISO` – will parse date using library method to avoid inconsistencies between browsers - `toISO` – will format date to iso string using library ##### Fixes/Enhancements - Better "AM/PM" localisation with `dayjs` ### [`v2.10.11`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.10.11) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.8...v2.10.11) #### Changelog - Make days adapter to be generic and accept any custom extended days instance as `DayJsAdapter` - Update a lot of dependencies ### [`v2.10.8`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.7...v2.10.8) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.7...v2.10.8) ### [`v2.10.7`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.10.7) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.6...v2.10.7) #### Changelog Some bugfixes and dependency updates: - fix: getMeridiemText() from moment utils now returns translated text ([#​478](https://redirect.github.com/dmtrKovalenko/date-io/issues/478)) [@​ScripterSugar](https://redirect.github.com/ScripterSugar) [@​FairySugar](https://redirect.github.com/FairySugar) - chore: Refactor class methods to arrow functions ([#​483](https://redirect.github.com/dmtrKovalenko/date-io/issues/483)) [@​nikita-rudenko](https://redirect.github.com/nikita-rudenko) [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) - fix: Daylight bug in safari ([#​530](https://redirect.github.com/dmtrKovalenko/date-io/issues/530)) [@​smmoosavi](https://redirect.github.com/smmoosavi) - chore(docs:): create library-perspective docs, closes [#​208](https://redirect.github.com/dmtrKovalenko/date-io/issues/208) ### [`v2.10.6`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.10.6) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.5...v2.10.6) This release is finally fixing the problem of outdated builds of published `date-io/*` releases. > We apologize 🙏 for this publishing issues causing 2.10.0-2.10.5 releases. If you installed any of these versions please update to the latest, those builds are broken and deprecated on npm. From now on versions of `@date-io/*` will always be synchronized with `@date-io/core` package and will never cause version conflict or be outdated. ### [`v2.10.5`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.4...v2.10.5) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.4...v2.10.5) ### [`v2.10.4`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.1...v2.10.4) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.10.0...v2.10.4) ### [`v2.10.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.10.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.9.2...v2.10.0) ##### Features - Allow to pass units to diff method ([#​445](https://redirect.github.com/dmtrKovalenko/date-io/issues/445)) [@​andriyor](https://redirect.github.com/andriyor) - New: addSeconds, addHours, addMinutes, addWeeks ([#​447](https://redirect.github.com/dmtrKovalenko/date-io/issues/447)) [@​andriyor](https://redirect.github.com/andriyor) ### [`v2.9.2`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.9.0...v2.9.2) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.9.0...v2.9.2) ### [`v2.9.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.9.0): 2.9.0 [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.8.1...v2.9.0) #### Features - Add new `getDaysInMonth` method ### [`v2.8.1`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.8.1) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.8.0...v2.8.1) #### Features - Add `lib` name to the adapter interface #### Fixes - Remove prettier import, closes [#​442](https://redirect.github.com/dmtrKovalenko/date-io/issues/442) - \[Luxon] Properly apply locale for parsed and created date ([#​443](https://redirect.github.com/dmtrKovalenko/date-io/issues/443)) - A lot of dependency updates ### [`v2.8.0`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.6.2...v2.8.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.7.0...v2.8.0) ### [`v2.7.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.7.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.6.0...v2.7.0) #### Features 🎉 - Introduce new DateFnsJalali adapter ([#​405](https://redirect.github.com/dmtrKovalenko/date-io/issues/405)) [@​c0m1t](https://redirect.github.com/c0m1t) - Add fullDateWithWeekday, weekday and weekdayShort formatters ([#​400](https://redirect.github.com/dmtrKovalenko/date-io/issues/400)) [@​philipbulley](https://redirect.github.com/philipbulley) #### Fixes 🐛 | Enhancements 🧇 - Fix mutation of date param in formatByString ([#​394](https://redirect.github.com/dmtrKovalenko/date-io/issues/394)) [@​crudh](https://redirect.github.com/crudh) - Correctly pass locale in parse methods for luxon and moment ([#​401](https://redirect.github.com/dmtrKovalenko/date-io/issues/401)) [@​cbranch101](https://redirect.github.com/cbranch101) - \[DateFns] Pass locale to the parse ([#​406](https://redirect.github.com/dmtrKovalenko/date-io/issues/406)) [@​PaulSavignano](https://redirect.github.com/PaulSavignano) ### [`v2.6.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.6.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.5.1...v2.6.0) ##### Breaking changes N/A ##### Features - Introduce new getFormatHelperText method ([#​340](https://redirect.github.com/dmtrKovalenko/date-io/issues/340)) ##### Fixes - \[docs] Improve documentation and fix a typo ([#​328](https://redirect.github.com/dmtrKovalenko/date-io/issues/328)) [@​winestone](https://redirect.github.com/winestone) - Include seconds in mergeDateAndTime method ([#​341](https://redirect.github.com/dmtrKovalenko/date-io/issues/341)) [@​dmtrKovalenko](https://redirect.github.com/dmtrKovalenko) ### [`v2.5.1`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.5.1) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.5.0...v2.5.1) This release is only fixing inclusivity rules of `isWithinRange` method. ### [`v2.5.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.5.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.4.0...v2.5.0) #### Breaking changes N/A #### Features New functions: - `isWithinRange: (date: TDate, range: [TDate, TDate]) => boolean` - `addMonths: (date: TDate, monthCount: number) => TDate` ### [`v2.4.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.4.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.3.0...v2.4.0) Add 2 new functions: - `startOfWeek(date: TDate): TDate` - returns start of week - `endOfWeek(date: TDate): TDate` - returns end of week ### [`v2.3.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.3.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.2.0...v2.3.0) #### Changes - Add new `toJsDate` function converting lib object to native js date ### [`v2.2.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.2.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.1.0...v2.2.0) #### Localization improvements release We have changed the formats tokens to use localized formats tokens everywhere possible. Also introduced several new methods and formats List of new methods added: - is12HourCycleInCurrentLocale(): boolean - determine is 12 hours cycle and ampm used in current locale - getCurrentLocaleCode - get locale code ### [`v2.1.0`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.0.1...v2.1.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.0.1...v2.1.0) ### [`v2.0.1`](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.0.0...v2.0.1) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v2.0.0...v2.0.1) ### [`v2.0.0`](https://redirect.github.com/dmtrKovalenko/date-io/releases/tag/v2.0.0) [Compare Source](https://redirect.github.com/dmtrKovalenko/date-io/compare/v1.3.13...v2.0.0) ### Major upgrade #### **Do not update if you are using [@​material-ui/pickers](https://redirect.github.com/material-ui/pickers) v3** ##### Breaking changes - Remove all static format fields like `dateTimeFormat` - Introduce new object for cross utils formatting. It is overridable via constructor `formats` prop and provides easy localization formatting ```ts export interface DateIOFormats { /** Full date, useful for accessibility @​example "2019, January 1st" */ fullDate: string; /** Day format string extremely required to localize @​example "Wed, Jan 1st" for US, "January 1st" for Europe */ normalDate: string; /** Shorter day format @​example "Jan 1st" */ shortDate: string; /** Year format string @​example "2019" */ year: string; /** Month format string @​example "January" */ month: string; /** Short month format string @​example "Jan" */ monthShort: string; /** Short month format string @​example "January 2018" */ monthAndYear: string; /** Month with date format string @​example "January 1st" */ monthAndDate: string; /** Day format string @​example "12" */ dayOfMonth: string; /** Full time format string @​example "11:44 PM" */ fullTime12h: string; /** Full time format string @​example "23:59" */ fullTime24h: string; /** Hours format string @​example "11" */ hours12h: string; /** Hours format string @​example "23" */ hours24h: string; /** Minutes format string @​example "59" */ minutes: string; /** Seconds format string @​example "59" */ seconds: string; /** Date & Time format string @​example "2018, Jan 1st 11:44 PM" */ fullDateTime12h: string; /** Date & Time format string @​example "2018, Jan 1st 23:44" */ fullDateTime24h: string; /** Keyboard input friendly date format @​example "2019/01/01" */ keyboardDate: string; /** Keyboard input friendly date/time 12h format @​example "2019/01/01 23:44" */ keyboardDateTime12h: string; /** Keyboard input friendly date/time 24h format @​example "2019/01/01 11:44 PM" */ keyboardDateTime24h: string; } ``` - `format` method now has signature `(date: TDate, formatKey: keyof IDateIOFormat) => string` in order to simplify formatting using new format keys - `formatByString` allowes to use custom (mostly user-provided) format strings ` formatByString(value: TDate, formatString: string): string; `

Configuration

📅 Schedule: Branch creation - "before 07:00 on Thursday" in timezone Europe/Oslo, 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.

renovate[bot] commented 4 days ago

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 3.x releases. But if you manually upgrade to 3.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.