Skip to content

Commit

Permalink
feat: update date-fns to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Nov 1, 2024
1 parent 32fbb4b commit d721cc5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/react-notion-x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@types/react": "^18.3.12",
"@types/react-modal": "^3.16.3",
"clipboard-copy": "^4.0.1",
"date-fns": "^2.30.0",
"date-fns": "^4.1.0",
"format-number": "^3.0.0",
"lodash.throttle": "^4.1.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import format from 'date-fns/format/index.js'
import { format } from 'date-fns/format'

export function getCollectionGroups(
collection: any,
Expand Down
20 changes: 10 additions & 10 deletions packages/react-notion-x/src/third-party/eval-formula.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-disable security/detect-non-literal-regexp */
import type * as types from 'notion-types'
import add from 'date-fns/add/index.js'
import format from 'date-fns/format/index.js'
import getDate from 'date-fns/getDate/index.js'
import getDay from 'date-fns/getDay/index.js'
import getHours from 'date-fns/getHours/index.js'
import getMinutes from 'date-fns/getMinutes/index.js'
import getMonth from 'date-fns/getMonth/index.js'
import getYear from 'date-fns/getYear/index.js'
import intervalToDuration from 'date-fns/intervalToDuration/index.js'
import sub from 'date-fns/sub/index.js'
import { add } from 'date-fns/add'
import { format } from 'date-fns/format'
import { getDate } from 'date-fns/getDate'
import { getDay } from 'date-fns/getDay'
import { getHours } from 'date-fns/getHours'
import { getMinutes } from 'date-fns/getMinutes'
import { getMonth } from 'date-fns/getMonth'
import { getYear } from 'date-fns/getYear'
import { intervalToDuration } from 'date-fns/intervalToDuration'
import { sub } from 'date-fns/sub'
import { getDateValue, getTextContent } from 'notion-utils'

export interface EvalFormulaContext {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-notion-x/src/third-party/property.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/function-component-definition */
import type * as types from 'notion-types'
import format from 'date-fns/format/index.js'
import { format } from 'date-fns/format'
import formatNumber from 'format-number'
import { type FormulaResult } from 'notion-types'
import * as React from 'react'
Expand Down
13 changes: 5 additions & 8 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 d721cc5

Please sign in to comment.