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

[WIP] [ISSUE-334] Migrate Project to latest Gatsby release #345

Closed
wants to merge 1 commit into from

Conversation

azihassan
Copy link
Contributor

@azihassan azihassan commented Jul 26, 2022

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 (gatsbyjs/gatsby#34706 (comment))

This is a WIP PR, the project runs with yarn develop but I haven't tested it yet.

Relevant issue : #334

. Replace path.separator with / to avoid having to polyfill path
. Keep mdx-js/mdx at v1 to maintain gatsby-plugin-mdx compatibility (gatsbyjs/gatsby#34706 (comment))
@netlify
Copy link

netlify bot commented Jul 26, 2022

Deploy Preview for geeksblabla ready!

Name Link
🔨 Latest commit 95eb0c4
🔍 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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@azihassan azihassan marked this pull request as draft July 27, 2022 12:07
@azihassan
Copy link
Contributor Author

The testimonial section is repeated twice, but this is also the case for geeksblabla.ma

@yjose
Copy link
Member

yjose commented Jul 28, 2022

The testimonial section is repeated twice, but this is also the case for geeksblabla.ma

it's the normal behavior

@yjose
Copy link
Member

yjose commented Aug 3, 2022

@azihassan i think you can upgrade mdx too now https://www.gatsbyjs.com/docs/reference/release-notes/v4.20/

@azihassan
Copy link
Contributor Author

Hmm looks like it's still in RC. Upgrade either way ?

@yjose
Copy link
Member

yjose commented Aug 5, 2022

yeah go for it

@yjose yjose marked this pull request as ready for review October 21, 2022 11:36
@yjose yjose self-requested a review October 21, 2022 11:36
@yjose yjose closed this Aug 2, 2023
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.

2 participants