You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I was attempting to transform the output of this plugin with gatsby-transformer-yaml, however, that transformer threw the following error: TypeError: Path must be a string. Received undefined. Fundamentally, it's because gatsby-transformer-yaml (as well as gatsby-transformer-json), attempt to set the type of the node it processes by reading the basename of a node.dir property. For reference, that happens here in the case of gatsby-transformer-json and here in the case of gatsby-transformer-yaml.
Instead of attempting to change the interface of a core transformer package, I figure the more appropriate compatibility change should happen here. I've created a PR that fixes this issue for your review. In that PR, I changed the name of the relativeDir key to dir, as they would otherwise be redundant (and therefore, this would be a breaking change). If you would rather this not be a breaking change, I'm happy to add dir in as an additional property and keep relativeDir.
Thanks in advance for considering the change!
The text was updated successfully, but these errors were encountered:
After some further thought on this, what would you think about going a step further and matching the interface of nodes created by gatsby-source-filesystem? Some of those properties might not be feasible give the Octokat API, but I'd be happy to update my PR to try to match as many of the properties on GithubFiles as possible.
Thanks for this great plugin!
As I was attempting to transform the output of this plugin with
gatsby-transformer-yaml
, however, that transformer threw the following error:TypeError: Path must be a string. Received undefined
. Fundamentally, it's becausegatsby-transformer-yaml
(as well asgatsby-transformer-json
), attempt to set the type of the node it processes by reading the basename of anode.dir
property. For reference, that happens here in the case ofgatsby-transformer-json
and here in the case ofgatsby-transformer-yaml
.Instead of attempting to change the interface of a core transformer package, I figure the more appropriate compatibility change should happen here. I've created a PR that fixes this issue for your review. In that PR, I changed the name of the
relativeDir
key todir
, as they would otherwise be redundant (and therefore, this would be a breaking change). If you would rather this not be a breaking change, I'm happy to adddir
in as an additional property and keeprelativeDir
.Thanks in advance for considering the change!
The text was updated successfully, but these errors were encountered: