v4.6 Release Notes
Welcome to gatsby@4.6.0
release (January 2022 #2)
Key highlights of this release:
- Speeding Up Subsequent Queries
- Tracking Image Changes in Markdown Files
- New Major Version for
gatsby-plugin-utils
Also check out notable bugfixes.
Bleeding Edge: Want to try new features as soon as possible? Install gatsby@next
and let us know
if you have any issues.
Speeding Up Subsequent Queries
Subsequent queries now get a ~10-15% performance boost! You’ll see this improvement after your first gatsby build
for all following runs (unless the cache is cleared). These percentage may defer depending on the complexity of nodes. We were able to achieve this by caching rootNode
& trackedRootNodes
across instances of graphqlRunner
via PR #33695
Tracking Image Changes in Markdown Files
When using an image inside markdown files together with gatsby-remark-images
(e.g. ![alt text](./some-image.jpg)
) there were cases when a change to the image wasn’t reflected in the site. Changes like resizing or directly editing the image required a gatsby clean
in the past. This broken functionality is now fixed with PR #34433 and changed images will now directly show during gatsby develop
and gatsby build
.
New Major Version for gatsby-plugin-utils
You can configure plugin options for your plugins and unit test the options schema using helper functions from gatsby-plugin-utils
. The schema validation for the options schema now does not throw errors anymore on warnings like unknown keys (see PR that implemented this for more information). This fixed an issue where default values where not passed through to the plugin if e.g. unknown keys were used.
Here’s a short list of changes you’ll need to make or be aware of:
pluginOptionsSchema
returns warnings instead of errors now for unknown keystestPluginOptionsSchema
now returnswarnings
andhasWarnings
in addition to the existing values- Default options you set in your plugin option schema are now correctly passed through to the plugin, even when a user sets unknown keys
Migration
Here’s a short before/after example on how to migrate your test when you’re checking for unknown keys.
Before:
After:
Notable Bugfixes & Improvements
gatsby-plugin-manifest
: Generate icons sequentially, via PR #34331create-gatsby
: Fixed an issue where user-providedGATSBY_TELEMETRY_DISABLED
environment variable did not disable telemetry, via PR #34495gatsby-sharp
: Create more resilient wrapper around sharp, via PR #34339gatsby-source-contentful
: Enable tag support for assets, via PR #34480gatsby
: Optimized queries that filter just onid
, via PR #34520
Contributors
A big Thank You to our community who contributed to this release 💜
newhouse: Update plugins.md to have correct URL for gatsby-plugin-segment-js PR #34397
janaagaard75: Upgrade to strip-ansi ^6.0.1 PR #34383
jazanne: Fix misspelling of “precedence” in log message PR #34428
axe312ger: fix(contentful): enable tag support for assets PR #34480
herecydev: fix(gatsby): handle session storage not being available PR #34525
njbmartin: fix(plugin-schema-snapshot): unlink file on init PR #34527
ShaunDychko: chore(docs): Update client-only self-hosting instructions PR #34537