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

Types for CreateRemoteFileNodeArgs['cache'] are inconsistent with Gatsby types #24735

Closed
ricokahler opened this issue Jun 3, 2020 · 1 comment · Fixed by #24750
Closed

Types for CreateRemoteFileNodeArgs['cache'] are inconsistent with Gatsby types #24735

ricokahler opened this issue Jun 3, 2020 · 1 comment · Fixed by #24750
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

Comments

@ricokahler
Copy link
Contributor

Description

It seems like the types for CreateRmoteFileNodeArgs['cache'] are no longer consistent with the types from Gatsby. This causes a type error when directly passing the cache from the CreateResolversArgs to createRemoteFileNode.

Steps to reproduce

clone this https://github.com/ricokahler/bug-repro-gatsby-source-filesystem-types.git

See this line:

https://github.com/ricokahler/bug-repro-gatsby-source-filesystem-types/blob/6370676bb8dd959f8b815f0a5d490e61956aeaf7/create-resolvers.ts#L34-L40

image

Expected result

No type error

Actual result

Seems like the types of the cache in the gatsby-source-filesystem changed and no longer matches the types from gatsby itself.

Environment

  System:
    OS: macOS 10.15.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.1 - /usr/local/bin/node
    Yarn: 1.22.0 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 83.0.4103.61
    Firefox: 76.0.1
    Safari: 13.0.3
  npmPackages:
    gatsby: ^2.22.15 => 2.22.15 
    gatsby-source-filesystem: ^2.3.10 => 2.3.10 
  npmGlobalPackages:
    gatsby-cli: 2.11.15
    gatsby: 2.20.6
@ricokahler ricokahler added type: bug An issue or pull request relating to a bug in Gatsby topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) labels Jun 3, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 3, 2020
@LekoArts LekoArts removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 3, 2020
@vladar
Copy link
Contributor

vladar commented Jun 3, 2020

You are correct - typings for createRemoteFileNode are stale. Should be fixed via #24750

Thanks for reporting this! 💜

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 a pull request may close this issue.

3 participants