v3.14 Release Notes
Welcome to gatsby@3.14.0
release (September 2021 #1)
This is the final minor release for gatsby v3. Gatsby v4 beta is already published behind the
next
npm tag and the next stable release will begatsby@4.0.0
. See what’s inside!We will keep publishing patches for 3.14.x with hotfixes until
4.0.0
stable is published and at least several weeks after.
Key highlights of this release:
- Better UX for navigation in the middle of deployment
- New developer tools -
createPages
snippet in GraphiQL and new GraphQL capability - Preparations for gatsby v4 - API deprecations; migration guide; docs
- Improvements for
gatsby-source-drupal
- New home for
gatsby-plugin-netlify
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.
Better UX for navigation in the middle of deployment
This release solves a common UX problem with navigation in the middle of deployment. Imagine the following scenario:
- Users loads a page
- New version of the site is deployed
- User tries to navigate to another page with
gatsby-link
However, nothing happens and there are some JS errors in the console.
It happens because paths of JS chunks change with the new deployment and so the old chunks cannot be found. This problem is now addressed in Gatsby automatically. Once we spot this error, the page is hard-reloaded for the user.
This was one of the most upvoted issues in our repo. See PR #33032 for details.
New developer tools
createPages
snippet in GraphiQL
Often, a developer will begin creating the site by examining their data layer in GraphiQL. They will then want to create pages based off of their initial query. For example:
Usually this will end up with this code in gatsby-node.js
:
Doing it manually is tedious, but now you can generate this snippet from GraphiQL
and paste to gatsby-node.js
!
See PR #32968 for details.
Added GraphQL aggregation fields to group
Now you can apply max
, min
, distinct
, sum
, group
to grouped nodes. In other words,
a query like this is now possible:
See PR #32533 for details.
Preparations for gatsby v4
Actions used for schema customization should not be used in sourceNodes
API anymore:
namely createTypes
, createFieldExtension
and addThirdPartySchema
.
Usage of those actions in sourceNodes
is deprecated as of this release and will break in Gatsby v4.
Also check out the migration guide (work in progress!) for other upcoming breaking changes and don’t hesitate to let us know what you think in GitHub discussion.
gatsby-source-drupal
improvements
The plugin got a fair share of improvements and bugfixes for warm and incremental builds:
- Fix GraphQL schema errors and crashes when deleting nodes, PRs #32971, #33099, #33143 and #33181
- Warn on bad webhook format: PR #33079
- Add tracing for full/delta fetches and http requests: PR #33142
New home for gatsby-plugin-netlify
The plugin is moved to https://github.com/netlify/gatsby-plugin-netlify Go check it out for the latest source code.
Notable bugfixes & improvements
gatsby
: make conditional page builds work with static queries, via PR #32949gatsby
: reduce page-renderer size, via PR #33051gatsby
: fix nesting of tracing spans + add docs for OpenTelemetry, via PR #33098gatsby
: don’t bundle moment locale files, via PR #33092gatsby
: add environment variable for setting tracing config file, via PR #32513gatsby
: Assign parentSpan to activities that were missing them, via PR #33122gatsby-source-contentful
: fix error “Unable to download asset”, via PR #33024gatsby-transformer-sqip
: ensure failed asset downloads do not break build, via PR #33037gatsby-plugin-google-tagmanager
: ability to serve gtm.js from “self-hosted” tagging server, via PR #32733gatsby-plugin-styled-components
: Add ability to disable vendor prefixes, via PR #33147
Contributors
A big Thank You to our community who contributed to this release 💜
tackaberry: feat(gatsby-plugin-google-tagmanager): add option for selfHostedOrigin PR #32733
ascorbic: chore: add missing
@babel/runtime
dependencies PR #32954Himadu2000: fix(starters): Formats for StaticImage PR #33057
actuallyatiger: chore(docs): Update GitHub Pages doc PR #29031
jabrks: fix(gatsby): Don’t bundle moment locale files PR #33092
nagiek: feat(gatsby): Add aggregation resolvers to group PR #32533
bartveneman: docs(gatsby-plugin-gatsby-cloud): fix typo: asterix -> asterisk PR #33135
rudouglas: chore(gatsby): add environment variable for setting tracing config file PR #32513
minimalsm: docs: Fix broken link on Getting Started with MDX page PR #33148