Skip to content

Releases: sanity-io/next-sanity

v3.0.1

22 Nov 13:57
Compare
Choose a tag to compare

3.0.1 (2022-11-22)

Bug Fixes

  • add <meta charset="utf-8"> in Next 13 (a4e9e1a)
  • don't negate unstable__tailwindSvgFix (c6c540b)

This release is also available on:

v3.0.0

22 Nov 09:25
Compare
Choose a tag to compare

3.0.0 (2022-11-22)

⚠ BREAKING CHANGES

Features


This release is also available on:

v2.1.0

21 Nov 00:56
Compare
Choose a tag to compare

2.1.0 (2022-11-21)

Features


This release is also available on:

v2.0.2

18 Nov 21:21
Compare
Choose a tag to compare

2.0.2 (2022-11-18)

Bug Fixes

  • support swcMinify in NextJS 13 (8e4ad34)

This release is also available on:

v2.0.1

16 Nov 18:29
Compare
Choose a tag to compare

2.0.1 (2022-11-16)

Bug Fixes

  • deps: update dependency @sanity/groq-store to ^1.1.3 (#172) (77d4a98)
  • deps: update dependency @sanity/preview-kit to ^1.2.7 (#173) (7d580d7)

This release is also available on:

v2.0.0

16 Nov 15:51
Compare
Choose a tag to compare

2.0.0 (2022-11-16)

⚠ BREAKING CHANGES

Check the full migration guide for details.

  • Requires Node v16, like Next 13.
  • createPreviewSubscriptionHook is replaced with definePreview.
  • createCurrentUserHook is removed

Features

Bug Fixes

  • deps: update dependency @sanity/groq-store to ^1.1.1 (main) (#159) (13c6d93)
  • deps: update dependency @sanity/groq-store to ^1.1.2 (main) (#165) (4305d75)
  • support TS v4.9.x (#162) (0afc823)

v1.1.0

15 Nov 14:53
Compare
Choose a tag to compare

1.1.0 (2022-11-15)

Features

  • add support for fetching subset of dataset by type (#157) (33b42d2)

Bug Fixes

  • deps: update dependency @sanity/groq-store to ^1.0.4 (main) (#146) (5043b01)

This release is also available on:

v1.1.0-add-type-allowlist.1

14 Nov 15:35
Compare
Choose a tag to compare
Pre-release

1.1.0-add-type-allowlist.1 (2022-11-14)

Features

  • add support for fetching subset of dataset by type (8416e74)

Bug Fixes

  • deps: update dependency @sanity/groq-store to ^1.0.4 (main) (#146) (5043b01)

This release is also available on:

v2.0.0-preview-kit.1

11 Nov 16:19
Compare
Choose a tag to compare
v2.0.0-preview-kit.1 Pre-release
Pre-release

2.0.0-preview-kit.1 (2022-11-11)

⚠ BREAKING CHANGES

  • General purpose preview mode is now maintained in @sanity/preview-kit. Use it on routes that don't live inside the /app folder introduced in Next 13.
    The new mode for Next 13 provides two new APIs that supports React.use and React.cache as implemented in Next 13 React Server Components:
import {PreviewSuspense, definePreview, groq} from 'next-sanity'
import {previewData} from 'next/headers'

const usePreview = definePreview({projectId, dataset})

export default async function ServerComponent() {
  const token = previewData()?.token
  if(token) return <PreviewSuspense fallback="Loading Preview Mode..."><PreviewList token={token} /></PreviewSuspense>

  const client = createClient({projectId, dataset})
  const data = await client.fetch(groq`*[]`)
  return <List data={data} />
}

function PreviewList({token}) {
  const data = usePreview(token, groq`*[]`)
  return <List data={data} />
}

Features

  • add new preview mode for Next 13 (a22ddb3)

Bug Fixes

  • deps: update dependency @sanity/groq-store to ^1.0.4 (main) (#146) (5043b01)

This release is also available on:

v1.0.9

07 Nov 09:00
Compare
Choose a tag to compare

1.0.9 (2022-11-07)

Bug Fixes

  • add package.json to exports (6abbcb1)

This release is also available on: