Skip to content

Commit d721cc5

Browse files
feat: update date-fns to latest
1 parent 32fbb4b commit d721cc5

File tree

5 files changed

+18
-21
lines changed

5 files changed

+18
-21
lines changed

packages/react-notion-x/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@types/react": "^18.3.12",
7575
"@types/react-modal": "^3.16.3",
7676
"clipboard-copy": "^4.0.1",
77-
"date-fns": "^2.30.0",
77+
"date-fns": "^4.1.0",
7878
"format-number": "^3.0.0",
7979
"lodash.throttle": "^4.1.1"
8080
},

packages/react-notion-x/src/third-party/collection-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import format from 'date-fns/format/index.js'
1+
import { format } from 'date-fns/format'
22

33
export function getCollectionGroups(
44
collection: any,

packages/react-notion-x/src/third-party/eval-formula.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/* eslint-disable security/detect-non-literal-regexp */
22
import type * as types from 'notion-types'
3-
import add from 'date-fns/add/index.js'
4-
import format from 'date-fns/format/index.js'
5-
import getDate from 'date-fns/getDate/index.js'
6-
import getDay from 'date-fns/getDay/index.js'
7-
import getHours from 'date-fns/getHours/index.js'
8-
import getMinutes from 'date-fns/getMinutes/index.js'
9-
import getMonth from 'date-fns/getMonth/index.js'
10-
import getYear from 'date-fns/getYear/index.js'
11-
import intervalToDuration from 'date-fns/intervalToDuration/index.js'
12-
import sub from 'date-fns/sub/index.js'
3+
import { add } from 'date-fns/add'
4+
import { format } from 'date-fns/format'
5+
import { getDate } from 'date-fns/getDate'
6+
import { getDay } from 'date-fns/getDay'
7+
import { getHours } from 'date-fns/getHours'
8+
import { getMinutes } from 'date-fns/getMinutes'
9+
import { getMonth } from 'date-fns/getMonth'
10+
import { getYear } from 'date-fns/getYear'
11+
import { intervalToDuration } from 'date-fns/intervalToDuration'
12+
import { sub } from 'date-fns/sub'
1313
import { getDateValue, getTextContent } from 'notion-utils'
1414

1515
export interface EvalFormulaContext {

packages/react-notion-x/src/third-party/property.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable react/function-component-definition */
22
import type * as types from 'notion-types'
3-
import format from 'date-fns/format/index.js'
3+
import { format } from 'date-fns/format'
44
import formatNumber from 'format-number'
55
import { type FormulaResult } from 'notion-types'
66
import * as React from 'react'

pnpm-lock.yaml

Lines changed: 5 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)