Skip to content

Commit 6577150

Browse files
committed
feat: @notionhq to notion-to-utils
1 parent ab0a631 commit 6577150

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"prepare": "husky install"
1212
},
1313
"dependencies": {
14-
"@notionhq/client": "^2.2.5",
1514
"dayjs": "^1.11.8",
1615
"is-url-superb": "^6.1.0",
1716
"jotai": "^2.8.0",
1817
"lodash": "^4.17.21",
1918
"lqip-modern": "^2.0.0",
2019
"next": "^13.4.4",
20+
"notion-to-utils": "^0.4.4",
2121
"p-map": "^7.0.2",
2222
"react": "^18.2.0",
2323
"react-dom": "^18.2.0",

src/interfaces/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
import {
2-
PageObjectResponse,
3-
MultiSelectPropertyItemObjectResponse,
4-
} from '@notionhq/client/build/src/api-endpoints';
1+
import { PageObjectResponse, MultiSelectPropertyItemObjectResponse } from 'notion-to-utils';
52

63
import { PreviewImage } from '@/interfaces/notion';
7-
export {
8-
type PageObjectResponse,
9-
type GetPageResponse,
10-
} from '@notionhq/client/build/src/api-endpoints';
114

125
export type SelectPropertyResponse = MultiSelectPropertyItemObjectResponse['multi_select'][number];
136
export type SelectColor = SelectPropertyResponse['color'];

src/utils/generateSitemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GetPageResponse } from '@notionhq/client/build/src/api-endpoints';
1+
import { GetPageResponse } from 'notion-to-utils';
22

33
import getSlugsAndDates from '@/utils/getSlugsAndDates';
44

src/utils/notionClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client } from '@notionhq/client';
1+
import { Client } from 'notion-to-utils';
22

33
const notionClient = new Client({
44
auth: process.env.NOTION_TOKEN,

yarn.lock

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@
158158
"@nodelib/fs.scandir" "2.1.5"
159159
fastq "^1.6.0"
160160

161-
"@notionhq/client@^2.2.5":
162-
version "2.2.5"
163-
resolved "https://registry.yarnpkg.com/@notionhq/client/-/client-2.2.5.tgz#8c5152016ea769f2d885327fef45d0ef834f89b2"
164-
integrity sha512-NobSaeSK0DMuxAIy2pg53Iv850tGFxXYEYacFBQgO634L1uwQv7WQCAdeFQpD3kJiEycQfSYv6RGC5VENEXjiQ==
161+
"@notionhq/client@^2.2.15":
162+
version "2.2.15"
163+
resolved "https://registry.yarnpkg.com/@notionhq/client/-/client-2.2.15.tgz#739fc8edb1357a2e2e35d026571fafe17c089606"
164+
integrity sha512-XhdSY/4B1D34tSco/GION+23GMjaS9S2zszcqYkMHo8RcWInymF6L1x+Gk7EmHdrSxNFva2WM8orhC4BwQCwgw==
165165
dependencies:
166166
"@types/node-fetch" "^2.5.10"
167167
node-fetch "^2.6.1"
@@ -2311,6 +2311,13 @@ normalize-url@^7.0.3:
23112311
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-7.2.0.tgz#5317f78cff95f5fa1e76cc0b5e33245c43781e11"
23122312
integrity sha512-uhXOdZry0L6M2UIo9BTt7FdpBDiAGN/7oItedQwPKh8jh31ZlvC8U9Xl/EJ3aijDHaywXTW3QbZ6LuCocur1YA==
23132313

2314+
notion-to-utils@^0.4.4:
2315+
version "0.4.4"
2316+
resolved "https://registry.yarnpkg.com/notion-to-utils/-/notion-to-utils-0.4.4.tgz#d0419a39f14e99b021477e4521c801d3336f8531"
2317+
integrity sha512-Tp0IORqdT3E3yKpHyuuUXcifb2GLpfc6hpbzwUmpMTRD2LlrTP2GBL0QsiiM6yrLyt+k0X8YWyUEu0zp6KPTzg==
2318+
dependencies:
2319+
"@notionhq/client" "^2.2.15"
2320+
23142321
notion-types@^6.16.0:
23152322
version "6.16.0"
23162323
resolved "https://registry.yarnpkg.com/notion-types/-/notion-types-6.16.0.tgz#1c676b180095d14209a6760dd8586db55a115e91"

0 commit comments

Comments
 (0)