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

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

Merged
merged 8 commits into from
Jul 29, 2020

Conversation

ehrencrona
Copy link
Contributor

Description

Prevents the rendering from crashing if Gatsby image is called without any parameters. The error message that was printed before this change was not helpful to users.

Related Issues

Fixes #25370

@ehrencrona ehrencrona requested a review from a team as a code owner June 28, 2020 15:20
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 28, 2020
Copy link
Contributor

@polarathene polarathene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to put together this PR!

Averting the failure is nice, but without a warning/error this could be trading one bug for another with a silent failure for anyone who does use the component without providing a fluid or fixed object.

I would prefer a reason for why a developer would choose to use gatsby-image without providing it that object intentionally? Doesn't a silent failure make it more difficult to track down vs a runtime error(albeit not a very useful one as you point out).

It also looks like the error is actually from the called method attempting to access 0 as an object key rather than index, not the subsequent src property?

packages/gatsby-image/src/index.js Outdated Show resolved Hide resolved
@LekoArts LekoArts added topic: media Related to gatsby-plugin-image, or general image/media processing topics and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 30, 2020
@LekoArts
Copy link
Contributor

Coming from #24855 - can you please add a test case where you pass in null to the fluid/fixed props?

@polarathene

This comment has been minimized.

@ehrencrona
Copy link
Contributor Author

ehrencrona commented Jun 30, 2020

Wow, that triggered a lively debate! :D Thanks for all the feedback.

I've updated the PR with a warning. The warning only appears in development; I've checked that the code gets tree-shaken out in production builds.

I also applied the feedback from @polarathene about making sure the value is not cached.

Given #24855 it seems like this is something that can appear at runtime so we shouldn't bomb the page if it happens. The test ought to guarantee that.

Using null or undefined (=omitting the prop) in the test indeed ought to be equivalent. I switched to null since it's more explicit.

A try ... catch is problematic in a class component: if the constructor bails out but doesn't throw, the subsequent methods will fail. If we want to protect the page, an error boundary sounds better to me.

I think it's possible to trigger this via handleImageLoaded():

Inside render we have two blocks: if (fluid) and if (fixed). If neither, no image is added and no loaded event fired, so that should be safe and correct.

(It would, by the way, be nice to pull those two if blocks out into their own functions to make the rendering logic more readable, but I didn't want to include that in this PR)

@polarathene
Copy link
Contributor

(It would, by the way, be nice to pull those two if blocks out into their own functions to make the rendering logic more readable, but I didn't want to include that in this PR)

There's a fair amount of refactoring that needs to be done on gatsby-image. Some to better prep for v3, and then moving from a class component to hooks based for v3. No need to refactor those functions out of render, there's a number of PRs for this component waiting on being reviewed/merged, the less conflicts introduced the better :)

polarathene
polarathene previously approved these changes Jun 30, 2020
Copy link
Contributor

@polarathene polarathene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for putting this together! 😀

Good idea with the src renames to more appropriate names.

packages/gatsby-image/src/index.js Outdated Show resolved Hide resolved
polarathene
polarathene previously approved these changes Jul 2, 2020
@wardpeet wardpeet changed the title Do not crash if the image component is invoked without parameters fix(gatsby-image): add required check for one of fluid or fixed Jul 3, 2020
@wardpeet
Copy link
Contributor

wardpeet commented Jul 3, 2020

Hey @ehrencrona,

Thanks for creating this PR. Could we move this validation to propTypes?

function requireFixedOrFluid(originalPropTypes) {
  return (props, propName, componentName) => {
    if (!props.fixed && !props.fluid) {
      throw new Error(`The prop \`fluid\` or \`fixed\` is marked as required in \`${componentName}\`, but their values are both \`undefined\`.`)
    }

    PropTypes.checkPropTypes({[propName]: originalPropTypes}, props, 'prop', componentName);
  }
}

// If you modify these propTypes, please don't forget to update following files as well:
// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/index.d.ts
// https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-image/README.md#gatsby-image-props
// https://github.com/gatsbyjs/gatsby/blob/master/docs/docs/gatsby-image.md#gatsby-image-props
Image.propTypes = {
  resolutions: fixedObject,
  sizes: fluidObject,
  fixed: requireFixedOrFluid(PropTypes.oneOfType([fixedObject, PropTypes.arrayOf(fixedObject)])),
  fluid: requireFixedOrFluid(PropTypes.oneOfType([fluidObject, PropTypes.arrayOf(fluidObject)])),
  fadeIn: PropTypes.bool,
  durationFadeIn: PropTypes.number,
  title: PropTypes.string,
  alt: PropTypes.string,
  className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), // Support Glamor's css prop.
  critical: PropTypes.bool,
  crossOrigin: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
  style: PropTypes.object,
  imgStyle: PropTypes.object,
  placeholderStyle: PropTypes.object,
  placeholderClassName: PropTypes.string,
  backgroundColor: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
  onLoad: PropTypes.func,
  onError: PropTypes.func,
  onStartLoad: PropTypes.func,
  Tag: PropTypes.string,
  itemProp: PropTypes.string,
  loading: PropTypes.oneOf([`auto`, `lazy`, `eager`]),
  draggable: PropTypes.bool,
}

