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

fix(gatsby-source-filesystem): Use new FileType methods to read file extension #27559

Closed
wants to merge 6 commits into from
Closed

fix(gatsby-source-filesystem): Use new FileType methods to read file extension #27559

wants to merge 6 commits into from

Conversation

ynnoj
Copy link
Contributor

@ynnoj ynnoj commented Oct 19, 2020

Description

Uses fromFile(), fromBuffer() methods to infer filetype/extension from the file/buffer, if not specified.

This fixes an issue where createRemoteFileNode may fail on URLs without an extension in the path.

Documentation

  • N/A

Related Issues

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 19, 2020
Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

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

lgtm. Thank you 💜

Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

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

Actually, tests show that bumping the package requires more changes

@pvdz pvdz added topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) type: bug An issue or pull request relating to a bug in Gatsby and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Oct 20, 2020
@ynnoj ynnoj changed the title fix(gatsby-source-filesystem): Use fromFile() to read file extension fix(gatsby-source-filesystem): Use new FileType methods to read file extension Oct 20, 2020
@ynnoj
Copy link
Contributor Author

ynnoj commented Oct 20, 2020

@pvdz Test suite still failing in CI, but seems unrelated to any changes in this PR.

FWIW, test suite ran and passed locally.

@Rikpat
Copy link
Contributor

Rikpat commented Oct 27, 2020

What is the state of this PR? I'm trying to use createRemoteFileNode to get profile images from Azure DevOps and the format is like aad.[somecode] and that doesn't work with the current createRemoteFileNode

@ynnoj ynnoj requested review from a team as code owners October 27, 2020 10:07
@ynnoj
Copy link
Contributor Author

ynnoj commented Nov 17, 2020

@pvdz @wardpeet Anything I can do to help move this along?

@pvdz
Copy link
Contributor

pvdz commented Nov 17, 2020

Let me rebase this for you and see whether tests are broken or just need to be rebased

@pvdz
Copy link
Contributor

pvdz commented Nov 18, 2020

--> #28156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createRemoteFileNode crashes when url doesn't have an extension
4 participants