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

🌟 update Docusaurus to 3.1.1 and many dependencies with it #34

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

AucaCoyan
Copy link
Member

No description provided.

Copy link

vercel bot commented Jan 25, 2024

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

Name Status Preview Comments Updated (UTC)
espanso-website ❌ Failed (Inspect) Apr 28, 2024 2:15pm

@AucaCoyan AucaCoyan changed the title ✅ add argos and playwright testing 🌟 update Docusaurus to 3.1.0 and many dependencies with it Jan 25, 2024
@AucaCoyan
Copy link
Member Author

I can't see whats wrong with vercel :( can you send me a pic @federico-terzi ?
I have only 1 thing remaining, and it's the versions. Currently in this PR it's only the latest version (v2) but it's missing the dropdown to select the legacy version (0.7.3)

@AucaCoyan
Copy link
Member Author

@federico-terzi
Copy link
Contributor

@AucaCoyan This is the build failure log from Vercel :)

[23:45:57.150] Running build in Washington, D.C., USA (East) – iad1
[23:45:57.250] Cloning github.com/espanso/website (Branch: add-testing, Commit: fd4f6cd)
[23:45:57.612] Cloning completed: 361.488ms
[23:46:01.631] Restored build cache
[23:46:01.683] Running "vercel build"
[23:46:02.183] Vercel CLI 33.2.0
[23:46:03.047] Warning: Detected "engines": { "node": ">=18.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[23:46:03.050] Installing dependencies...
[23:46:03.369] yarn install v1.22.17
[23:46:03.467] [1/5] Validating package.json...
[23:46:03.469] [2/5] Resolving packages...
[23:46:05.791] warning @docusaurus/core > webpack-dev-server > webpack-dev-middleware > memfs@3.6.0: this will be v4
[23:46:10.789] [3/5] Fetching packages...
[23:46:24.440] [4/5] Linking dependencies...
[23:46:24.443] warning "@docusaurus/core > react-loadable-ssr-addon-v5-slorber@1.0.1" has unmet peer dependency "react-loadable@*".
[23:46:24.449] warning "@docusaurus/core > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3" has unmet peer dependency "typescript@>= 2.7".
[23:46:24.453] warning " > @mdx-js/react@3.0.0" has unmet peer dependency "@types/react@>=16".
[23:46:24.453] warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-core > @algolia/autocomplete-shared@1.9.3" has unmet peer dependency "@algolia/client-search@>= 4.9.1 < 6".
[23:46:24.453] warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-core > @algolia/autocomplete-plugin-algolia-insights@1.9.3" has unmet peer dependency "search-insights@>= 1 < 3".
[23:46:24.453] warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-preset-algolia@1.9.3" has unmet peer dependency "@algolia/client-search@>= 4.9.1 < 6".
[23:46:34.921] [5/5] Building fresh packages...
[23:46:36.986] success Saved lockfile.
[23:46:36.990] Done in 33.63s.
[23:46:37.055] Running "yarn run build"
[23:46:37.253] yarn run v1.22.17
[23:46:37.283] $ docusaurus build
[23:46:38.789] [INFO] [en] Creating an optimized production build...
[23:46:39.082] [ERROR] Loading of version failed for version 0.7.3
[23:46:39.082] 
[23:46:39.084] Error: Unable to build website for locale en.
[23:46:39.084]     at tryToBuildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:55:19)
[23:46:39.084]     at async mapAsyncSequential (/vercel/path0/node_modules/@docusaurus/utils/lib/jsUtils.js:44:24)
[23:46:39.084]     at async Command.build (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:82:21) {
[23:46:39.084]   [cause]: Error: Invalid sidebar file at "versioned_sidebars/version-0.7.3-sidebars.json".
[23:46:39.084]   These legacy versioned sidebar names are not supported anymore in Docusaurus v3:
[23:46:39.085]   - version-0.7.3/tutorialSidebar
[23:46:39.085]   
[23:46:39.085]   The sidebar names you should now use are:
[23:46:39.085]   - tutorialSidebar
[23:46:39.085]   
[23:46:39.085]   Please remove the "version-0.7.3/" prefix from your versioned sidebar file.
[23:46:39.085]   This breaking change is documented on Docusaurus v3 release notes: https://docusaurus.io/blog/releases/3.0
[23:46:39.085]   
[23:46:39.086]       at Object.checkLegacyVersionedSidebarNames (/vercel/path0/node_modules/@docusaurus/plugin-content-docs/lib/sidebars/utils.js:195:19)
[23:46:39.086]       at doLoadVersion (/vercel/path0/node_modules/@docusaurus/plugin-content-docs/lib/index.js:108:31)
[23:46:39.086]       at async loadVersion (/vercel/path0/node_modules/@docusaurus/plugin-content-docs/lib/index.js:129:28)
[23:46:39.086]       at async Promise.all (index 1)
[23:46:39.086]       at async Object.loadContent (/vercel/path0/node_modules/@docusaurus/plugin-content-docs/lib/index.js:137:33)
[23:46:39.086]       at async /vercel/path0/node_modules/@docusaurus/core/lib/server/plugins/index.js:35:25
[23:46:39.086]       at async Promise.all (index 0)
[23:46:39.086]       at async loadPlugins (/vercel/path0/node_modules/@docusaurus/core/lib/server/plugins/index.js:34:27)
[23:46:39.086]       at async load (/vercel/path0/node_modules/@docusaurus/core/lib/server/index.js:76:58)
[23:46:39.086]       at async buildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:95:19)
[23:46:39.086]       at async tryToBuildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:46:20)
[23:46:39.086]       at async mapAsyncSequential (/vercel/path0/node_modules/@docusaurus/utils/lib/jsUtils.js:44:24)
[23:46:39.086]       at async Command.build (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:82:21)
[23:46:39.086] }
[23:46:39.087] 
[23:46:39.088] [INFO] Docusaurus version: 3.1.0
[23:46:39.088] Node version: v20.9.0
[23:46:39.106] error Command failed with exit code 1.
[23:46:39.106] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[23:46:39.122] Error: Command "yarn run build" exited with 1
[23:46:39.608] 

