Skip to content

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

Full 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 or compileMDX and have it propagate through to the returned frontmatter 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 (
	&lt;&gt;
		&lt;h1&gt;{frontmatter.title}&lt;/h1&gt;
		{content}
	&lt;/&gt;
)

}

What's Changed

... (truncated)

Commits

Merge request reports