-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update markdown-related dependencies #1001
base: main
Are you sure you want to change the base?
Conversation
I'm trying out web-infra-dev#574. The `@shikijs/rehype` uses a higher version of `unified` than Rspress. So I decide to first upgrade the dependencies of Rspress. Upgrade `@mdxjs/*`, `hast-*`, `mdast-util-*`, `rehype-*`, `remark-*`, `unist-util-*` and `unified` to latest. Please note that these are major bump with breaking changes(mostly typings). The `remarkPlugins/toc.ts` and `remarkPlugins/loader.ts` have been updated for correct types. I've tried running Rspack and Rsbuild documentation with the upgraded Rspress. Everyting looks just fine!
The `remakr-*` contains only typing major changes. Overrides to higher version to reduce installation size.
✅ Deploy Preview for aquamarine-blini-95325f ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
"@mdx-js/mdx": "2.3.0", | ||
"@mdx-js/react": "2.3.0", | ||
"@mdx-js/loader": "3.0.1", | ||
"@mdx-js/mdx": "3.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried that mdx v3 and remark v15 contains some breaking changes and may break the user code / plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the mdx-rs of Rspress use the mdx v2 syntax, @sanyuan0704 can you confirm this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like mdx v3 updates the rehype and remark, which contains breaking changes mainly in typings. This is indeed a breaking change for Rspress users, but migration is easy. Just update the rehype and remark plugins.
Summary
I'm trying out #574. The
@shikijs/rehype
uses a higher version ofunified
than Rspress. So I decided to first upgrade the dependencies ofRspress.
Upgrade
@mdxjs/*
,hast-*
,mdast-util-*
,rehype-*
,remark-*
,unist-util-*
andunified
to latest.Please note that these are major bumps with breaking changes(mostly
typings). The
remarkPlugins/toc.ts
andremarkPlugins/loader.ts
havebeen updated for the correct types.
I've tried running Rspack and Rsbuild documentation with the upgraded
Rspress. Everything looks just fine!
Related Issue
#574
Checklist