weareyou / gatsby-source-umbraco

A source plugin for pulling content and media from Umbraco into Gatsby.
MIT License
12 stars 0 forks source link

Specify compatibility with Gatsby versions #2

Closed jessevdp closed 4 years ago

jessevdp commented 4 years ago

As explained very well in the blog post "Peer Dependencies" on the NodeJS blog, a plugin should express what versions of the host package it is compatible with. This is done through peerDependencies.

We need to figure out what versions of Gatsby this plugin is compatible with and list that in the package.json file.

jessevdp commented 4 years ago

Discussion in PR https://github.com/gatsbyjs/gatsby/pull/16041 suggests that the createSchemaCustomization hook was added in Gatsby ^2.12.

jessevdp commented 4 years ago

I read through the changelog. 2.12 should be the lowest compatible version. (I'm human though, changelogs aren't meant to be read by humans, or so it seems...) Should probably set the upper limit to 3.x versions, since we don't know what APIs will change.

That would make: >= 2.12.0 < 3 the correct Gatsby peer dependency version.