@AucaCoyan
Copy link
Member Author

Thanks! I can do a lot of things with that output. Will be back!

@AucaCoyan
Copy link
Member Author

I was investigating the issue when I read that docusaurus doesn't recommend versioning the docs except:

Versioning is best suited for websites with high-traffic and rapid changes to documentation between versions. If your documentation rarely changes, don't add versioning to your documentation.

Espanso is not a case where it is needed, and we only have v0.7.3, but we don't currently support that version.

Are you ok with removing the versioning in the website? @federico-terzi
Must ping @smeech too, that he has read and edited multiple times!

@AucaCoyan AucaCoyan marked this pull request as ready for review January 31, 2024 02:39
@AucaCoyan AucaCoyan changed the title 🌟 update Docusaurus to 3.1.0 and many dependencies with it 🌟 update Docusaurus to 3.1.1 and many dependencies with it Jan 31, 2024
@AucaCoyan
Copy link
Member Author

I fixed the previous log from vercel, and it builds correctly on my machine. Merged main allright but idk what's happening now 😢
Can I have another log please 🙏🏼 ?

@smeech
Copy link
Collaborator

smeech commented Jan 31, 2024

Thank you for keeping me in the loop, although I don't fully understand the issue.
As you say, we only have one previous release, and we've no intention of supporting it.
We should do what's easiest to maintain.
Do let me know if it has any implications for my updating, however.

@AucaCoyan
Copy link
Member Author

As you say, we only have one previous release, and we've no intention of supporting it.
We should do what's easiest to maintain.

That's right! If somebody comes to discord and ask for support for an old version, we are probably going to answer "oh, you have the old version. I'm sure you will have a better experience in the new stable version". So it's uncommon to send someone to read old docs (that only apply to an unsupported version anyway).
Also we have to bear in mind that if we want to support 2 versions of the documentation, we would have to build and release more than one version in the espanso repo. This would be the case if we had some big software like Visual Studio and we want to support users that have 2022 version but also 2019 and 2015. That's a lot of extra effort.
I think that by removing the old version of the docs we assert that everybody is looking at the same docs and we have only one source of truth.

Do let me know if it has any implications for my updating, however.

For sure! I don't want to cause you a merge conflict (it's a complicated topic in git). So I will wait to your pr to be ready and merged, and afterwards I resolve the differences between the current main (as it is today) and the main with your pr landed. Only then this is going to be ready to merge 👌🏼 . Also, you are not slowing me down if you were wondering, I have yet work to do here 🔧

@smeech
Copy link
Collaborator

smeech commented Jan 31, 2024

I only have a couple of minor amendments in my fork at this point and was planning to wait until I had more as they're both very minor. If you reach the point when you'd like me to submit a pull request before I have, just let me know.

@federico-terzi
Copy link
Contributor

Sorry for the late reply folks, yes we can drop the documentation for version 0.7.3. It's been years that v2 is available

@AucaCoyan This is the new error log :)

