Open source changelog

Follow the evolution of Gatsby.

Subscribe to updates

Description

This PR fixes an issue with incorrect pagination logic introduced in a recent refactor: #32135

The previous attempt in #32319 in fact contains incorrect assumptions about pagination logic. The actual issue was not in paginate function itself but one level higher in the method that accounts for item paddings.

This PR fixes the issue and adds tests at the correct level of abstraction. The first commit is just a revert of #32319 so the actual fix is in the second commit (for the review): https://github.com/gatsbyjs/gatsby/commit/1d19c0825c03f238bb11524272ebb1e79a3fe20b

Fixes #32485

Description

This PR is a follow-up to #32305 After benchmarking on a heavy site we've learned that replaying actions for data dependencies is expensive. So basically this PR implements solution described in https://github.com/gatsbyjs/gatsby/pull/32305#issuecomment-880692093:

If data dependencies will be too expensive to sync this way - we can do a hybrid approach - forward/replay some actions and merge expensive parts all at once in the end.

Now we merge the data dependency state at the end of the build. It is still expensive but far less expensive than replaying all data dependency actions:

Description

This PR is a performance improvement for one specific usage scenario of the MDX plugin. It addresses inefficiency in the plugin when multiple GraphQL fields are requested that require MDX processing. An example query that is affected:

{
    mdx {
      mdxAST
      body
    }
}

In this case, the plugin starts two MDX processing tasks concurrently as shown on this chart:

image

This PR accounts for such a scenario and only processes MDX once. For MDX-heavy sites using this pattern, e.g.

This translates to the follow…

Description

add allow list to gatsby-admin to only include necessary files. I'm not sure why people are installing it as it shouldn't be.

Documentation

Related Issues

Description

This uses lmdb-store backed cache instance for storing/retrieving page query results (to generate final page-data file once everything is ready) instead of writing temporary files and reading them out later.

Benchmarks

Before change (LMDB, PQR, 5 workers):

run queries in workers - 359.396s - 25848/25848 71.92/s
Writing page-data.json files to public directory - 77.187s - 25847/25847 334.86/s
Total for those activities: 436.583s

With this change (LMDB, PQR, 5 workers):

run queries in workers - 301.939s - 25848/25848 85.61/s
Writing page-data.json files to public directory - 79.732s - 25847/25847 324.17/s…

Description

Relating to issue https://github.com/gatsbyjs/gatsby/issues/32274.

This PR adds a query for ShopifyLocation as well as ShopifyInventoryLevel nodes. We also add the InventoryItem field onto ProductVariant which we can link to …

Description

  • Adds Announcement component with an embedded livestream video to parts 2-5 of the Tutorial.
  • Adds a start time to the part 1 livestream embed (to skip over the initial chitchat).

Documentation

Livestream embeds are at the bottom of the Introduction section

  • /docs/tutorial/part-1
  • /docs/tutorial/part-2
  • /docs/tutorial/part-3
  • /docs/tutorial/part-4
  • /docs/tutorial/part-5

Description

Removes an unnecessary bullet point found in the docs

Documentation

N/A

Related Issues

N/A

Description

There are situations when some feature flag is set in the config but it is not available in a given environment. For example: LMDB_STORE is only available with Node 14.10+ but if you set it in gatsby-config.js and try running a build with Node 12 - it will silently ignore the flag and run with the in-memory store. Which may lead to confusion.

This PR adds a warning to notify you when some flag is set but has no effect. Here is how it looks in CLI output now:

image

[ch32258]

Description

Hi.

I noticed while following the current guide for implementing unit testing with Jest, on a Gatsby project with Typescript, that the path that is introduced in the begining for the file-mock.js, is not the same as the one in the Typescript part.

As I copy pasted the Typescript on top of the normal configuration, Jest broke, and I spend 10 minutes scratching my head around until I found that the line in the TS snippet has /tests/ and not /__mocks__.

As specified in a paragraph in the same page:

The convention is to create a directory called mocks in the root directory for this. Note the pai…

Description

Extra error details added in https://github.com/gatsbyjs/gatsby/pull/32301 assume that all errors will have .context.path. But errors can be not specific to any particular page and can be thrown when just importing html rendering bundle (example of such error would be https://github.com/gatsbyjs/gatsby/blob/a0b542be35c15e71f8fe76cc5400576dfd0b1391/integration-tests/gatsby-cli/gatsby-sites/gatsby-build-errors/src/pages/index.js)

Minor updates