@ehrencrona
Copy link
Contributor Author

@wardpeet that would make sense of course; i can add that. but i'd say it should be in addition to the check in the PR, not a replacement for it, as the issue can also appear at runtime by a variable passed as fluid or fixed becoming null.

@wardpeet
Copy link
Contributor

wardpeet commented Jul 3, 2020

Why wouldn't this be a replacement for it? I'm only talking about the validation part. The other changes you made are solid 💯.

@ehrencrona
Copy link
Contributor Author

@wardpeet Oh, I thought proptypes were only evaluated at compile time. Ok, no, if they're evaluated at runtime it's a strictly better solution of course. I'll update the code.

@polarathene
Copy link
Contributor

The propTypes validation is for development only and will work at run-time afaik, when built for production like the validation check code being wrapped in a conditional to exclude it, the propTypes aren't present either.

@ehrencrona
Copy link
Contributor Author

Ok, I've updated the code. Seems to work well.

@Ekwuno Ekwuno requested review from a team as code owners July 7, 2020 14:20
wardpeet
wardpeet previously approved these changes Jul 7, 2020
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Thank you for taking the time to fix your review and for improving gatsby-image @ehrencrona.

@polarathene
Copy link
Contributor

@wardpeet Please merge? :)

@polarathene
Copy link
Contributor

polarathene commented Jul 28, 2020

@wardpeet Are the approved changes going to be merged? (EDIT: Oh... waiting on a @gatsbyjs/content all this time..)

@pvdz pvdz merged commit ce7ba8a into gatsbyjs:master Jul 29, 2020
KyleAMathews pushed a commit that referenced this pull request Jul 29, 2020
* 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]>
johno added a commit that referenced this pull request 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]>
blainekasten added a commit that referenced this pull request Aug 6, 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]>
@nicktouchette
Copy link

nicktouchette commented Aug 8, 2020

Should the required check extend to sizes as well?

Using something like
<Img sizes={{ ...data.banner.childImageSharp.fluid, aspectRatio: 21 / 9 }} />

Will give this warning
Warning: Failed prop type: The prop `fluid` or `fixed` is marked as required in `Image`, but their values are both `undefined`.

@polarathene
Copy link
Contributor

polarathene commented Aug 8, 2020

gatsby-image isn't equivalent to <img> element. It does not have a supported sizes prop, that's handled internally based on fluid or fixed prop being used.

There is the old resolutions and sizes props still technically supported, which last I knew were meant to state they're deprecated, doesn't seem like the component is logging that warning like it does for the critical prop. Seems it was discussed in my old PR, but didn't get a reply from @wardpeet where he resolved it unanswered instead.

Users should be using fixed or fluid prop types by now. Is there any reason that you're not?

@nicktouchette
Copy link

@polarathene The reason I'm not using fluid is because I needed to enforce an aspect ratio of 1 on a batch of fluid images that I need to remain perfectly square.

The code piece I referenced comes directly from https://www.gatsbyjs.org/tutorial/gatsby-image-tutorial/ .

If deprecated, what would be the preferred method to enforcing an aspect ratio on fluid images?

@polarathene
Copy link
Contributor

@nicktouchette thanks for that link, I'll create a PR to update that, along with adding the deprecated notice for sizes and resolutions.

If deprecated, what would be the preferred method to enforcing an aspect ratio on fluid images?

sizes works the same as fluid, so changing the prop alone should work.

@nicktouchette
Copy link

@polarathene Nice! I changed the prop back to fluid and everything's good. Thanks for the insight.

pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request Apr 28, 2022
…byjs#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]>
pragmaticpat pushed a commit to pragmaticpat/gatsby that referenced this pull request 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: media Related to gatsby-plugin-image, or general image/media processing topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gatsby image crashes with unhelpful message if not passed any parameters
7 participants