Skip to content

Commit 2264834

Browse files
committed
Remove @sanity/types dev dependency
1 parent de84f66 commit 2264834

File tree

6 files changed

+45
-88
lines changed

6 files changed

+45
-88
lines changed

.changeset/blue-pans-learn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"next-sanity": patch
3+
---
4+
5+
Remove `@sanity/types` dev dependency
6+

.github/renovate.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"@sanity/image-url",
3535
"@sanity/presentation-comlink",
3636
"@sanity/preview-url-secret",
37-
"@sanity/types",
3837
"@sanity/webhook",
3938
"@sanity/visual-editing",
4039
"@portabletext/react",

packages/next-sanity/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"devDependencies": {
7575
"@sanity/browserslist-config": "^1.0.5",
7676
"@sanity/tsconfig": "catalog:",
77-
"@sanity/types": "^5.0.1",
7877
"@sanity/webhook": "4.0.4",
7978
"@types/node": "catalog:",
8079
"@types/react": "catalog:",

packages/next-sanity/src/webhook/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type {SanityDocument} from '@sanity/types'
21
import type {NextRequest} from 'next/server'
32

43
import {isValidSignature, SIGNATURE_HEADER_NAME} from '@sanity/webhook'
@@ -12,6 +11,16 @@ export type ParsedBody<T> = {
1211
body: T | null
1312
}
1413

14+
/** @public */
15+
interface SanityDocument {
16+
_id: string
17+
_type: string
18+
_createdAt: string
19+
_updatedAt: string
20+
_rev: string
21+
[key: string]: unknown
22+
}
23+
1524
/**
1625
* Handles parsing the body JSON, and validating its signature. Also waits for Content Lake eventual consistency so you can run your queries
1726
* without worrying about getting stale data.

packages/next-sanity/tsdown.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,5 @@ export default defineConfig({
5353
outputOptions: {hoistTransitiveImports: false},
5454
platform: 'neutral',
5555
minify: 'dce-only',
56-
// Needed to inline the types needed by `next-sanity/webhook`
57-
dts: {resolve: ['@sanity/types']},
5856
ignoreWatch: ['.turbo'],
5957
})

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)