-
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
gatsby-plugin-manifest doesn't allow app shortcuts #27927
Comments
Looks like there are other properties missing too, see #27839 |
Seems to me that was a breaking change - should have been expressed in the version number |
@barbalex I think you're right! I see you've worked round it in #27839 by downgrading - I think I'll do the same for the timebeing. I'm happy to submit a PR to add |
Not a breaking change, simply an oversight bug! Sorry about the troubles, looking forward to your PR @ediblecode 🙏 The code for this is in gatsby-plugin-manifest's |
@mxstbr I wish I could build such a big code base with so few (noticeable) bugs. Congrats and thanks for an overall astoundingly great job! |
The validation is incomplete for manifest. I have an old PR with the correct validation. I'll try and get that pulled forward and merged. I'll post a PR link here when I have it. |
Perfect, thanks @moonmeister, I'll hold off until you've found that that then, thanks. |
And related, there's a new flag coming to disable option validation, see #27885 which will be a nicer workaround than downgrading |
#27951 has the changes from the old PR. The spec version that validator was built against is over a year old. If anyone want's to help get it updated that'd be great. Current spec is here: https://www.w3.org/TR/2020/WD-appmanifest-20201019/ |
@moonmeister this looks great. I've been through with a fairly fine-toothed comb, and it looks like you've captured everything in the latest spec, so great work! I had a flick through various previous iterations of the spec, and although it's changed a lot, most are wording changes - it doesn't look like any properties have changed recently as far as I could tell. There are only a few, minor things I've spotted but they really are nitpicks:
|
I actually paused that PR to disable validation for a couple reasons (#27885 (comment)) mainly because I think we just merged in a more ideal solution, which is warning about invalid options rather than failing to build. If we find that we really need the bypass flag we could add it, but I think cases like this would be covered by what was done in #27938. |
Description
Adding app
shortcuts
to the plugin options in gatsby-plugin-manifest 2.5.0+ results in an Invalid plugin options errorI think this was caused by enabling 'plugin option validation', released in #27437 and published in 2.5.0 of gatsby-plugin-manifest. The new options validation doesn't include the
shortcuts
option. It worked before 2.5.0 - I've just upgraded from 2.4.21 where it was working.Steps to reproduce
shortcuts
to the plugin's options:Expected result
Shortcuts are added to the generated manifest.webmanifest
Actual result
You get the following CLI error:
Environment
System:
OS: Windows 10 10.0.19041
CPU: (4) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Binaries:
Node: 12.16.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.11
Browsers:
Chrome: 86.0.4240.183
Edge: Spartan (44.19041.423.0)
npmPackages:
gatsby: ^2.25.3 => 2.25.3
gatsby-plugin-catch-links: ^2.3.15 => 2.3.15
gatsby-plugin-eslint: ^2.0.8 => 2.0.8
gatsby-plugin-google-tagmanager: ^2.4.0 => 2.4.0
gatsby-plugin-manifest: ^2.5.2 => 2.5.2
gatsby-plugin-offline: ^3.3.2 => 3.3.2
gatsby-plugin-preact: ^4.0.16 => 4.0.16
gatsby-plugin-prefetch-google-fonts: ^1.4.3 => 1.4.3
gatsby-plugin-react-helmet: ^3.3.14 => 3.3.14
gatsby-plugin-sass: ^2.4.2 => 2.4.2
gatsby-plugin-sitemap: ^2.5.1 => 2.5.1
gatsby-plugin-split-css: ^1.0.2 => 1.0.2
gatsby-plugin-typescript: ^2.5.0 => 2.5.0
gatsby-react-router-scroll: 3.0.0 => 3.0.0
The text was updated successfully, but these errors were encountered: