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 dependencies #8261

Closed
wants to merge 2 commits into from

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Oct 28, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Routine deps update before new release.

Test Plan

Preview

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@lex111 lex111 requested a review from slorber as a code owner October 28, 2022 07:57
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 28, 2022
@netlify
Copy link

netlify bot commented Oct 28, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 79097b2
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/635b8b5dc70a0800089d7218
😎 Deploy Preview https://deploy-preview-8261--docusaurus-2.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 settings.

@github-actions
Copy link

github-actions bot commented Oct 28, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 61 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 82 🟢 100 🟢 100 🟢 100 🟢 90 Report

Copy link
Contributor Author

@lex111 lex111 left a comment

Choose a reason for hiding this comment

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

Actually Algolia search is the primary reason of this PR, but I also tried updating "safe" deps too, but for some reason the tests fails..

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.

Looks like multiple things are failing

Routine deps update before new release.

Actually, I'd like to avoid such deps upgrade PRs just before a release, particularly when any new deps version can cause problems.

I'm ok to merge this PR (once fixed), but not really to backport it for the v2.2 release of today

Eventually, it can be backported in a 2.3 release later (if we even need it, we might as well have 3.0-beta next)

New minor versions are for things that are really stable. We need time to be sure these deps upgrades do not contain any unwanted side-effect.

In general, I want to avoid too complex deps upgrades in minor versions, in particular upgrading major versions of direct dependencies.

"@docusaurus/core": "^3.0.0-alpha.0",
"@docusaurus/theme-common": "^3.0.0-alpha.0",
"@docusaurus/theme-translations": "^3.0.0-alpha.0",
"@docusaurus/types": "^3.0.0-alpha.0",
"@docusaurus/utils": "^3.0.0-alpha.0",
"@docusaurus/utils-validation": "^3.0.0-alpha.0",
"babel-loader": "^8.2.5",
"babel-loader": "^9.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.

major deps upgrades often have breaking changes that might lead ourselves to have breaking changes too.

https://github.com/babel/babel-loader/releases/tag/v9.0.0

In this case it doesn't seem to be a problem (even though we allow configuring babel plugins) but the 9.0 was released only 20h ago.

For safety, I'd prefer to stay on 8.x, and keep such upgrades for the next major versions.

IE: don't do any risky change just before a minor release. If a PR feels too risky I'd prefer to not backport it. Releasing a minor takes more time than before and I don't want to have to release a 2.2.1 if possible.

In general, I'd prefer to avoid having to backport a deps upgrade PR just before a release. Let's merge those PRs a bit upfront, see if there's any issue, and only then backport it.

@@ -33,7 +33,7 @@
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
},
"dependencies": {
"@docsearch/react": "^3.2.1",
"@docsearch/react": "^3.3.0",
Copy link
Collaborator

@slorber slorber Oct 28, 2022

Choose a reason for hiding this comment

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

Apparently, there are type-related breaking changes in this new version @shortcuts @Haroenv

This upgrade leads to failures while type-checking our website: https://github.com/facebook/docusaurus/actions/runs/3343786713/jobs/5537374683

Run yarn workspace website typecheck
yarn workspace v1.22.19
yarn run v1.22.19
$ tsc
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(7,7[4](https://github.com/facebook/docusaurus/actions/runs/3343786713/jobs/5537374683#step:7:5)): error TS2339: Property 'liteClient' does not exist on type 'typeof import("/home/runner/work/docusaurus/docusaurus/node_modules/algoliasearch/lite")'.
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(8,7[5](https://github.com/facebook/docusaurus/actions/runs/3343786713/jobs/5537374683#step:7:6)): error TS2339: Property 'searchClient' does not exist on type 'typeof import("/home/runner/work/docusaurus/docusaurus/node_modules/@algolia/client-search/dist/client-search")'.
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(20,23): error TS2[6](https://github.com/facebook/docusaurus/actions/runs/3343786713/jobs/5537374683#step:7:7)94: Namespace '"/home/runner/work/docusaurus/docusaurus/node_modules/algoliasearch/lite"' has no exported member 'LegacySearchMethodProps'.
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(24,23): error TS2694: Namespace '"/home/runner/work/docusaurus/docusaurus/node_modules/algoliasearch/lite"' has no exported member 'SearchForFacetValuesResponse'.
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(2[8](https://github.com/facebook/docusaurus/actions/runs/3343786713/jobs/5537374683#step:7:9),23): error TS2694: Namespace '"/home/runner/work/docusaurus/docusaurus/node_modules/algoliasearch/lite"' has no exported member 'SearchResponse'.
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(32,23): error TS26[9](https://github.com/facebook/docusaurus/actions/runs/3343786713/jobs/5537374683#step:7:10)4: Namespace '"/home/runner/work/docusaurus/docusaurus/node_modules/algoliasearch/lite"' has no exported member 'HighlightResult'.
Error: ../node_modules/@algolia/autocomplete-preset-algolia/dist/esm/types/algoliasearch.d.ts(36,23): error TS2694: Namespace '"/home/runner/work/docusaurus/docusaurus/node_modules/algoliasearch/lite"' has no exported member 'SnippetResult'.

Seems related to algolia/autocomplete#1002

Copy link

Choose a reason for hiding this comment

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

Thanks for letting me know, the ts-ignore comments were removed :( Will fix!

"babel-loader": "^8.2.5",
"@svgr/webpack": "^6.5.0",
"autoprefixer": "^10.4.12",
"babel-loader": "^9.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.

same

"escape-html": "^1.0.3",
"eta": "^1.12.3",
"file-loader": "^6.2.0",
"fs-extra": "^10.1.0",
"html-minifier-terser": "^6.1.0",
"html-minifier-terser": "^7.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.

same, what are the breaking changes of this new version? How does it affect us? Again I'd rather stick to 6.x particularly if I need to backport this PR => avoid risky changes for PRs to backport

@lex111
Copy link
Contributor Author

lex111 commented Oct 28, 2022

Sorry, it's just my old habits, I think there is no point in keeping this PR, too many risky changes.

@lex111 lex111 closed this Oct 28, 2022
@slorber
Copy link
Collaborator

slorber commented Oct 28, 2022

np

No I think we can keep it, it's just that we will probably not backport it.

It remains useful to upgrade deps for 3.x in advance.

And it showed us that some deps upgrade will likely need some work to get them working 🤪

@Josh-Cena
Copy link
Collaborator

Superceded by #8534

@Josh-Cena Josh-Cena closed this Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants