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

docs/www: update docusaurus to v3 #5719

Open
wants to merge 25 commits into
base: next
Choose a base branch
from

Conversation

misterioss
Copy link

Closes #5217

🎯 Changes

This PR upgrades docusaurus from v2 to v3

✅ Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@misterioss misterioss requested review from a team as code owners May 13, 2024 10:26
Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
www ❌ Failed (Inspect) May 15, 2024 4:36pm

Copy link

vercel bot commented May 13, 2024

@misterioss is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

autofix-ci bot commented May 13, 2024

Hi! I'm autofix logoautofix.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:

  1. Allow edits by maintainers for your pull request, and then re-trigger CI (for example by pushing a new commit).
  2. Manually fix the issues identified for your pull request (see the GitHub Actions output for details on what I would like to change).

@juliusmarminge
Copy link
Member

Can you fix linting 🙏

Copy link
Member

@KATT KATT left a 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 🙏

title: 'tRPC',
tagline: 'Move Fast and Break Nothing.\nEnd-to-end typesafe APIs made easy.',
url: 'https://trpc.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenLinks: 'ignore',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
onBrokenLinks: 'ignore',
onBrokenLinks: 'throw',

@@ -22,13 +20,12 @@ const poweredByVercel = `
</div>
`.trim();

/** @type {import('@docusaurus/types').Config} */
Copy link
Member

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?


const { parseEnv } = require('./src/utils/env');
const { generateTypedocDocusaurusPlugins } = require('./docusaurus.typedoc.js');
// import type { Config } from '@docusaurus/types';
Copy link
Member

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

Suggested change
// import type { Config } from '@docusaurus/types';
// @ts-check

makeElementVisible(LIGHT_THEME_SELECTOR);
makeElementInvisible(DARK_THEME_SELECTOR);
}
}
Copy link
Member

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?

Comment on lines 6 to 8
/**
* @param {string[]} directories
*/
Copy link
Member

Choose a reason for hiding this comment

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

Why?

@@ -1,11 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// @ts-check
Copy link
Member

Choose a reason for hiding this comment

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

Retain please

Copy link
Member

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?

@KATT
Copy link
Member

KATT commented May 15, 2024

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)

@misterioss
Copy link
Author

Thanks so much for this!

Please make the branch editable 🙏

Strange, I don's see the checkbox for it...

@KATT KATT requested a review from a team May 20, 2024 21:30
@juliusmarminge
Copy link
Member

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 🤨

Copy link
Member

@KATT KATT left a 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/

@@ -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',
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 guessing you disable this due to typedoc causing it to throw?

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.

docs/www: update docusaurus and typedoc
3 participants