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: upgrade docsearch-react to v3 stable, bump dependencies #6752

Merged
merged 5 commits into from
Feb 24, 2022

Conversation

Josh-Cena
Copy link
Collaborator

@Josh-Cena Josh-Cena commented Feb 24, 2022

Breaking change

@docsearch/react is now bumped to the v3 stable release. algolia/docsearch#1299 made appId required. Sites that haven't upgraded to the new DocSearch infra should do the migration in order to use the new dependency version.

Motivation

A quick upgrade, because it helps us get rid of some patches (including the PnP patch)!

Have you read the Contributing Guidelines on pull requests?

Yes

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 24, 2022
@netlify
Copy link

netlify bot commented Feb 24, 2022

✔️ [V2]

🔨 Explore the source changes: 74c0ccd

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/62175c21bb34d00007cbfaff

😎 Browse the preview: https://deploy-preview-6752--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Feb 24, 2022

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 54
🟢 Accessibility 100
🟢 Best practices 92
🟢 SEO 100
🟢 PWA 90

Lighthouse ran on https://deploy-preview-6752--docusaurus-2.netlify.app/

@@ -25,7 +25,7 @@
"build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\""
},
"dependencies": {
"@docsearch/react": "^3.0.0-alpha.50",
"@docsearch/react": "^3.0.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@shortcuts Is this safe?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is safe, but introduces a breaking change in DocSearch.

We now require users to provide an appId, which is a follow up of migrating to our new infra. All of the users have received their new credentials but not all of them migrated yet.

I believe upgrading will encourage people to migrate.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I was asking on Discord as well, but thought it may be faster to ask here :P

This means it will break for a minority of our users, but they could and should have upgraded right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I was asking on Discord as well, but thought it may be faster to ask here :P

Sorry, I'll paste my answer to give users visibility on this too

This means it will break for a minority of our users, but they could and should have upgraded right?

Yes indeed, we are no longer maintaining the legacy infrastructure and are definitely pushing to the new infra, so this upgrade will also help!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we already agreed on Discord to do this upgrade

Maybe it could be better to do it in a separate PR to make it clear there's a breaking change @Josh-Cena ?

We also need to update the validation to mark appId as required + link to the PR or blog post so that we can explain this better to users

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Uh, going to do it in this PR. This is the only significant bump anyways, otherwise I won't even put this in the changelog (I'm recently excluding some maintenance PRs from the changelog)

@github-actions
Copy link

github-actions bot commented Feb 24, 2022

Size Change: +322 B (0%)

Total Size: 782 kB

Filename Size Change
website/build/assets/js/main.********.js 591 kB +322 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 48 kB
website/build/assets/css/styles.********.css 106 kB
website/build/index.html 37.6 kB

compressed-size-action

@netlify
Copy link

netlify bot commented Feb 24, 2022

✔️ [V2]

🔨 Explore the source changes: 928d889

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6217697412f0040008a326e6

😎 Browse the preview: https://deploy-preview-6752--docusaurus-2.netlify.app

@Josh-Cena Josh-Cena added the pr: breaking change Existing sites may not build successfully in the new version. Description contains more details. label Feb 24, 2022
@Josh-Cena Josh-Cena changed the title chore: upgrade dependencies chore: upgrade dependencies; use docsearch-react v3 stable Feb 24, 2022
@Josh-Cena
Copy link
Collaborator Author

Thanks, marked this as a slight breaking change to create some more visibility

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I'd prefer to upgrade docsearch 3.0 in a separate PR to isolate the breaking change

@@ -25,7 +25,7 @@
"build:format": "prettier --config ../../.prettierrc --write \"lib/**/*.js\""
},
"dependencies": {
"@docsearch/react": "^3.0.0-alpha.50",
"@docsearch/react": "^3.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we already agreed on Discord to do this upgrade

Maybe it could be better to do it in a separate PR to make it clear there's a breaking change @Josh-Cena ?

We also need to update the validation to mark appId as required + link to the PR or blog post so that we can explain this better to users

@Josh-Cena Josh-Cena changed the title chore: upgrade dependencies; use docsearch-react v3 stable chore: upgrade docsearch-react to v3 stable, bump dependencies Feb 24, 2022
@Josh-Cena Josh-Cena merged commit dcbf9f6 into main Feb 24, 2022
@Josh-Cena Josh-Cena deleted the jc/upgrade-deps branch February 24, 2022 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: breaking change Existing sites may not build successfully in the new version. Description contains more details.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants