Skip to content
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-source-contentful: Performance problems with 100+ entries #25464

Closed
esped-dfds opened this issue Jul 2, 2020 · 19 comments · Fixed by #25954
Closed

gatsby-source-contentful: Performance problems with 100+ entries #25464

esped-dfds opened this issue Jul 2, 2020 · 19 comments · Fixed by #25954
Labels
topic: performance Related to runtime & build performance topic: source-contentful Related to Gatsby's integration with Contentful

Comments

@esped-dfds
Copy link

esped-dfds commented Jul 2, 2020

I'm looking into switching from gatsby-source-graphql to gatsby-source-contentful in order to better support incremental or conditional builds

In the process I've identified two performance problems. One is inside client.sync()

currentSyncData = await client.sync(query)
for which I created this issue with contentful: contentful/contentful-resolve-response#30

The other is in

currentSyncData.entries.forEach(normalize.fixIds)

The line: currentSyncData.entries.forEach(normalize.fixIds) will perform a n^2 traversel of all entries

I've tested on a POC level

exports.fixIds2 = (object) => {
  if (!object || typeof object !== `object`) return
  const { sys } = object
  if (sys) {
    sys.contentful_id = sys.id
    sys.id = fixId(sys.id)
  }
}

Seems to be sufficient when doing a full sync. If however GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES it is needed to traverse like today. I don't have the exact numbers but I estimate it would take several hours to complete fixIds for our dataset(I did not have the patience to complete it). With fixIds2 it is a few seconds.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 2, 2020
@LekoArts LekoArts changed the title Performance problems with 100+ entries gatsby-source-contentful: Performance problems with 100+ entries Jul 2, 2020
@LekoArts LekoArts added topic: source-contentful Related to Gatsby's integration with Contentful topic: performance Related to runtime & build performance and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 2, 2020
@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

Very interesting!

I've looked at this fixIds function before but I'm not seeing the n^2 runtime you're seeing. I'll walk through it explicitly, also to verify I didn't miss anything. IIRC my conclusion was that it's just expensive because it walks every property recursively and there's no painless quick way to do that in JS.

This is the current state on master, except comments are mine for this reply:

const shouldBeSkipped = (object, alreadyWalkedObjectRefs) =>
  !object || typeof object !== `object` || alreadyWalkedObjectRefs.has(object)

const fixIds = object => {
  if (!object || typeof object !== `object`) return
  // Front of objects to walk, in a loop rather than "just" recursively
  const objectsToProcess = [object]
  // Cyclic dependency failsafe
  const alreadyWalkedObjectRefs = new Set(objectsToProcess)
  // As long as we have objects to process, process the next one
  while (objectsToProcess.length !== 0) {
    const current = objectsToProcess.pop()
    // If current value is an array, process all elements that are objects and we haven't checked before
    if (Array.isArray(current)) {
      current.forEach(item => {
        // Make sure we don't stackoverflow for cyclic dependencies (and ignore non-objects)
        if (shouldBeSkipped(item, alreadyWalkedObjectRefs)) return
        objectsToProcess.push(item)
        // Make sure we don't process this object more than once
        alreadyWalkedObjectRefs.add(item)
      })
      continue
    }
    // current is an object and not an array or function, visit all its keys ("recursively")
    Object.keys(current).forEach(key => {
      const currentProp = current[key]
      // Make sure we don't stackoverflow for cyclic dependencies (and ignore non-objects)
      if (shouldBeSkipped(currentProp, alreadyWalkedObjectRefs)) return
      // This is our needle. Or one of them, anyways
      if (key === `sys` && !currentProp.contentful_id) {
        currentProp.contentful_id = currentProp.id
        currentProp.id = fixId(currentProp.id)
      }
      // Prepare to recurse and make sure we don't visit this object again in this function
      objectsToProcess.push(currentProp)
      alreadyWalkedObjectRefs.add(currentProp)
    })
  }
}

So as far as I can see, inside this function there's no O(N^2) going on. It is expensive because visiting arbitrary properties on objects can be expensive, especially at scale. (Please do correct me if I made an error in this analysis!)

That said, your fix might work because in your dataset there is no occurrence of sys in properties that aren't toplevel. I'm not sure what the rule is around that and would love to know more about it. If a lower level sys is an edge case rather than the common case, then we should look into that because it will absolutely make a massive difference in perf if we don't have to visit all the individual properties of the entire model...

@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

I should add, if currentSyncData.entries contains duplicate entries, then yes those will not be deduped and always visited. I don't expect that tot be the case..?

@esped-dfds
Copy link
Author

I added some log statements and alreadyWalkedObjectRefs.size is rutinely > 10000 for our dataset. Considering fixIds is called for all entries it is getting pretty close to n^2

This may be due to how our data is connected in contentful where basicly every entry is connected to most of the website because we have type called url-slug which is used both for defining a page, but also when creating links to other pages. I'm not 100% sure if this is a standard way of doing things.

@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

I'd love to get rid of this fixids step entirely because it takes so much time for such a superficial update. I'm not familiar with Contentful's own model, or how it delivers it to us, so I'm unfortunately not in a position to give any insights into that.

@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

Maybe we can data.replace(/sys: {id: ([^,}])/g, 'sys: {contentful_id: $1, id: ' + blabla($1) +' or some hack on the input data set :D

@esped-dfds
Copy link
Author

esped-dfds commented Jul 2, 2020

I'm not sure I understand the reason for fixIds being there. Initially I expected id to be the contentful id. I don't know why we need both id and contentful_id

@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

I'm going to see if we can get rid of this step entirely. Non-trivial and a breaking change (people can query the contentful_id field, so somebody will be doing that, so it's a breaking change) but that's not a big blocker. Thanks for putting this on my radar again.

@esped-dfds
Copy link
Author

Great! I would think for most developers, they would only use contentful_id and not id if they need to hardcode an id since it is not obvious how to get the value for id (I believe some kind of deterministic guid)

@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

While this isn't landed, you could try something like #25473

That's basically what you already had above.

@pvdz
Copy link
Contributor

pvdz commented Jul 2, 2020

PS. you can do gatsby build --verbose to get the internal node counts. Will be printed during bootstrap (there will be another line after createPages). Can not be used together with CI=1. This might give you some insight into how the data is internally represented.

@esped-dfds
Copy link
Author

Here you go. This is with a patch for contentful/contentful-resolve-response#30 otherwise it is not possible to complete it at all.

C:\Users\esped\projects\dotcom\apps\dfdsdotcom>yarn build --verbose
yarn run v1.22.4
$ yarn validate:schema
$ node ./scripts/validate-local-schema.js
$ gatsby build --verbose
verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "build"
verbose loading local command from: C:\Users\esped\projects\gatsby\packages\gatsby\dist\commands\build.js
verbose running command: build
success open and validate gatsby-configs - 0.029s
success load plugins - 0.328s
success onPreInit - 0.005s
success delete html and css files from previous builds - 0.011s
success initialize cache - 0.029s
success copy gatsby files - 0.130s
success onPreBootstrap - 0.026s
success createSchemaCustomization - 0.009s
Starting to fetch data from Contentful
info Fetching default locale
info default locale is: en
info contentTypes fetched 177
info Updated entries 106862
info Deleted entries 0
info Updated assets 7898
info Deleted assets 0
Fetch Contentful data: 4509777.277ms
total nodes 170678
total nodes 7898
success source and transform nodes - 4536.748s
success building schema - 26.234s
success createPages - 0.029s
success createPagesStatefully - 0.003s
success updating schema - 0.084s
success onPreExtractQueries - 0.004s
success extract queries from components - 1.507s
success write out redirect data - 0.003s
success onPostBootstrap - 0.002s
info bootstrap finished - 4569.342s
success run page queries - 0.032s - 1/1 30.86/s
success write out requires - 0.013s
warn Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
success Building production JavaScript and CSS bundles - 91.652s
success Rewriting compilation hashes - 0.009s
success Building static HTML for pages - 17.254s - 1/1 0.06/s
success onPostBuild - 0.002s
info Done building in 4687.072297999 sec
Done in 4689.53s.

@pvdz
Copy link
Contributor

pvdz commented Jul 6, 2020

I presume this is a warm build? It looks like this site builds 8k pages and has 170k internal nodes. I'd love to see the output of a cold build (one preceded by gatsby clean).

