Bump next-mdx-remote from 4.3.0 to 4.4.1
Bumps next-mdx-remote from 4.3.0 to 4.4.1.
Release notes
Sourced from next-mdx-remote's releases.
v4.4.1
What's Changed
- chore(types): remove unused imports by
@thiskevinwang
in hashicorp/next-mdx-remote#348- fix: Make sure frontmatter types flow through to MDXRemote by
@BRKalow
in hashicorp/next-mdx-remote#351Full Changelog: https://github.com/hashicorp/next-mdx-remote/compare/v4.4.0...v4.4.1
v4.4.0
This release includes a few fixes for frontmatter types, as well as a way to provide a frontmatter type to
serialize
orcompileMDX
and have it propagate through to the returnedfrontmatter
property. See the documentation for an example.
serialize
:import { serialize } from 'next-mdx-remote/serialize' interface Frontmatter { title: string published: string description?: string } // 👇 should have type Frontmatter const { frontmatter } = serialize<Record<string, unknown>, Frontmatter>(source)
compileMDX
:import { compileMDX } from 'next-mdx-remote/rsc' interface Frontmatter { title: string published: string description?: string } export default async function Page({ source }) { // 👇 should have type Frontmatter const { content, frontmatter } = await compileMDX<Frontmatter>(source) return ( <> <h1>{frontmatter.title}</h1> {content} </> ) }
What's Changed
- docs: fix react server components example by
@greyhere
in hashicorp/next-mdx-remote#334
... (truncated)
Commits
-
1c8acee
4.4.1 -
e4c7a69
fix: Make sure frontmatter types flow through to MDXRemote (#351) -
e7f6ec1
chore(types): remove unused imports (#348) -
ce066d7
4.4.0 -
2b35582
feat: Improve frontmatter types, pass generic TFrontmatter type through (#342) -
697c682
remove newline from template literal (#346) -
772d213
fix: TFrontmatter type to unknown (#340) -
c559bdc
fix(rsc): do not require compiledSource in types (#339) -
1508a53
Bump decode-uri-component from 0.2.0 to 0.2.2 (#318) -
e9c0275
Bump semver-regex from 2.0.0 to 3.1.4 (#313) - Additional commits viewable in compare view