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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): release plugin option validation #27437

Merged
merged 12 commits into from
Nov 2, 2020
1 change: 1 addition & 0 deletions packages/gatsby/src/utils/api-node-docs.ts
Expand Up @@ -431,6 +431,7 @@ export const onCreateDevServer = true

/**
* Called during `gatsby develop` bootstrap to get and validate a plugins options schema
* @gatsbyVersion 2.24.69
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wow, is the PR only that size? How is it working under the hood?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep! @DSchau implemented this way back in 2019 in #16105, I just didn't know! Soooo goooood 馃槏

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wow, this is an incredible feature! Thanks for pointing the PR, will study on that 馃殌

Copy link
Contributor

Choose a reason for hiding this comment

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

@mxstbr what do you think of arbitrarily bumping the version of Gatsby here? (e.g. to 2.25.0 or something)

Seems better user behavior (cc @vladar useful to think about as a concrete example of release cadence being useful!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I'm not quite following... How are users meant to upgrade to 2.25.0 if it doesn't exist yet? 馃

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh -- I mean bump the version locally and then ship this 馃殌

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's bump that version after we land #27381 and set the minimum version to that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this is going to need to be bumped to whatever version is the first to include the .default()s support from #27381 (which isn't merged yet).

* @param {Joi} $0.Joi The instance of Joi to define the schema with
*
*/
Expand Down