Skip to content

Commit

Permalink
chore(deps): bump date-fns from 2.30.0 to 3.3.1 (#1305)
Browse files Browse the repository at this point in the history
* chore(deps): bump date-fns from 2.30.0 to 3.3.1

Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.30.0 to 3.3.1.
- [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...v3.3.1)

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

Signed-off-by: dependabot[bot] <[email protected]>

* docs(date): changeset

* fix(date): update Locale interface according to [email protected]

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Øyvind Eikeland <[email protected]>
  • Loading branch information
dependabot[bot] and eikeland authored Apr 8, 2024
1 parent 258e2c0 commit 0395f58
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-eagles-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@equinor/fusion-wc-date": patch
---

Update date-fns from 2.30.0 to 3.3.1
2 changes: 1 addition & 1 deletion packages/date/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@equinor/fusion-wc-core": "workspace:^",
"@equinor/fusion-web-theme": "^0.1.10",
"date-fns": "^2.29.3",
"date-fns": "^3.3.1",
"lit": "3.1.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/date/src/daterange/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { html, LitElement, PropertyValues, TemplateResult } from 'lit';
import { property } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { formatDistance, formatRelative } from 'date-fns';
import { enGB } from 'date-fns/locale';
import { enGB, type Locale } from 'date-fns/locale';
import { DateRangeVariant, DateTimeFormat, WeekDay } from '../types';
import { dateConverter, resolveLocale } from '../utils';

Expand Down
1 change: 1 addition & 0 deletions packages/date/src/utils/resolve-locale.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as locales from 'date-fns/locale';
import type { Locale } from 'date-fns/locale';

export const resolveLocale = (localeName: string): Locale => {
return locales[localeName as keyof typeof locales];
Expand Down
11 changes: 4 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0395f58

Please sign in to comment.