I'm going to work on getting the removal of the id normalization in under a flag. It can't just be dropped because it's backwards breaking so we must wait until we publish a major. And since there's another big change coming up we want to wait for that before bumping the major.

Fwiw, I guess the warm build takes ~3 minutes if you discount the remote fetch time.

It also looks like you could improve the schema, as that 26s step ought to be <5s for any site and at this scale probably sub second. So it's likely the schema doesn't exist or is incomplete, forcing a scan, which is very time consuming.

I wonder what the 30s run query step is because it shouldn't really take 30s for one file. But that could have many reasons so I can't tell from this print.

There's a 1.5 minutes spent on the JS bundle which tells me there's a lot of JS being bundled. One thing you could try, for development, is using the --no-uglify flag. If you have a massive amount of JS files then minification will take a long time. We can't fix that but you could use something like the bundle analyser to figure out potential webpack improvements. (Also, if it takes 90s for webpack to run and it spits out a lot of JS then that means your website ships a lot of JS which is unlikely what you want either).

@esped-dfds
Copy link
Author

esped-dfds commented Jul 7, 2020

Thanks for the feedback. I'm not sure if it was a warm build, but I've made two cold builds(but with a caching proxy server) with EXPERIMENTAL_CONTENTFUL_SKIP_NORMALIZE_IDS=1, first one normal and then one with --no-uglify

root@0b534184295c:/code/dotcom/apps/dfdsdotcom# yarn build --verbose
yarn run v1.22.4
$ yarn validate:schema
$ node ./scripts/validate-local-schema.js
$ gatsby build --verbose
verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "build"
verbose loading local command from: /code/dotcom/node_modules/gatsby/dist/commands/build.js
success open and validate gatsby-configs - 0.040s
success load plugins - 0.196s
success onPreInit - 0.005s
success delete html and css files from previous builds - 0.026s
success initialize cache - 0.031s
success copy gatsby files - 0.055s
success onPreBootstrap - 0.026s
success createSchemaCustomization - 0.012s
Starting to fetch data from Contentful
info Fetching default locale
info default locale is: en
info contentTypes fetched 177
info Skipping normalization of `.id`, this means `sys` objects will not get a `.contentful.id`
info Updated entries 106862
info Deleted entries 0
info Updated assets 7898
info Deleted assets 0
Fetch Contentful data: 47954.646ms
success source and transform nodes - 99.490s
success building schema - 53.550s
⠀
success createPages - 0.129s
success createPagesStatefully - 0.236s
success onPreExtractQueries - 0.006s
success update schema - 0.263s
success extract queries from components - 2.812s
success write out requires - 0.014s
success write out redirect data - 0.003s
success onPostBootstrap - 0.004s
⠀
info bootstrap finished - 161.508s
⠀
success Building production JavaScript and CSS bundles - 170.396s
success Rewriting compilation hashes - 0.297s
success run queries - 171.675s - 5/5 0.03/s
[                            ]   0.002 s 0/5 0% Building static HTML for pages
success Building static HTML for pages - 39.912s - 5/5 0.13/s
success onPostBuild - 0.004s
info Done building in 388.365720736 sec
Done in 392.71s.

and with --no-uglify

root@0b534184295c:/code/dotcom/apps/dfdsdotcom# yarn build --verbose --no-uglify
yarn run v1.22.4
$ yarn validate:schema
$ node ./scripts/validate-local-schema.js
$ gatsby build --verbose --no-uglify
verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "build"
verbose loading local command from: /code/dotcom/node_modules/gatsby/dist/commands/build.js
success open and validate gatsby-configs - 0.027s
success load plugins - 0.140s
success onPreInit - 0.004s
success delete html and css files from previous builds - 0.013s
success initialize cache - 0.010s
success copy gatsby files - 0.026s
success onPreBootstrap - 0.015s
success createSchemaCustomization - 0.005s
Starting to fetch data from Contentful
info Fetching default locale
info default locale is: en
info contentTypes fetched 177
info Skipping normalization of `.id`, this means `sys` objects will not get a `.contentful.id`
info Updated entries 106862
info Deleted entries 0
info Updated assets 7898
info Deleted assets 0
Fetch Contentful data: 36228.289ms
success source and transform nodes - 76.323s
success building schema - 40.681s
⠀
success createPages - 0.031s
success createPagesStatefully - 0.093s
success onPreExtractQueries - 0.003s
success update schema - 0.215s
success extract queries from components - 1.998s
success write out requires - 0.010s
success write out redirect data - 0.003s
success onPostBootstrap - 0.003s
⠀
info bootstrap finished - 122.841s
⠀
success Building production JavaScript and CSS bundles - 101.374s
success Rewriting compilation hashes - 0.007s
success run queries - 101.719s - 5/5 0.05/s
[                            ]   0.002 s 0/5 0% Building static HTML for pages
react-i18next:: You will need pass in an i18next instance by using initReactI18next
success Building static HTML for pages - 25.212s - 5/5 0.20/s
success onPostBuild - 0.008s
info Done building in 260.723229602 sec
Done in 263.89s.

@pvdz
Copy link
Contributor

pvdz commented Jul 7, 2020

These don't look like warm builds, unless you have a 5 page site here :) The public and .cache dirs need to be dropped for a cold build, and that's essentially all that gatsby clean does. This was 5 pages:

success run queries - 101.719s - 5/5 0.05/s
success Building static HTML for pages - 25.212s - 5/5 0.20/s

The two runs also wildly differ, remote fetch is 11s faster, sourcing 23s, schema 13s. The flag only affects webpack's minification step. Strange but could have any number of reasons.

Anyways, talking about the minification. Comparing these two builds minification takes a bit over a minute. I'm going to guess there are JS bundles of over 1mb, probably 2mb or maybe even 3mb... Would be good to look at that.

@pvdz
Copy link
Contributor

pvdz commented Jul 7, 2020

100s for 5 pages is also an indication that there's either more going on than "just" 5 pages, or that these pages are huuuuge.

@esped-dfds
Copy link
Author

No these two builds are cold(but with a caching http proxy in between)

This is just a POC for gatsby-source-contentful where I did createPage for two pages. The contentful environment however is the full website(which currently uses gatsby-source-graphql)

@esped-dfds
Copy link
Author

success source and transform nodes - 99.490s

Makes since there are however 100+ entries it needs to create nodes for.

but yes success Building production JavaScript and CSS bundles - 101.374s seems a bit strange since there are so few pages - Maybe I'll try and dig deeper

@pvdz
Copy link
Contributor

pvdz commented Jul 7, 2020

fwiw, it's the run queries 100s step I wonder about. You're right that sourcing is going to take a lot of time if all the content is pushed regardless. But the run query step should only concern itself with the 5 pages you're testing and so it shouldn't take 100s. Something fishy going on there.

As for the JS bundle; it only takes one large dependency to blow up so that's not a big surprise. Use the bundle analyzer plugin to get better insight into JS bundle weight and distribution. Very helpful. Also check your public dir to see the size of the .js files there.

@axe312ger
Copy link
Collaborator

Hey there,

FYI: working on getting the fix into our gatsby source plugin.

Will keep u posted

Best,
Benedikt

johno added a commit that referenced this issue Aug 3, 2020
* feat(gatsby-recipes): Pass data retrieved from the resource to its children via context

* chore(gatsby-recipes): Swap out Promise.all for a true queue

* feat(gatsby-recipes): Implement a render loop for nested resources

* Continue spiking out recipes gui

* Hardcode the project root in a clear place for now

* Join plan steps in order to create entire recipe plan at once + initial efforts on GUI

* WIP

* feat(gatsby-recipes): Implement a wait for input state when props are missing for a resource

* chore(gatsby-recipes): Use an INVALID_PROP event for schema validation

* feat(gatsby-recipes): Wrap intro and each step with components, add metadata

* chore(gatsby-recipes): Spike out basic gui component for steps

* feat(gatsby-recipes): Pass data retrieved from the resource to its children via context

* chore(gatsby-recipes): Swap out Promise.all for a true queue

* feat(gatsby-recipes): Implement a render loop for nested resources

* Continue spiking out recipes gui

* Hardcode the project root in a clear place for now

* Join plan steps in order to create entire recipe plan at once + initial efforts on GUI

* WIP

* feat(gatsby-recipes): Implement a wait for input state when props are missing for a resource

* chore(gatsby-recipes): Use an INVALID_PROP event for schema validation

