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

Check exports.frontmatter before creating javascriptFrontmatter nodes #4100

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

cwgw
Copy link
Contributor

@cwgw cwgw commented Feb 17, 2018

Closes #4095.

This breaks the using-javascript-transforms example, which actually expected a js file without frontmatter to be included with allJavascriptFrontmatter during page creation.

I've included a simple fix for that as well—adding frontmatter to that file—but now I wonder if this is a more significant change than I'd previously thought.

That said, I still think it makes the most sense that the javascript frontmatter plugin only create nodes from files that actually export frontmatter.

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit 00d1505

https://deploy-preview-4100--gatsbygram.netlify.com

@m-allanson
Copy link
Contributor

It sounds like the behaviour you've added is more correct than the old behaviour, but creates a breaking change? @jbolda @KyleAMathews what's the best thing to do here? Can we give gatsby-transformer-javascript-frontmatter a major version bump?

@KyleAMathews
Copy link
Contributor

Since the plugin is brand new, I tend to be ok with doing what's technically breaking changes. You could think of this as a bug fix. It shouldn't actually break any code since people would have had to add JS code filtering out empty query results — that could would just cease to filter anything not break.

@KyleAMathews KyleAMathews merged commit 7077e7a into gatsbyjs:master Feb 19, 2018
@KyleAMathews
Copy link
Contributor

Thanks @cwgw!

@cwgw
Copy link
Contributor Author

cwgw commented Feb 20, 2018

Thank you for suggesting that I give it a shot. 👍

@jlengstorf
Copy link
Contributor

Hiya @cwgw! 👋

This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here.

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (We’ve got t-shirts and hats, plus some socks that are really razzing our berries right now.)
  2. If you’re not already part of it, we just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. You’ll receive an email shortly asking you to confirm. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again! 💪💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gatsby-transformer-javascript-frontmatter] Only create nodes from files that actually export frontmatter
5 participants