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: update sharp to ^0.21.0 #8898

Closed
wants to merge 0 commits into from

Conversation

WaylonWalker
Copy link

This will help folks having installation issues on windows resolve without opening an issue. This issue has been seen in Issue lovell/sharp#1382, lovell/sharp#1387, and in #8325.

@WaylonWalker WaylonWalker requested a review from a team October 7, 2018 23:36
@lovell
Copy link
Contributor

lovell commented Oct 8, 2018

Bumping sharp from ^0.20.2 to ^0.21.0 should deal with the underlying cause.

@KyleAMathews
Copy link
Contributor

Thanks @lovell! Is there any breaking changes we should worry about?

@lovell
Copy link
Contributor

lovell commented Oct 8, 2018

Based on a quick scan of the gatsby-plugin-sharp source there is one deprecation that will affect you. The following change would be required to avoid warnings:

-    .resize(options.width, options.height)
-    .crop(options.cropFocus)
+    .resize(options.width, options.height, {
+      position: options.cropFocus
+    })

Full changelog at http://sharp.pixelplumbing.com/en/stable/changelog/#v0210-4th-october-2018

@pieh
Copy link
Contributor

pieh commented Oct 8, 2018

@WaylonWalker would you be up for bumping sharp version and adjusting gatsby-plugin-sharp code?

@WaylonWalker
Copy link
Author

@pieh I attempted, but am getting confused with some of the errors. I worked through the ones that seemed obvious to me. Some things seem unrelated, some seem related to node versions (testing setup??). Probably doesn't help that I am on a 40 kbps network at the moment, and working from the github ui only..

@pieh
Copy link
Contributor

pieh commented Oct 9, 2018

@pieh I attempted, but am getting confused with some of the errors. I worked through the ones that seemed obvious to me. Some things seem unrelated, some seem related to node versions (testing setup??). Probably doesn't help that I am on a 40 kbps network at the moment, and working from the github ui only..

Dependency changes are hard to test currently, I will get on it - thanks for doing what You already did!

@pieh pieh changed the title Clear _libvips cache on windows chore: update sharp to ^0.21.0 Oct 9, 2018
@WaylonWalker
Copy link
Author

Thanks @pieh, it looks very tricky. Especially not being too familiar with the codebase. Let me know if there is anything else I can do.

@DSchau
Copy link
Contributor

DSchau commented Oct 16, 2018

@WaylonWalker looks like the commit histories are a little screwy. Trying to iron it out, and then I'll test this locally. Thanks for your patience!

@DSchau
Copy link
Contributor

DSchau commented Oct 16, 2018

Well this was fun! 😅 I somehow managed to wipe the history, but I should have all the commits (and a successful merge) in WaylonWalker#1, so once we merge that we can re-open this!

Also so thankful for git reflog 🙏

pieh added a commit that referenced this pull request Oct 23, 2018
this is mostly same PR as #8898 with couple of tweaks (upgrading sharp everywhere so all packages use same version). Credits go to @WaylonWalker
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
this is mostly same PR as gatsbyjs#8898 with couple of tweaks (upgrading sharp everywhere so all packages use same version). Credits go to @WaylonWalker
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.

5 participants