[04:39:12.994] Running build in Washington, D.C., USA (East) – iad1
[04:39:13.104] Cloning github.com/espanso/website (Branch: add-testing, Commit: ed9e22c)
[04:39:13.506] Cloning completed: 402.07ms
[04:39:17.676] Restored build cache
[04:39:17.749] Running "vercel build"
[04:39:18.369] Vercel CLI 33.2.0
[04:39:19.039] Warning: Detected "engines": { "node": ">=18.0" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[04:39:19.042] Installing dependencies...
[04:39:19.365] yarn install v1.22.17
[04:39:19.444] [1/5] Validating package.json...
[04:39:19.447] [2/5] Resolving packages...
[04:39:19.852] [3/5] Fetching packages...
[04:39:34.731] [4/5] Linking dependencies...
[04:39:34.733] warning "@docusaurus/core > react-loadable-ssr-addon-v5-slorber@1.0.1" has unmet peer dependency "react-loadable@*".
[04:39:34.738] warning "@docusaurus/core > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3" has unmet peer dependency "typescript@>= 2.7".
[04:39:34.742] warning " > @mdx-js/react@3.0.0" has unmet peer dependency "@types/react@>=16".
[04:39:34.743] warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-preset-algolia@1.9.3" has unmet peer dependency "@algolia/client-search@>= 4.9.1 < 6".
[04:39:34.743] warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-core > @algolia/autocomplete-plugin-algolia-insights@1.9.3" has unmet peer dependency "search-insights@>= 1 < 3".
[04:39:34.743] warning "@docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-core > @algolia/autocomplete-shared@1.9.3" has unmet peer dependency "@algolia/client-search@>= 4.9.1 < 6".
[04:39:44.916] [5/5] Building fresh packages...
[04:39:46.785] Done in 27.43s.
[04:39:46.827] Running "yarn run build"
[04:39:47.025] yarn run v1.22.17
[04:39:47.052] $ docusaurus build
[04:39:48.842] [INFO] [en] Creating an optimized production build...
[04:39:49.640] [info] [webpackbar] Compiling Client
[04:39:49.664] [info] [webpackbar] Compiling Server
[04:40:14.379] Browserslist: caniuse-lite is outdated. Please run:
[04:40:14.379]   npx browserslist@latest --update-db
[04:40:14.379]   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[04:40:15.928] [success] [webpackbar] Client: Compiled successfully in 26.29s
[04:40:18.723] Error: Docusaurus server-side rendering could not render static page with path /docs/matches/basics because of error: variables is not defined
[04:40:18.724]     at serverEntry_render (main:62355:358)
[04:40:18.724]     at runNextTicks (node:internal/process/task_queues:60:5)
[04:40:18.724]     at process.processImmediate (node:internal/timers:449:9)
[04:40:18.724]     at async /vercel/path0/node_modules/p-map/index.js:57:22 {
[04:40:18.724]   [cause]: ReferenceError: variables is not defined
[04:40:18.724]       at _createMdxContent (main:11530:11)
[04:40:18.724]       at MDXContent (main:12249:8)
[04:40:18.724]       at Uc (main:114486:44)
[04:40:18.724]       at Xc (main:114488:253)
[04:40:18.725]       at Z (main:114494:89)
[04:40:18.725]       at Xc (main:114492:231)
[04:40:18.725]       at Z (main:114494:89)
[04:40:18.725]       at Xc (main:114488:481)
[04:40:18.725]       at Z (main:114494:89)
[04:40:18.725]       at Xc (main:114488:481)
[04:40:18.725] }
[04:40:19.757] [success] [webpackbar] Server: Compiled with some errors in 30.09s
[04:40:19.856] 
[04:40:19.856] Error: Unable to build website for locale en.
[04:40:19.856]     at tryToBuildLocale (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:55:19)
[04:40:19.856]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[04:40:19.856]     at async mapAsyncSequential (/vercel/path0/node_modules/@docusaurus/utils/lib/jsUtils.js:44:24)
[04:40:19.856]     at async Command.build (/vercel/path0/node_modules/@docusaurus/core/lib/commands/build.js:82:21) {
[04:40:19.856]   [cause]: Error: Failed to compile due to Webpack errors.
[04:40:19.856]   Error: Docusaurus server-side rendering could not render static page with path /docs/matches/basics because of error: variables is not defined
[04:40:19.857]       at /vercel/path0/node_modules/@docusaurus/core/lib/webpack/utils.js:207:24
[04:40:19.857]       at /vercel/path0/node_modules/webpack/lib/MultiCompiler.js:554:14
[04:40:19.857]       at processQueueWorker (/vercel/path0/node_modules/webpack/lib/MultiCompiler.js:491:6)
[04:40:19.857]       at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
[04:40:19.857] }
[04:40:19.857] 
[04:40:19.857] [INFO] Docusaurus version: 3.1.1
[04:40:19.857] Node version: v20.9.0
[04:40:19.925] error Command failed with exit code 1.
[04:40:19.925] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[04:40:19.953] Error: Command "yarn run build" exited with 1
[04:40:20.572] 

@AucaCoyan
Copy link
Member Author

Ok, finally I made it online, but I have some differences with espanso.com, so I will fix some of them before landing

@AucaCoyan AucaCoyan marked this pull request as draft February 15, 2024 20:53
Copy link

vercel bot commented Apr 28, 2024

@AucaCoyan is attempting to deploy a commit to the Federico Terzi's projects Team on Vercel.

A member of the Team first needs to authorize it.

@AucaCoyan AucaCoyan marked this pull request as ready for review April 28, 2024 21:06
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.

3 participants