Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

colinaaa
Copy link

Summary

I'm trying out #574. The @shikijs/rehype uses a higher version of
unified than Rspress. So I decided 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 bumps with breaking changes(mostly
typings). The remarkPlugins/toc.ts and remarkPlugins/loader.ts have
been 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

  • Tests updated (or not required).
  • Documentation updated (or not required).

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!
@CLAassistant
Copy link

CLAassistant commented Apr 21, 2024

CLA assistant check
All committers have signed the CLA.

The `remakr-*` contains only typing major changes. Overrides to higher
version to reduce installation size.
Copy link

netlify bot commented Apr 21, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit f769dd9
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/6625352325c2440008bf2a07
😎 Deploy Preview https://deploy-preview-1001--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🔴 down 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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",
Copy link
Member

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.

Copy link
Member

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?

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants