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

feat(gatsby-sharp): create more resilient wrapper around sharp #34339

Merged
merged 9 commits into from
Jan 18, 2022

Conversation

wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Dec 29, 2021

Description

Creates a new package that wraps sharp and is 100% async. When sharp throws an error when we requiring it, we will rebuild sharp once to see if that fixes the issue. Sharp broken binary is one of the error most people hit. This happens when people switch between os architectures (Windows, WSL, M1, Rosetta, ...)

This is helpful as we will be importing sharp into Gatsby by default so we want to be as resilient as possible.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 29, 2021
@wardpeet wardpeet added topic: media Related to gatsby-plugin-image, or general image/media processing topics and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 29, 2021
package.json Outdated Show resolved Hide resolved
@wardpeet wardpeet force-pushed the feat/gatsby-sharp branch 2 times, most recently from 22d303a to 128c5c8 Compare January 4, 2022 07:34
@wardpeet wardpeet changed the title feat(gatsby-sharp): create more resilient wrapper around sharp" feat(gatsby-sharp): create more resilient wrapper around sharp Jan 4, 2022
@wardpeet wardpeet force-pushed the feat/gatsby-sharp branch 5 times, most recently from 57fe17f to 696d197 Compare January 9, 2022 19:08
@wardpeet wardpeet marked this pull request as draft January 10, 2022 11:23
Comment on lines +5 to +11
babelrcRoots: [
// Keep the root as a root
`.`,

// Also consider monorepo packages "root" and load their .babelrc files.
`./packages/*`,
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows jest to use the babelrc inside a package instead of only the global one.

@wardpeet wardpeet marked this pull request as ready for review January 12, 2022 18:32
LekoArts
LekoArts previously approved these changes Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: media Related to gatsby-plugin-image, or general image/media processing topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants