-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
docs/www: update docusaurus to v3 #5719
base: next
Are you sure you want to change the base?
Conversation
# Conflicts: # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml # www/package.json
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@misterioss is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
Hi! I'm autofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests. I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
Can you fix linting 🙏 |
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.
Thanks so much for this!
Please make the branch editable 🙏
www/docusaurus.config.js
Outdated
title: 'tRPC', | ||
tagline: 'Move Fast and Break Nothing.\nEnd-to-end typesafe APIs made easy.', | ||
url: 'https://trpc.io', | ||
baseUrl: '/', | ||
onBrokenLinks: 'throw', | ||
onBrokenLinks: 'ignore', |
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.
onBrokenLinks: 'ignore', | |
onBrokenLinks: 'throw', |
www/docusaurus.config.js
Outdated
@@ -22,13 +20,12 @@ const poweredByVercel = ` | |||
</div> | |||
`.trim(); | |||
|
|||
/** @type {import('@docusaurus/types').Config} */ |
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.
Can we get types back in?
www/docusaurus.config.js
Outdated
|
||
const { parseEnv } = require('./src/utils/env'); | ||
const { generateTypedocDocusaurusPlugins } = require('./docusaurus.typedoc.js'); | ||
// import type { Config } from '@docusaurus/types'; |
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.
Please get the // @ts-check
back in
// import type { Config } from '@docusaurus/types'; | |
// @ts-check |
makeElementVisible(LIGHT_THEME_SELECTOR); | ||
makeElementInvisible(DARK_THEME_SELECTOR); | ||
} | ||
} |
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.
Could you please explain how come this is needed?
www/docusaurus.typedoc.js
Outdated
/** | ||
* @param {string[]} directories | ||
*/ |
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.
Why?
www/docusaurus.typedoc.js
Outdated
@@ -1,11 +1,6 @@ | |||
/* eslint-disable @typescript-eslint/no-var-requires */ | |||
// @ts-check |
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.
Retain please
www/mdx-to-jsx.js
Outdated
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.
How come this is needed? Could it be type-checked with a // @ts-check
?
Another question, @misterioss, are you able to do ... # in root
p install
p build
# switch to `www` and start dev server
cd www && p dev .. on this branch? It might be some pre-existing issues that got surfaced by this (since our typedoc is kinda whack even now) |
# Conflicts: # www/package.json
Strange, I don's see the checkbox for it... |
Our custom theme handled diff languague type which the default didnt handle before. Has that been fixed? I saw you reverted to the default one. Deployment fails so cant verify 🤨 |
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.
Hey
There's still a bunch of issues with typedoc - do you think they are fixable?
We should probably do
pnpm add typedoc@latest typedoc-plugin-markdown@latest docusaurus-plugin-typedoc@latest --save-dev
in www/
www/docusaurus.config.js
Outdated
@@ -25,7 +25,7 @@ const config = { | |||
tagline: 'Move Fast and Break Nothing.\nEnd-to-end typesafe APIs made easy.', | |||
url: 'https://trpc.io', | |||
baseUrl: '/', | |||
onBrokenLinks: 'ignore', | |||
onBrokenLinks: 'throw', |
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 guessing you disable this due to typedoc causing it to throw?
Closes #5217
🎯 Changes
This PR upgrades docusaurus from v2 to v3
✅ Checklist