-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby-source-wordpress): Remove search and replace regex literal recommendation #31413
fix(gatsby-source-wordpress): Remove search and replace regex literal recommendation #31413
Conversation
@TylerBarnes Using I could add some extra code in the docs generation script, or force somehow the type to be a String, but using Any ideas ? Thoughts ? Maybe this should be a blocker, before the |
Does gatsby generate a graphql schema for the plugin options, and make it accessible from graphql ? If yes this means we cannot use Should we simply remove the sentence saying we recommend regex expression literal ? |
I finally simply removed the documentation string saying a regular expression literal was recommended. |
packages/gatsby-source-wordpress/src/steps/declare-plugin-options-schema.ts
Outdated
Show resolved
Hide resolved
…ons-schema.ts Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
Commited your change, rebased, should be good to go. |
Thanks @jooola ! |
My pleasure |
A regular expression literal generate a RegExp object at compile time. We need to allow string or object in the option schema.EDIT: I decided to remove the documentation entry recommending a Regex literal, instead of the above solution.
Improvements can be made in the future.
cc @TylerBarnes
Related Issues
Fix #31411
Related to #31091