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

update dependencies (install Docusaurus 3) #5601

Merged
merged 27 commits into from
Jan 16, 2024

Conversation

elevatebart
Copy link
Contributor

@elevatebart elevatebart commented Jan 9, 2024

  • Update all dependencies (prettier, docusaurus, remark, unist,... )
  • Rewrite the MDX plugins for compat with updated version of remark
  • Use sync version of prettier as prettier has become async
  • Remove all MDX1 hacks from the codebase

Caveat: some customized header hashes cannot be parsed in DS3. See Yields has disapeared here. The end result seems the same. so I am not worried.

Copy link

netlify bot commented Jan 9, 2024

Deploy Preview for benevolent-cat-040f48 ready!

Name Link
🔨 Latest commit dda52a9
🔍 Latest deploy log https://app.netlify.com/sites/benevolent-cat-040f48/deploys/65a16c263772e5000836d51c
😎 Deploy Preview https://deploy-preview-5601--benevolent-cat-040f48.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@elevatebart elevatebart changed the title update dependencies update dependencies (install Docusaurus 3) Jan 9, 2024
@elevatebart elevatebart marked this pull request as draft January 9, 2024 17:15
@jaffrepaul jaffrepaul force-pushed the elevatebart/deps-2024-01-09 branch from 7825b70 to f32243f Compare January 11, 2024 22:39
@elevatebart elevatebart marked this pull request as ready for review January 12, 2024 14:33
Copy link
Contributor

@jaffrepaul jaffrepaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with all this. Nice job working through the remark stuff 💪

Two q's just for my edification:

  • Why does the prettier need to work sync?
  • I didn't quite understand the header hashes caveat you mentioned. Did something not translate in v3?

@elevatebart
Copy link
Contributor Author

elevatebart commented Jan 12, 2024

I'm good with all this. Nice job working through the remark stuff 💪

Two q's just for my edification:

  • Why does the prettier need to work sync?

The visit function that remark is using to change the content and load the config files for instance needs to use visitors that are synchronous. The maintainer or remark and MDX is very convinced of it. If a function is async, any function that depends on it needs to be async too. So we cannot use prettier.format if it's async. Believe me I tried. Good thing there is a @prettier/sync library maintained by the prettier team already.

  • I didn't quite understand the header hashes caveat you mentioned. Did something not translate in v3?

Before, when an icon was in a header, the Icon name was made part of the ID. We went around it with adding stuff at the end of header lines.

### Yields [<IconHelp>](https://example-docs.org/yields) {#Yields}
                                                          ^^^^^^^

Problem is: on some pages the "acorn" parser did not like it one bit. I removed it where it was problematic and the hash have not changed. The one above for instance is still "Yields"

@elevatebart elevatebart merged commit 5bf8503 into main Jan 16, 2024
11 checks passed
@elevatebart elevatebart deleted the elevatebart/deps-2024-01-09 branch January 16, 2024 13:09
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.

2 participants