-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(wordpress-source-plugin): create nodes properly for images who exceed maxFileSizeBytes #31318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! 🙌 just a couple tiny changes then LGTM!
packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js
Outdated
Show resolved
Hide resolved
packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js
Outdated
Show resolved
Hide resolved
… in terminal running jest with --watch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking awesome, just a few small things 😄
integration-tests/gatsby-source-wordpress/test-fns/data-resolution.js
Outdated
Show resolved
Hide resolved
integration-tests/gatsby-source-wordpress/test-fns/test-utils/get-gatsby-process.js
Show resolved
Hide resolved
packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js
Outdated
Show resolved
Hide resolved
@veryspry looks like the snapshots need to be updated. For these tests I usually just delete the snapshots and run the tests again since the |
Weird, I thought I already did that, but I must have changed the site structure to accommodate one of the most recent assertions 🤔 Anyways, snapshots have been updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great :D thanks again for this!
Description
The WordPress source plugin was returning incorrectly formatted node data for page/post
featuredImages
whose size exceeded themaxFileSizeBytes
config option. The result of this was that thefeaturedImage.node
field would be set tonull
and not return other relevant info about the featured image.This means that a query for
allWpPost
orallWpPage
will no longer return this result:Related Issues
Fixes #30755