-
Notifications
You must be signed in to change notification settings - Fork 17
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
Docusaurus v3 upgrade #128
Conversation
- Requires more languages to be listed, not automatically included now - Markup-templating required by ejs, must specify explicitly or build breaks - Update some language references in code blocks that aren't actually supported by prism
TODO: Figure out typescript issue
Multiple type versions lead to type errors like this one https://github.com/software-mansion/react-native-svg/issues/1741\#issuecomment-1093812197
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.
One change for this PR. Otherwise LGTM 👍 and works as expected.
Side note: Can we change the typecheck
script to call tsc --noEmit
? Also, there are four type errors when I run it.
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.
A couple of minor errors when I run yarn typecheck
but looks good otherwise!
Tested locally and everything worked as expected. good stuff! 🚀
Interesting, that wasn't showing up yesterday when I ran it but it's happening on a fresh checkout 🤔 fixing... |
Alright this should be good to go. As a follow-on I went through the dependabot alerts and made a PR to try to address the few that weren't resolved by this upgrade: #130 |
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.
Any reason we don't use tsc --noEmit
for the typecheck command?
Otherwise, LGTM 👍
@morganick Oh yeah, --noEmit sounds fine to me, I'll add that. I think the typecheck command is just what docusaurus set by defualt. |
* Update for docusaurus v3 versions * Fix non-terminating image, I think this is the intended one * Fixing prism post-upgrade - Requires more languages to be listed, not automatically included now - Markup-templating required by ejs, must specify explicitly or build breaks - Update some language references in code blocks that aren't actually supported by prism * Fix observer crash when navigating from homepage * Update last plugin and clsx * Actual fix for useIntersection * Force a single resolution of react types Multiple type versions lead to type errors like this one https://github.com/software-mansion/react-native-svg/issues/1741\#issuecomment-1093812197 * Leave comment that gtag is not meant to work in dev * Convert config to real typescript * Re-swizzle DocItem/Footer as TS and add more fixes * Type fixes and disallow unchecked indexed access * Fix snippet typing issue with home page top bar * Add a note about swizzling * Don't emit on typecheck
* Update for docusaurus v3 versions * Fix non-terminating image, I think this is the intended one * Fixing prism post-upgrade - Requires more languages to be listed, not automatically included now - Markup-templating required by ejs, must specify explicitly or build breaks - Update some language references in code blocks that aren't actually supported by prism * Fix observer crash when navigating from homepage * Update last plugin and clsx * Actual fix for useIntersection * Force a single resolution of react types Multiple type versions lead to type errors like this one https://github.com/software-mansion/react-native-svg/issues/1741\#issuecomment-1093812197 * Leave comment that gtag is not meant to work in dev * Convert config to real typescript * Re-swizzle DocItem/Footer as TS and add more fixes * Type fixes and disallow unchecked indexed access * Fix snippet typing issue with home page top bar * Add a note about swizzling * Don't emit on typecheck
Upgrades to Docusaurus v3, following these instructions: https://docusaurus.io/docs/migration/v3
This includes the following changes:
useIntersection
for strict modea. Docusaurus config file is now TS
b. The one component we swizzled (DocItem/Footer) is now based on the official TS version
c. I added a few TS compiler options to more strictly check code and help prevent future bugs
a. While doing this, I noticed we were referencing some languages prism doesn't actually support, so updated those to supported ones.
This upgrade should make it easier to make future improvements to Docusaurus components like search.