geeksblabla.com
geeksblabla.com copied to clipboard
[WIP] [ISSUE-334] Migrate Project to latest Gatsby release
This PR upgrades gatsby from v2 to v4, and also upgrades all the packages of the application.
This was done with CXXFLAGS="--std=c++17" yarn upgrade-interactive --latest and then selecting everything.
The CXXFLAGS="--std=c++17" part was needed on my machine because the setup uses g++ to build node-sass.
Even though I found a package-lock.json file in the project, I used yarn instead of npm because I noticed that the former was called in the project's Github actions. npm is mentioned in package.json though, so we probably need to keep one of them otherwise both the package-lock.json and yarn.lock files would have to be kept up to date.
I also had to call yarn husky install after the upgrade to solve the 'error Command "husky-run" not found.' issue.
The upgraded gatsby apparently uses a new webpack version that no longer includes polyfills for nodejs modules, so I replaced path.separator with / to avoid having to polyfill path. It was the only mention I found of the path module throughout the project, so it's probably safe to remove the path dependency altogether.
Also, mdx-js/mdx was kept at v1 to maintain gatsby-plugin-mdx compatibility (https://github.com/gatsbyjs/gatsby/issues/34706#issuecomment-1029716942)
This is a WIP PR, the project runs with yarn develop but I haven't tested it yet.
Relevant issue : https://github.com/DevC-Casa/geeksblabla.com/issues/334
Deploy Preview for geeksblabla ready!
| Name | Link |
|---|---|
| Latest commit | 95eb0c4109ace97ad0879c9ec07fda5f4c2f4e63 |
| Latest deploy log | https://app.netlify.com/sites/geeksblabla/deploys/62e067d9016c570008f71858 |
| Deploy Preview | https://deploy-preview-345--geeksblabla.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
The testimonial section is repeated twice, but this is also the case for geeksblabla.ma
The testimonial section is repeated twice, but this is also the case for geeksblabla.ma
it's the normal behavior
@azihassan i think you can upgrade mdx too now https://www.gatsbyjs.com/docs/reference/release-notes/v4.20/
Hmm looks like it's still in RC. Upgrade either way ?
yeah go for it