* feat(gatsby-recipes): Wrap intro and each step with components, add metadata

* chore(gatsby-recipes): Spike out basic gui component for steps

* Lots of styling changes

* Put text & resources in same steps

* Lots more styling tweaks

* paragraphs had too much margin bottom

* more style tweaks

* feat(gatsby-recipes): Implement a wait for input state when props are missing for a resource

Also adds the use of an INVALID_PROP event for schema validation.

* chore(gatsby-recipes): Use MDX v2 canary for access to the JSX AST

* feat(gatsby-recipes): Apply a UUID prop to all resources for input handling

* checkin: Begin wiring up event for passing input data to server

* fix(gatsby-recipes): Update step wrapping for MDX v2

* fix(gatsby-recipes): Get tests passing, add debugging output

* Get applying working

* PROGRESSSSS

* feat(gatsby-recipes): Allow for inputs based on uuid to override props

* Remove sleep

* style tweaks

* Add updater to input provider, spike out File form

* feat(gatsby-recipes): Implement basic input functionality

* feat(gatsby-recipes): Spike out a contentful space resource, use renderer for applying plan

* feat(gatsby-recipes): Spike out contentful provider and basic rendering (#24655)

* feat(gatsby-recipes): Spike out contentful provider and basic rendering

* Update packages/gatsby-recipes/src/gui.js

* WIP

* More design tweaks

* Style inline code

* Update packages/gatsby-recipes/recipes/cypress.mdx

Co-authored-by: Marcy Sutton <[email protected]>

* Update packages/gatsby-recipes/recipes/cypress.mdx

Co-authored-by: Marcy Sutton <[email protected]>

* Update packages/gatsby-recipes/recipes/cypress.mdx

Co-authored-by: Marcy Sutton <[email protected]>

* feat(gatsby-recipes): fix MDX rendering for exports (#25133)

* feat(gatsby-recipes): Handle exports, render MDX directly

* Continue working towards proper exports

* Continue implementing MDX renderer v2

* More MDX rendering hacking

* Finish basic export handling

* Small fixes

Co-authored-by: John Otander <[email protected]>

* live updating is working more-or-less

* Speedups & cleanups

* Rename hook to match signature

* Rename context

* Add support for useResourceByKey

* fix @babel/template not accepting integers as options

* Only update resources when it's changed

* make child Resource components work

* rename useResourceByKey -> useResource

* Implement ContentfulEntry resource

* Add useProvider & ensure only apply resource once

* Address some design feedback

* Fix spacing for input forms

* Fix spacing and size of step indicator

* Flatten nested resources in display

* Use input builtins from gatsby-interface

* Add special file diff

* Get things running again

* Reload recipe session on changes

- when the recipe file is updated
- when the recipe api is restarted
- when the browser is refreshed.

* Update tests

* Only emit updates when the state has actually changed

* Fix building recipe component

* update resolutions/dependencies

* fix fetch dependency

* moer fixes

* Upgrade to Ink v3 & start migrating cli to showing all steps

* Properly handle nested resources when rendering the plan (#25930)

* Don't hardcode port

* Ensure that nested resource get resourceName populated

* feat(gatsby-recipes): Refactor CLI UI for new one-shot show plan (#25939)

* feat(gatsby-recipes): Refactor CLI UI for new one-shot show plan

* Restore experimental message + showing list of recipes to run

* Add a --develop command for hot-reloading of recipes

* Add --install command support

* Remove unused code + old pre Ink v3 logging system

* Cleanup + show step count

* Remove console.log

* add key

* small fixes + add script to start dev server

* Add dev instructions for running the recipes graphql server in the foreground

* small fixes

* @babel/standalone caches transforms unless you delete the require cache

* fix linting problems

* Extract shared code into common library

* Checkin useInput beginning

* Ensure that diff html isn't rendered by escaping

* Update providers snapshots, looked like they weren't run with chalk turned off

* Update other snapshots as well

* Begin fixing some lint errors

* Fix some more lint errors

* Fix grabbing the right resource

Co-authored-by: John Otander <[email protected]>

* move back to v2 for deploying for compatability with the regular CLI

* Also do a compatability layer for <Box>

* test

* Add missing dependency

* sad

* Add rollup to bundle the cli app so we can use Ink v3

* Move packages packed by rollup to be dev dependencies as user won't need to download them

* Remove console.logs

* Remove logs

* feat(gatsby-recipes): copy edits for some recipes (#26009)

* Fix rendering li > p

* Fix formatting of emotion recipe

* Improve recipe

* Name of key changed

* Match keyed resources correctly in the install step + cleanups

* Fix linting errors

* fix margin

* Surround inlineCode with back ticks so it looks like markdown

* vendor ink-link as it's not upgraded to v3 yet

* feat(gatsby-recipes) (#26085)

* prettier file

* Fix linting errors

* feat(gatsby-recipes): fix recipes copy 2 (#26115)

* feat(gatsby-recipes)

* second half of copy edits

donezo!

* feat(gatsby-source-shopify): Add shopifyShop query (#25763)

* Start moving gatsby-telemetry to typescript (#25812)

* Fix camelCase

* Start moving gatsby-telemetry to ts

* Continue converting base to typescript

* Debug transpilation issues

* Debug transpilation issues

* Fix telemetry tests

* Add Changelog entry for merged PR #24306

* chore(gatsby-telemetry): Migrate is-truthy to TypeScript (#25884)

* Detect vercel again after rebranding in gatsby-telemetry (#25883)

* Detect vercel again after rebranding as per https://vercel.com/docs/v2/build-step

* Add another Vercel NOW matcher

* chore(gatsby-telemetry): Migrate flush to TypeScript (#25886)

* feat(gatsby-source-shopify): set link from product variant to product (#25316)

* fix: update www (#25874)

Co-authored-by: Renovate Bot <[email protected]>

* docs(gatsby-internals): update page -> node dependency tracking (#25606)

* docs(gatsby-internals): update page -> node dependency tracking

* Apply suggestions from code review

Co-authored-by: Aisha Blake <[email protected]>

* remove surplus `and` from performance comma list (#25891)

* fixed typo (#25896)

* fix(gatsby): Support symlinks in static directories (#25894)

* Added the link to 'MDX' (#25905)

* Update localization-i18n.md (#25902)

Some important links for **React-intl** had broken due to update in repo whose links were given. Added the correct links to it.

* added a cookieflags option (#25907)

Co-authored-by: Thijs van Diessen <[email protected]>

* fix(readme): gatsby-source-shopify: unify variable names (#25882)

* chore(showcase): Add MongoDB Developer Hub (#25892)

* Add file names to code blocks (#25879)

* enhancement(docs): dictionary.txt -> CodePen -> fix brand name (#25875)

* feat(gatsby-admin): list all pages of site (#25744)

* feat(gatsby-admin): plugin search (#25903)

* Copy plugin search from www into admin

* Move to Combobox search

* Cleanup

* TypeScript cleanup

* add algolia types

* Fix syntax

* fix: Restore CLI port in use prompt feature (#25863)

* fix: Restore CLI port in use prompt feature

Seems like it got accidentally removed during a big PR?

* fix: Ensure port var types are the same

The CLI option and default value for `port` is a string, despite the TypeScript typing the arg to `number`.

Unclear if `port` should be a `number` elsewhere, so checking for and converting to a number within the utility.

* Fix/follow up 25863 (#25915)

* fix: Restore CLI port in use prompt feature

Seems like it got accidentally removed during a big PR?

* fix: Ensure port var types are the same

The CLI option and default value for `port` is a string, despite the TypeScript typing the arg to `number`.

Unclear if `port` should be a `number` elsewhere, so checking for and converting to a number within the utility.

* Force program.port to a number early

Co-authored-by: polarathene <[email protected]>

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Capture repositoryId from heroku (#25910)

* Capture repositoryId from heroku

* Add comments

* fixed typo (#25912)

* Update README.md (#25901)

No need to link to `example.com` it's a sample domain.

* Add __BASE_PATH__ definition to storybook config (#25643)

* Add __BASE_PATH__ definition to storybook config

* Globals need not be defined for Storybook Docs

Update to Docs: Removes the need to declare the `__BASE_PATH__` and `__PATH_PREFIX__` in the Storybook config for Tests to work

* fix(gatsby): don't place virtual modules in node_modules directory (#25720)

* fix(gatsby): don't place virtual modules in node_modules directory

* fix eslint rule

Co-authored-by: Ward Peeters <[email protected]>

* chore(doc):Add guide to Deploy Gatsby to DigitalOcean droplet.  (#24652)

* Added doc for deploying to digitalocean droplet

Added doc for deploying gatsby site to digitalocean droplet and configuring domain name with SSL. For issue #24549 .

* Updated with deploying to digitalocean droplet doc

Updated with deploying to digitalocean droplet doc to fix issue #24549.

* Added missing code language flag to fix lint check

Lint Check failed due to one code language flag was missing in one of the code snippet in the md file. Fixed that.

* Updated grammar and styles as per code review

Co-authored-by: Marcy Sutton <[email protected]>

* Removed the line for brevity

* Updated grammar change for line #11 as per code review

* Ran prettier to format the code

* Added step to install dependencies after cloning

* Change case of node to Node as per suggestion.

Co-authored-by: Marcy Sutton <[email protected]>

* Changing optional to required for installing version of Node

Gatsby required Node 10, so making the use of n package while installing the Node on digitalocean as a REQUIRED step.

Co-authored-by: Marcy Sutton <[email protected]>

* Adding suggested changes for better understanding.

Co-authored-by: Marcy Sutton <[email protected]>

* Adding the suggested changes.

Using "Generate your Gatsby site for production" instead of "Build your gatsby site to generate static site for production"

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per suggestion by moderator

Making the docs style changes as suggested by moderator marcysutton

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per the suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Update docs/docs/deploying-to-digitalocean-droplet.md

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per the suggestion

Adding path resemble line to make it easy for people to understand the path

Co-authored-by: Marcy Sutton <[email protected]>

* Adding changes as per the suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per the suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Added snippet to get rid of permission denied

Added snippet to get rid of permission denied while cloning the repository

* Adding indentation as per linting rules

* Ran prettier

* Updating grammar as per suggested

Co-authored-by: Marcy Sutton <[email protected]>

* Added note to copy local repo path for future ref

* Ran prettier to format the code

Co-authored-by: Marcy Sutton <[email protected]>

* Update migrating-from-v1-to-v2.md (#25832)

* fix dictionary for digitalocean guide (#25936)

* fix(docs): show where `getNodesByType` comes from (#25344)

* show where getNodesByType comes from

* indicate the code is an example per PR feedback

Co-authored-by: Marcy Sutton <[email protected]>

Co-authored-by: Marcy Sutton <[email protected]>

* chore(docs): Changes to "Setting Up Your Local Dev Environment" doc (#25721)

* chore(gatsby): add log to gatsby develop if Admin is enabled (#25943)

* feat(gatsby): Defer node mutation during querying (#25479)

* Move bootstrap into machine

* Add parent span and query extraction

* Add rebuildSchemaWithSitePage

* Use values from context

* Remove logs

* Add redirectListener

* Changes from review

* Log child state transitions

* Add state machine for query running

* Changes from review

* Changes from review

* Switch to reporter

* Use assertStore

* Remove unused action

* Remove unusued config

* Remove unusued config

* Add gql runner reset

* Handle node mutation queuing and batching in state machine

* Use new pagedata utils

* Use develop queue

* New xstate syntax

* Work-around xstate bug

* Track first run

* Track first run

* Disable --quiet in e2e

* Don't defer node mutation if we're outside the state machine

* Re-quieten e2e

* Listen for query file changes

* Lint

* Handle webhook

* Changes from review

* Fix typings

* Changes from review

* Typefix

* feat(gatsby): Move final parts into develop state machine (#25716)

* Move remaining parts into state machine

* Move top level state machine into state machines dir

* Add machine ids

* Add missing imports

* Resolve api promises

* Remove unused action

* Move logging into helper

* Changes from review

* Manually save db

* Add comments

* Remove first run from query running

* Refactor into separate data layer machines

* Fix condition

Co-authored-by: gatsbybot <[email protected]>

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* fix(docs): Fix broken mdx (#25946)

* chore(gatsby-admin): build in postbuild of gatsby instead of prepublish (#25940)

* Move admin to postbuild of gatsby

* Remove prepublish gatsby-admin build

* Dont run tests in .cache

* Ignore _tests_ in .cache

* Use local copy of Gatsby to build gatsby-admin

* perf(gatsby-source-contentful): speed up resolving of huge spaces (#25954)

closes #25464

* docs: use hello-world starter in quick start guide instead of default starter (#25914)

* Small tweak to see if we can reduce errors driven by the default starter using  and its dependency on sharp.

* chore: format

* Reverted working directory name

A change to address feedback about changing the name to preserve continuity with current manual recipes.

Co-authored-by: gatsbybot <[email protected]>

* chore(docs): Fix RFC typo (#25970)

* chore(gatsby-admin): cleanup stale artifacts pre build (#25972)

* Handle webpack in state machine (#25815)

Co-authored-by: gatsbybot <[email protected]>

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]

* fix(gatsby-admin): show error messages in the interface (#25944)

* docs(gatsby-admin): more detailed architecture explanation (#25941)

* Write more detailed Admin architecture docs

* Add section on production deployment to gatsby-admin docs

* Absolute URLs so they work on npm etc.

* Fix pronouns and wording

* Clean up some more

* Tighten up language around production deployment

Co-authored-by: Brent Jackson <[email protected]>

* Update packages/gatsby-admin/README.md

Co-authored-by: Brent Jackson <[email protected]>

Co-authored-by: Brent Jackson <[email protected]>

* fix(gatsby): call predicate for the root ancestor in findRootNodeAncestor (#25974)

* fix(gatsby-admin): small design tweaks (#25971)

* feat(gatsby): Add internal types export (#25921)

* Handle webpack in state machine

* Add internal export

* feat(plugin-manifest): support SVG favicon (#25276)

Co-authored-by: Yogi <[email protected]>

* maintenance(www) remove unused dependencies (#25463)

Co-authored-by: Aisha Blake <[email protected]>

* Update contributor-swag.md (#25980)

Based on a recent increase in the volume of requests, I'm updating how people can request their free Gatsby swag for contributions that aren't made on GitHub.

* feat(gatsby-source-filesystem): improve wrong url rejection message (#25965)

* feat(gatsby-source-filesystem: improve wrong url rejection message

The existing message made tracing down a bug from within the new WP source plugin harder than necessary.

Old message: `wrong url: ${url}`

Updated message: `url passed to createRemoteFileNode is either missing or not a proper web uri: ${url}`

* chore: format

* update rejects test to match new message

Co-authored-by: gatsbybot <[email protected]>

* Also detect VERCEL_BUILDER should Vercel one day use it as per the docs (#25926)

* fix(babel-preset-gatsby): enable transformer-regenerator (#25983)

* fix(docs): bash to shell (#25958)

* change bash to shell

* dont change text file code language

* chore: add tests to static-query filepaths (#25978)

* chore: add tests to static-query filepaths

* fix windows paths

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* highlighted plugins (#25998)

* Revert "perf(gatsby-plugin-mdx): drop another babel step during sourcing" (#26002)

This reverts commit 6d0c791.

* fix: Enable CLI integration tests (#25997)

* [docs][glossary] add new entry for client-side rendering (#25984)

* add new glossary entry for client-side routing

* update text to address rendering vs. routing

* Add link to page, rather than anchor

Co-authored-by: Hashim Warren <[email protected]>

* fix: do not augment plugin-options (#26006)

* fix(gatsby-recipes) Fix docs for name in NPMPackage

* fix: update www (#26043)

Co-authored-by: Renovate Bot <[email protected]>

* Added extra markup (#26030)

* Added extra markup

I found some js code which was not highlighted so I wrapped it in js code block,
secondly, I added the link to reach/router as it was confusing if its react/router or reach/router

* added the link to reach/router

* Update glossary.md

* chore(showcase): Add leanier.com site (#26016)

* Add support for cache refresh via GraphiQL (#25960)

* Add cache refresh button

* Formatting

* Explicit return type

* www: Remove sw (#26054)

* Docs: Add a warning about static queries (#25929)

* feat(gatsby): Add top-level error handling to state machine (#25995)

* chore: Update stale yarn.lock (#26068)

* tests(gatsby): Add unit tests for develop state machine (#26051)

* feat(gatsby): Add top-level error handling to state machine

* Add initial tests

* Add tests for top-level machine

* Test error handling

* Add post-bootstrap to tests

* chore(showcase): Add johnkavanagh.co.uk (#25747)

* chore(showcase): Minor changes Showcase Tatjana Volbeke Portfolio (#25613)

* fix(gatsby): Defer node mutation in more APIs (#26067)

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* chore(showcase): add Julien Karst website (#25682)

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(showcase): BRIKL & TRUE STORY in showcase (#25631)

* chore(showcase): BRIKL & TRUE STORY in showcase

* chore(showcase): run prettier sites.yml

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(blog): Add i18n theme blog post (#26065)

* add blog post

* fix linting

* put head in code tag lol

* chore(showcase): add Château de Morey 🏰 (#25683)

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(showcase): meetup.com (#25792)

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(gatsby): fix typegen for publishing (#26078)

* chore(gatsby): add typescript as dev dependency

* chore(gatsby): run typegen after rimraf

* fix(gatsby): Delete babel and terser cache dirs (#26053)

* Delete babel and terser cache dirs

* Clean up yarn lock

* fix yarn.lock (?)

* verbose gatsby-dev

* chore(gatsby): add typescript as dev dependency

* Update e2e-test.sh

* chore(gatsby): run typegen after rimraf

Co-authored-by: Michal Piechowiak <[email protected]>
Co-authored-by: gatsbybot <[email protected]>

* fix(gatsby): Load static query results from its own Db (#26077)

* Load static query results from its own Db

* Keep StaticQueryContext because it is public API

* Switch to an Object for static query results from a Map

* Move getStaticQueryResults to private API

* chore(release): Publish

 - [email protected]
 - [email protected]

* fix(gatsby-image): add required check for one of fluid or fixed (#25371)

* Do not crash the page if the image component is invoked without parameters

* added a warning if missing fluid and fixed props

* had swapped a condition

* doing destructuring in function parameter list

* now with functioning tree-shaking

* updating function doc: returns undefined, not null

* switching to proptypes for validation

* Update packages/gatsby-image/src/index.js

Co-authored-by: Andreas Ehrencrona <[email protected]>
Co-authored-by: Ward Peeters <[email protected]>

* fix(gatsby): Load resources in ProdPageRenderer (#26092)

* Load resources in ProdPageRenderer

* Add simple unit tests

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]

* Update gatsby in www

* Add plugincreator to API (#26101)

* Add plugincreator to API

* fix capitlization

Co-authored-by: Laurie Barth <[email protected]>

* chore(showcase): Add Devnet (#25952)

Co-authored-by: Obinna Ekwuno <[email protected]>

* Add pluagin source for page (#26104)

Co-authored-by: Laurie Barth <[email protected]>

* fix(gatsby-source-contentful): support height parameter for srcset (#25776)

* Calculate fixed image width if necessary

* Calculate fixed image width if necessary

* Revert snapshot test changes

* Bring back new test

* Update snapshot

* chore(docs): Add author Colby Fayock (#26109)

* adding Colby Fayock author avatar and bio

* Update author.yaml

adding new line at end of file

* pretier

* Use commonmark option to better handle list parsing

* revert fixpack changes to root package.json

* Squashed commit of the following:

commit 33aff39
Author: Kyle Mathews <[email protected]>
Date:   Thu Jul 30 13:09:59 2020 -0700

    Update index.md

* Actually fix lint error

* Fix test

* more fixing tests

* Only log when DEBUG=true

* Remove --quiet to see errors

* Add rollup

* resolve conflicts

* remove testing code

* Make yarn.lock file valid

* WORK PLEASE

* Add yoga-layout-prebuilt as explicit dependency to make rollup + yarn 2.0 happy

* Add node-fetch as dependency

* Update packages/gatsby-recipes/src/graphql-server/server.js

Co-authored-by: Peter van der Zee <[email protected]>

* Use string matching for NPMPackage versions

* Add missing string matcher

* Fix lint error

* Add missing normalize.css dep

Co-authored-by: John Otander <[email protected]>
Co-authored-by: Marcy Sutton <[email protected]>
Co-authored-by: shannonbux <[email protected]>
Co-authored-by: Paul Scanlon <[email protected]>
Co-authored-by: Jarmo Isotalo <[email protected]>
Co-authored-by: Blaine Kasten <[email protected]>
Co-authored-by: Johnny Zabala <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Michal Piechowiak <[email protected]>
Co-authored-by: Aisha Blake <[email protected]>
Co-authored-by: Michael Murphy <[email protected]>
Co-authored-by: Dawood Sadiq <[email protected]>
Co-authored-by: James Brooks <[email protected]>
Co-authored-by: Haseeb Khan <[email protected]>
Co-authored-by: Ankit Ghosh <[email protected]>
Co-authored-by: Thijs <[email protected]>
Co-authored-by: Thijs van Diessen <[email protected]>
Co-authored-by: Muescha <[email protected]>
Co-authored-by: Jordan Stapinski <[email protected]>
Co-authored-by: Max Stoiber <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Nabeel Valley <[email protected]>
Co-authored-by: Ward Peeters <[email protected]>
Co-authored-by: Vatsal Mistry <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Kurt Tomlinson <[email protected]>
Co-authored-by: Lennart <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: gatsbybot <[email protected]>
Co-authored-by: Benedikt Rötsch <[email protected]>
Co-authored-by: Joel Smith <[email protected]>
Co-authored-by: Brent Jackson <[email protected]>
Co-authored-by: Vladimir Razuvaev <[email protected]>
Co-authored-by: Alex Moon <[email protected]>
Co-authored-by: Yogi <[email protected]>
Co-authored-by: Nat Alison <[email protected]>
Co-authored-by: Laci-Texter <[email protected]>
Co-authored-by: Tyler Barnes <[email protected]>
Co-authored-by: LB <[email protected]>
Co-authored-by: Hashim Warren <[email protected]>
Co-authored-by: anubhavmeet <[email protected]>
Co-authored-by: Dan Kirkham <[email protected]>
Co-authored-by: Sidhartha Chatterjee <[email protected]>
Co-authored-by: John Kavanagh <[email protected]>
Co-authored-by: Julius <[email protected]>
Co-authored-by: Julien Karst <[email protected]>
Co-authored-by: Obinna Ekwuno <[email protected]>
Co-authored-by: Tobias Meixner <[email protected]>
Co-authored-by: Andy Stanberry <[email protected]>
Co-authored-by: Andreas Ehrencrona <[email protected]>
Co-authored-by: Andreas Ehrencrona <[email protected]>
Co-authored-by: Laurie Barth <[email protected]>
Co-authored-by: Marin Matošević <[email protected]>
Co-authored-by: Sean Baines <[email protected]>
Co-authored-by: Colby Fayock <[email protected]>
Co-authored-by: Peter van der Zee <[email protected]>
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this issue Apr 28, 2022
* feat(gatsby-recipes): Pass data retrieved from the resource to its children via context

* chore(gatsby-recipes): Swap out Promise.all for a true queue

* feat(gatsby-recipes): Implement a render loop for nested resources

* Continue spiking out recipes gui

* Hardcode the project root in a clear place for now

* Join plan steps in order to create entire recipe plan at once + initial efforts on GUI

* WIP

* feat(gatsby-recipes): Implement a wait for input state when props are missing for a resource

* chore(gatsby-recipes): Use an INVALID_PROP event for schema validation

* feat(gatsby-recipes): Wrap intro and each step with components, add metadata

* chore(gatsby-recipes): Spike out basic gui component for steps

* feat(gatsby-recipes): Pass data retrieved from the resource to its children via context

* chore(gatsby-recipes): Swap out Promise.all for a true queue

* feat(gatsby-recipes): Implement a render loop for nested resources

* Continue spiking out recipes gui

* Hardcode the project root in a clear place for now

* Join plan steps in order to create entire recipe plan at once + initial efforts on GUI

* WIP

* feat(gatsby-recipes): Implement a wait for input state when props are missing for a resource

* chore(gatsby-recipes): Use an INVALID_PROP event for schema validation

* feat(gatsby-recipes): Wrap intro and each step with components, add metadata

* chore(gatsby-recipes): Spike out basic gui component for steps

* Lots of styling changes

* Put text & resources in same steps

* Lots more styling tweaks

* paragraphs had too much margin bottom

* more style tweaks

* feat(gatsby-recipes): Implement a wait for input state when props are missing for a resource

Also adds the use of an INVALID_PROP event for schema validation.

* chore(gatsby-recipes): Use MDX v2 canary for access to the JSX AST

* feat(gatsby-recipes): Apply a UUID prop to all resources for input handling

* checkin: Begin wiring up event for passing input data to server

* fix(gatsby-recipes): Update step wrapping for MDX v2

* fix(gatsby-recipes): Get tests passing, add debugging output

* Get applying working

* PROGRESSSSS

* feat(gatsby-recipes): Allow for inputs based on uuid to override props

* Remove sleep

* style tweaks

* Add updater to input provider, spike out File form

* feat(gatsby-recipes): Implement basic input functionality

* feat(gatsby-recipes): Spike out a contentful space resource, use renderer for applying plan

* feat(gatsby-recipes): Spike out contentful provider and basic rendering (gatsbyjs#24655)

* feat(gatsby-recipes): Spike out contentful provider and basic rendering

* Update packages/gatsby-recipes/src/gui.js

* WIP

* More design tweaks

* Style inline code

* Update packages/gatsby-recipes/recipes/cypress.mdx

Co-authored-by: Marcy Sutton <[email protected]>

* Update packages/gatsby-recipes/recipes/cypress.mdx

Co-authored-by: Marcy Sutton <[email protected]>

* Update packages/gatsby-recipes/recipes/cypress.mdx

Co-authored-by: Marcy Sutton <[email protected]>

* feat(gatsby-recipes): fix MDX rendering for exports (gatsbyjs#25133)

* feat(gatsby-recipes): Handle exports, render MDX directly

* Continue working towards proper exports

* Continue implementing MDX renderer v2

* More MDX rendering hacking

* Finish basic export handling

* Small fixes

Co-authored-by: John Otander <[email protected]>

* live updating is working more-or-less

* Speedups & cleanups

* Rename hook to match signature

* Rename context

* Add support for useResourceByKey

* fix @babel/template not accepting integers as options

* Only update resources when it's changed

* make child Resource components work

* rename useResourceByKey -> useResource

* Implement ContentfulEntry resource

* Add useProvider & ensure only apply resource once

* Address some design feedback

* Fix spacing for input forms

* Fix spacing and size of step indicator

* Flatten nested resources in display

* Use input builtins from gatsby-interface

* Add special file diff

* Get things running again

* Reload recipe session on changes

- when the recipe file is updated
- when the recipe api is restarted
- when the browser is refreshed.

* Update tests

* Only emit updates when the state has actually changed

* Fix building recipe component

* update resolutions/dependencies

* fix fetch dependency

* moer fixes

* Upgrade to Ink v3 & start migrating cli to showing all steps

* Properly handle nested resources when rendering the plan (gatsbyjs#25930)

* Don't hardcode port

* Ensure that nested resource get resourceName populated

* feat(gatsby-recipes): Refactor CLI UI for new one-shot show plan (gatsbyjs#25939)

* feat(gatsby-recipes): Refactor CLI UI for new one-shot show plan

* Restore experimental message + showing list of recipes to run

* Add a --develop command for hot-reloading of recipes

* Add --install command support

* Remove unused code + old pre Ink v3 logging system

* Cleanup + show step count

* Remove console.log

* add key

* small fixes + add script to start dev server

* Add dev instructions for running the recipes graphql server in the foreground

* small fixes

* @babel/standalone caches transforms unless you delete the require cache

* fix linting problems

* Extract shared code into common library

* Checkin useInput beginning

* Ensure that diff html isn't rendered by escaping

* Update providers snapshots, looked like they weren't run with chalk turned off

* Update other snapshots as well

* Begin fixing some lint errors

* Fix some more lint errors

* Fix grabbing the right resource

Co-authored-by: John Otander <[email protected]>

* move back to v2 for deploying for compatability with the regular CLI

* Also do a compatability layer for <Box>

* test

* Add missing dependency

* sad

* Add rollup to bundle the cli app so we can use Ink v3

* Move packages packed by rollup to be dev dependencies as user won't need to download them

* Remove console.logs

* Remove logs

* feat(gatsby-recipes): copy edits for some recipes (gatsbyjs#26009)

* Fix rendering li > p

* Fix formatting of emotion recipe

* Improve recipe

* Name of key changed

* Match keyed resources correctly in the install step + cleanups

* Fix linting errors

* fix margin

* Surround inlineCode with back ticks so it looks like markdown

* vendor ink-link as it's not upgraded to v3 yet

* feat(gatsby-recipes) (gatsbyjs#26085)

* prettier file

* Fix linting errors

* feat(gatsby-recipes): fix recipes copy 2 (gatsbyjs#26115)

* feat(gatsby-recipes)

* second half of copy edits

donezo!

* feat(gatsby-source-shopify): Add shopifyShop query (gatsbyjs#25763)

* Start moving gatsby-telemetry to typescript (gatsbyjs#25812)

* Fix camelCase

* Start moving gatsby-telemetry to ts

* Continue converting base to typescript

* Debug transpilation issues

* Debug transpilation issues

* Fix telemetry tests

* Add Changelog entry for merged PR gatsbyjs#24306

* chore(gatsby-telemetry): Migrate is-truthy to TypeScript (gatsbyjs#25884)

* Detect vercel again after rebranding in gatsby-telemetry (gatsbyjs#25883)

* Detect vercel again after rebranding as per https://vercel.com/docs/v2/build-step

* Add another Vercel NOW matcher

* chore(gatsby-telemetry): Migrate flush to TypeScript (gatsbyjs#25886)

* feat(gatsby-source-shopify): set link from product variant to product (gatsbyjs#25316)

* fix: update www (gatsbyjs#25874)

Co-authored-by: Renovate Bot <[email protected]>

* docs(gatsby-internals): update page -> node dependency tracking (gatsbyjs#25606)

* docs(gatsby-internals): update page -> node dependency tracking

* Apply suggestions from code review

Co-authored-by: Aisha Blake <[email protected]>

* remove surplus `and` from performance comma list (gatsbyjs#25891)

* fixed typo (gatsbyjs#25896)

* fix(gatsby): Support symlinks in static directories (gatsbyjs#25894)

* Added the link to 'MDX' (gatsbyjs#25905)

* Update localization-i18n.md (gatsbyjs#25902)

Some important links for **React-intl** had broken due to update in repo whose links were given. Added the correct links to it.

* added a cookieflags option (gatsbyjs#25907)

Co-authored-by: Thijs van Diessen <[email protected]>

* fix(readme): gatsby-source-shopify: unify variable names (gatsbyjs#25882)

* chore(showcase): Add MongoDB Developer Hub (gatsbyjs#25892)

* Add file names to code blocks (gatsbyjs#25879)

* enhancement(docs): dictionary.txt -> CodePen -> fix brand name (gatsbyjs#25875)

* feat(gatsby-admin): list all pages of site (gatsbyjs#25744)

* feat(gatsby-admin): plugin search (gatsbyjs#25903)

* Copy plugin search from www into admin

* Move to Combobox search

* Cleanup

* TypeScript cleanup

* add algolia types

* Fix syntax

* fix: Restore CLI port in use prompt feature (gatsbyjs#25863)

* fix: Restore CLI port in use prompt feature

Seems like it got accidentally removed during a big PR?

* fix: Ensure port var types are the same

The CLI option and default value for `port` is a string, despite the TypeScript typing the arg to `number`.

Unclear if `port` should be a `number` elsewhere, so checking for and converting to a number within the utility.

* Fix/follow up 25863 (gatsbyjs#25915)

* fix: Restore CLI port in use prompt feature

Seems like it got accidentally removed during a big PR?

* fix: Ensure port var types are the same

The CLI option and default value for `port` is a string, despite the TypeScript typing the arg to `number`.

Unclear if `port` should be a `number` elsewhere, so checking for and converting to a number within the utility.

* Force program.port to a number early

Co-authored-by: polarathene <[email protected]>

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* Capture repositoryId from heroku (gatsbyjs#25910)

* Capture repositoryId from heroku

* Add comments

* fixed typo (gatsbyjs#25912)

* Update README.md (gatsbyjs#25901)

No need to link to `example.com` it's a sample domain.

* Add __BASE_PATH__ definition to storybook config (gatsbyjs#25643)

* Add __BASE_PATH__ definition to storybook config

* Globals need not be defined for Storybook Docs

Update to Docs: Removes the need to declare the `__BASE_PATH__` and `__PATH_PREFIX__` in the Storybook config for Tests to work

* fix(gatsby): don't place virtual modules in node_modules directory (gatsbyjs#25720)

* fix(gatsby): don't place virtual modules in node_modules directory

* fix eslint rule

Co-authored-by: Ward Peeters <[email protected]>

* chore(doc):Add guide to Deploy Gatsby to DigitalOcean droplet.  (gatsbyjs#24652)

* Added doc for deploying to digitalocean droplet

Added doc for deploying gatsby site to digitalocean droplet and configuring domain name with SSL. For issue gatsbyjs#24549 .

* Updated with deploying to digitalocean droplet doc

Updated with deploying to digitalocean droplet doc to fix issue gatsbyjs#24549.

* Added missing code language flag to fix lint check

Lint Check failed due to one code language flag was missing in one of the code snippet in the md file. Fixed that.

* Updated grammar and styles as per code review

Co-authored-by: Marcy Sutton <[email protected]>

* Removed the line for brevity

* Updated grammar change for line gatsbyjs#11 as per code review

* Ran prettier to format the code

* Added step to install dependencies after cloning

* Change case of node to Node as per suggestion.

Co-authored-by: Marcy Sutton <[email protected]>

* Changing optional to required for installing version of Node

Gatsby required Node 10, so making the use of n package while installing the Node on digitalocean as a REQUIRED step.

Co-authored-by: Marcy Sutton <[email protected]>

* Adding suggested changes for better understanding.

Co-authored-by: Marcy Sutton <[email protected]>

* Adding the suggested changes.

Using "Generate your Gatsby site for production" instead of "Build your gatsby site to generate static site for production"

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per suggestion by moderator

Making the docs style changes as suggested by moderator marcysutton

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per the suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Update docs/docs/deploying-to-digitalocean-droplet.md

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per the suggestion

Adding path resemble line to make it easy for people to understand the path

Co-authored-by: Marcy Sutton <[email protected]>

* Adding changes as per the suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Making changes as per the suggestion

Co-authored-by: Marcy Sutton <[email protected]>

* Added snippet to get rid of permission denied

Added snippet to get rid of permission denied while cloning the repository

* Adding indentation as per linting rules

* Ran prettier

* Updating grammar as per suggested

Co-authored-by: Marcy Sutton <[email protected]>

* Added note to copy local repo path for future ref

* Ran prettier to format the code

Co-authored-by: Marcy Sutton <[email protected]>

* Update migrating-from-v1-to-v2.md (gatsbyjs#25832)

* fix dictionary for digitalocean guide (gatsbyjs#25936)

* fix(docs): show where `getNodesByType` comes from (gatsbyjs#25344)

* show where getNodesByType comes from

* indicate the code is an example per PR feedback

Co-authored-by: Marcy Sutton <[email protected]>

Co-authored-by: Marcy Sutton <[email protected]>

* chore(docs): Changes to "Setting Up Your Local Dev Environment" doc (gatsbyjs#25721)

* chore(gatsby): add log to gatsby develop if Admin is enabled (gatsbyjs#25943)

* feat(gatsby): Defer node mutation during querying (gatsbyjs#25479)

* Move bootstrap into machine

* Add parent span and query extraction

* Add rebuildSchemaWithSitePage

* Use values from context

* Remove logs

* Add redirectListener

* Changes from review

* Log child state transitions

* Add state machine for query running

* Changes from review

* Changes from review

* Switch to reporter

* Use assertStore

* Remove unused action

* Remove unusued config

* Remove unusued config

* Add gql runner reset

* Handle node mutation queuing and batching in state machine

* Use new pagedata utils

* Use develop queue

* New xstate syntax

* Work-around xstate bug

* Track first run

* Track first run

* Disable --quiet in e2e

* Don't defer node mutation if we're outside the state machine

* Re-quieten e2e

* Listen for query file changes

* Lint

* Handle webhook

* Changes from review

* Fix typings

* Changes from review

* Typefix

* feat(gatsby): Move final parts into develop state machine (gatsbyjs#25716)

* Move remaining parts into state machine

* Move top level state machine into state machines dir

* Add machine ids

* Add missing imports

* Resolve api promises

* Remove unused action

* Move logging into helper

* Changes from review

* Manually save db

* Add comments

* Remove first run from query running

* Refactor into separate data layer machines

* Fix condition

Co-authored-by: gatsbybot <[email protected]>

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* fix(docs): Fix broken mdx (gatsbyjs#25946)

* chore(gatsby-admin): build in postbuild of gatsby instead of prepublish (gatsbyjs#25940)

* Move admin to postbuild of gatsby

* Remove prepublish gatsby-admin build

* Dont run tests in .cache

* Ignore _tests_ in .cache

* Use local copy of Gatsby to build gatsby-admin

* perf(gatsby-source-contentful): speed up resolving of huge spaces (gatsbyjs#25954)

closes gatsbyjs#25464

* docs: use hello-world starter in quick start guide instead of default starter (gatsbyjs#25914)

* Small tweak to see if we can reduce errors driven by the default starter using  and its dependency on sharp.

* chore: format

* Reverted working directory name

A change to address feedback about changing the name to preserve continuity with current manual recipes.

Co-authored-by: gatsbybot <[email protected]>

* chore(docs): Fix RFC typo (gatsbyjs#25970)

* chore(gatsby-admin): cleanup stale artifacts pre build (gatsbyjs#25972)

* Handle webpack in state machine (gatsbyjs#25815)

Co-authored-by: gatsbybot <[email protected]>

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]

* fix(gatsby-admin): show error messages in the interface (gatsbyjs#25944)

* docs(gatsby-admin): more detailed architecture explanation (gatsbyjs#25941)

* Write more detailed Admin architecture docs

* Add section on production deployment to gatsby-admin docs

* Absolute URLs so they work on npm etc.

* Fix pronouns and wording

* Clean up some more

* Tighten up language around production deployment

Co-authored-by: Brent Jackson <[email protected]>

* Update packages/gatsby-admin/README.md

Co-authored-by: Brent Jackson <[email protected]>

Co-authored-by: Brent Jackson <[email protected]>

* fix(gatsby): call predicate for the root ancestor in findRootNodeAncestor (gatsbyjs#25974)

* fix(gatsby-admin): small design tweaks (gatsbyjs#25971)

* feat(gatsby): Add internal types export (gatsbyjs#25921)

* Handle webpack in state machine

* Add internal export

* feat(plugin-manifest): support SVG favicon (gatsbyjs#25276)

Co-authored-by: Yogi <[email protected]>

* maintenance(www) remove unused dependencies (gatsbyjs#25463)

Co-authored-by: Aisha Blake <[email protected]>

* Update contributor-swag.md (gatsbyjs#25980)

Based on a recent increase in the volume of requests, I'm updating how people can request their free Gatsby swag for contributions that aren't made on GitHub.

* feat(gatsby-source-filesystem): improve wrong url rejection message (gatsbyjs#25965)

* feat(gatsby-source-filesystem: improve wrong url rejection message

The existing message made tracing down a bug from within the new WP source plugin harder than necessary.

Old message: `wrong url: ${url}`

Updated message: `url passed to createRemoteFileNode is either missing or not a proper web uri: ${url}`

* chore: format

* update rejects test to match new message

Co-authored-by: gatsbybot <[email protected]>

* Also detect VERCEL_BUILDER should Vercel one day use it as per the docs (gatsbyjs#25926)

* fix(babel-preset-gatsby): enable transformer-regenerator (gatsbyjs#25983)

* fix(docs): bash to shell (gatsbyjs#25958)

* change bash to shell

* dont change text file code language

* chore: add tests to static-query filepaths (gatsbyjs#25978)

* chore: add tests to static-query filepaths

* fix windows paths

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* highlighted plugins (gatsbyjs#25998)

* Revert "perf(gatsby-plugin-mdx): drop another babel step during sourcing" (gatsbyjs#26002)

This reverts commit 6d0c791.

* fix: Enable CLI integration tests (gatsbyjs#25997)

* [docs][glossary] add new entry for client-side rendering (gatsbyjs#25984)

* add new glossary entry for client-side routing

* update text to address rendering vs. routing

* Add link to page, rather than anchor

Co-authored-by: Hashim Warren <[email protected]>

* fix: do not augment plugin-options (gatsbyjs#26006)

* fix(gatsby-recipes) Fix docs for name in NPMPackage

* fix: update www (gatsbyjs#26043)

Co-authored-by: Renovate Bot <[email protected]>

* Added extra markup (gatsbyjs#26030)

* Added extra markup

I found some js code which was not highlighted so I wrapped it in js code block,
secondly, I added the link to reach/router as it was confusing if its react/router or reach/router

* added the link to reach/router

* Update glossary.md

* chore(showcase): Add leanier.com site (gatsbyjs#26016)

* Add support for cache refresh via GraphiQL (gatsbyjs#25960)

* Add cache refresh button

* Formatting

* Explicit return type

* www: Remove sw (gatsbyjs#26054)

* Docs: Add a warning about static queries (gatsbyjs#25929)

* feat(gatsby): Add top-level error handling to state machine (gatsbyjs#25995)

* chore: Update stale yarn.lock (gatsbyjs#26068)

* tests(gatsby): Add unit tests for develop state machine (gatsbyjs#26051)

* feat(gatsby): Add top-level error handling to state machine

* Add initial tests

* Add tests for top-level machine

* Test error handling

* Add post-bootstrap to tests

* chore(showcase): Add johnkavanagh.co.uk (gatsbyjs#25747)

* chore(showcase): Minor changes Showcase Tatjana Volbeke Portfolio (gatsbyjs#25613)

* fix(gatsby): Defer node mutation in more APIs (gatsbyjs#26067)

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]
 - [email protected]

* chore(showcase): add Julien Karst website (gatsbyjs#25682)

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(showcase): BRIKL & TRUE STORY in showcase (gatsbyjs#25631)

* chore(showcase): BRIKL & TRUE STORY in showcase

* chore(showcase): run prettier sites.yml

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(blog): Add i18n theme blog post (gatsbyjs#26065)

* add blog post

* fix linting

* put head in code tag lol

* chore(showcase): add Château de Morey 🏰 (gatsbyjs#25683)

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(showcase): meetup.com (gatsbyjs#25792)

Co-authored-by: Obinna Ekwuno <[email protected]>

* chore(gatsby): fix typegen for publishing (gatsbyjs#26078)

* chore(gatsby): add typescript as dev dependency

* chore(gatsby): run typegen after rimraf

* fix(gatsby): Delete babel and terser cache dirs (gatsbyjs#26053)

* Delete babel and terser cache dirs

* Clean up yarn lock

* fix yarn.lock (?)

* verbose gatsby-dev

* chore(gatsby): add typescript as dev dependency

* Update e2e-test.sh

* chore(gatsby): run typegen after rimraf

Co-authored-by: Michal Piechowiak <[email protected]>
Co-authored-by: gatsbybot <[email protected]>

* fix(gatsby): Load static query results from its own Db (gatsbyjs#26077)

* Load static query results from its own Db

* Keep StaticQueryContext because it is public API

* Switch to an Object for static query results from a Map

* Move getStaticQueryResults to private API

* chore(release): Publish

 - [email protected]
 - [email protected]

* fix(gatsby-image): add required check for one of fluid or fixed (gatsbyjs#25371)

* Do not crash the page if the image component is invoked without parameters

* added a warning if missing fluid and fixed props

* had swapped a condition

* doing destructuring in function parameter list

* now with functioning tree-shaking

* updating function doc: returns undefined, not null

* switching to proptypes for validation

* Update packages/gatsby-image/src/index.js

Co-authored-by: Andreas Ehrencrona <[email protected]>
Co-authored-by: Ward Peeters <[email protected]>

* fix(gatsby): Load resources in ProdPageRenderer (gatsbyjs#26092)

* Load resources in ProdPageRenderer

* Add simple unit tests

* chore(release): Publish

 - [email protected]
 - [email protected]
 - [email protected]

* Update gatsby in www

* Add plugincreator to API (gatsbyjs#26101)

* Add plugincreator to API

* fix capitlization

Co-authored-by: Laurie Barth <[email protected]>

* chore(showcase): Add Devnet (gatsbyjs#25952)

Co-authored-by: Obinna Ekwuno <[email protected]>

* Add pluagin source for page (gatsbyjs#26104)

Co-authored-by: Laurie Barth <[email protected]>

* fix(gatsby-source-contentful): support height parameter for srcset (gatsbyjs#25776)

* Calculate fixed image width if necessary

* Calculate fixed image width if necessary

* Revert snapshot test changes

* Bring back new test

* Update snapshot

* chore(docs): Add author Colby Fayock (gatsbyjs#26109)

* adding Colby Fayock author avatar and bio

* Update author.yaml

adding new line at end of file

* pretier

* Use commonmark option to better handle list parsing

* revert fixpack changes to root package.json

* Squashed commit of the following:

commit 33aff39
Author: Kyle Mathews <[email protected]>
Date:   Thu Jul 30 13:09:59 2020 -0700

    Update index.md

* Actually fix lint error

* Fix test

* more fixing tests

* Only log when DEBUG=true

* Remove --quiet to see errors

* Add rollup

* resolve conflicts

* remove testing code

* Make yarn.lock file valid

* WORK PLEASE

* Add yoga-layout-prebuilt as explicit dependency to make rollup + yarn 2.0 happy

* Add node-fetch as dependency

* Update packages/gatsby-recipes/src/graphql-server/server.js

Co-authored-by: Peter van der Zee <[email protected]>

* Use string matching for NPMPackage versions

* Add missing string matcher

* Fix lint error

* Add missing normalize.css dep

Co-authored-by: John Otander <[email protected]>
Co-authored-by: Marcy Sutton <[email protected]>
Co-authored-by: shannonbux <[email protected]>
Co-authored-by: Paul Scanlon <[email protected]>
Co-authored-by: Jarmo Isotalo <[email protected]>
Co-authored-by: Blaine Kasten <[email protected]>
Co-authored-by: Johnny Zabala <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Michal Piechowiak <[email protected]>
Co-authored-by: Aisha Blake <[email protected]>
Co-authored-by: Michael Murphy <[email protected]>
Co-authored-by: Dawood Sadiq <[email protected]>
Co-authored-by: James Brooks <[email protected]>
Co-authored-by: Haseeb Khan <[email protected]>
Co-authored-by: Ankit Ghosh <[email protected]>
Co-authored-by: Thijs <[email protected]>
Co-authored-by: Thijs van Diessen <[email protected]>
Co-authored-by: Muescha <[email protected]>
Co-authored-by: Jordan Stapinski <[email protected]>
Co-authored-by: Max Stoiber <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Nabeel Valley <[email protected]>
Co-authored-by: Ward Peeters <[email protected]>
Co-authored-by: Vatsal Mistry <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Kurt Tomlinson <[email protected]>
Co-authored-by: Lennart <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: gatsbybot <[email protected]>
Co-authored-by: Benedikt Rötsch <[email protected]>
Co-authored-by: Joel Smith <[email protected]>
Co-authored-by: Brent Jackson <[email protected]>
Co-authored-by: Vladimir Razuvaev <[email protected]>
Co-authored-by: Alex Moon <[email protected]>
Co-authored-by: Yogi <[email protected]>
Co-authored-by: Nat Alison <[email protected]>
Co-authored-by: Laci-Texter <[email protected]>
Co-authored-by: Tyler Barnes <[email protected]>
Co-authored-by: LB <[email protected]>
Co-authored-by: Hashim Warren <[email protected]>
Co-authored-by: anubhavmeet <[email protected]>
Co-authored-by: Dan Kirkham <[email protected]>
Co-authored-by: Sidhartha Chatterjee <[email protected]>
Co-authored-by: John Kavanagh <[email protected]>
Co-authored-by: Julius <[email protected]>
Co-authored-by: Julien Karst <[email protected]>
Co-authored-by: Obinna Ekwuno <[email protected]>
Co-authored-by: Tobias Meixner <[email protected]>
Co-authored-by: Andy Stanberry <[email protected]>
Co-authored-by: Andreas Ehrencrona <[email protected]>
Co-authored-by: Andreas Ehrencrona <[email protected]>
Co-authored-by: Laurie Barth <[email protected]>
Co-authored-by: Marin Matošević <[email protected]>
Co-authored-by: Sean Baines <[email protected]>
Co-authored-by: Colby Fayock <[email protected]>
Co-authored-by: Peter van der Zee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: performance Related to runtime & build performance topic: source-contentful Related to Gatsby's integration with Contentful
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants