Closed CottonCandyZ closed 10 months ago
Looks like this failed to typecheck: https://github.com/kentcdodds/mdx-bundler/actions/runs/7547192375
Looks like this failed to typecheck: https://github.com/kentcdodds/mdx-bundler/actions/runs/7547192375
Thank you for your reply!
It seems that remark-mdx-images
v2.0 references unified
v10, causing the Plugin
type error. Upgrading remark-mdx-images
to v3.0 will fix this error, as it will reference unified
v11, which uses the new Plugin
type.
The original ProcessorOptions
type does not exist in @mdx-js/esbuild/lib
, which causes the type of remarkPlugins
to be any
. I believe the new Options
type would be more appropriate.
Ah, would you like to try again with another PR?
:tada: This PR is included in version 10.0.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
What: Change the type of the
options
parameter in themdxOptions
function from the originalProcessorOptions
toOption
, which is theCompileOptions
type.Why: After upgrading the
@mdx-js
dependency to version 3.0, there have been some changes in theOptions
defined in@mdx-js/esbuild/lib
. This change has made the previously usedProcessorOptions
invalid, causing a type error for theoptions
parameter when usingmdxOptions
in TypeScript.How: Read the doc about
ProcessorOptions
andCompileOptions
and find that need to useCompileOptions
here.Checklist:
@mdx-js/esbuild/lib
exportsCompileOptions
and an equivalent type calledOptions
. I'm not sure which one is more appropriate to use here. In this commit, I have chosenOptions
.