Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: gatsby@2.24.51
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gatsby@2.24.52
Choose a head ref
  • 11 commits
  • 112 files changed
  • 11 contributors

Commits on Aug 27, 2020

  1. Upgrade uuid (#26636)

    herecydev authored Aug 27, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dbe6767 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    66111f4 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    eaa8ab7 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4aa9437 View commit details

Commits on Aug 28, 2020

  1. feat(gatsby): Support React 17's new JSX Transform (#26652)

    * feature(gatsby): Support React 17s new JSX transform
    
    * move react to peerDep for cli
    
    * simplify code
    
    * change jsx runtime check
    
    * Improve the future proof of using the jsx runtime
    
    * revert react peerDep in gatsby-cli
    
    * fix tests
    
    * Update yarn.lock
    
    * Update index.js.snap
    
    * Update index.js.snap
    
    * Update gatsby-node.js.snap
    
    * Update index.js.snap
    
    * Update query-compiler.js.snap
    
    * Update yarn.lock
    
    * Update babelrc.ts.snap
    
    * review
    
    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    blainekasten and wardpeet authored Aug 28, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6ba68f8 View commit details
  2. chore: cherrypick Renovate updates (#26582)

    * chore(monorepo): cherrypick renovate/packages
    
    * fix(gatsby): update overlay import location
    
    * test(gatsby-remark-katex): update snapshot
    
    * fix(renovate): add express-graphql to <1.0.0-minor
    
    * chore(monorepo): update eslint-plugin-react
    
    * Revert "chore(monorepo): cherrypick renovate/packages"
    
    This reverts commit b2c751b.
    
    * chore(gatsby-remark-katex): update katex devDep
    
    * chore(gatsby, gatsby-plugin-preact): update @pmmmwh/react-refresh-webpack-plugin
    
    * chore: update chokidar
    
    * chore(gatsby-telemetry): unpin and update @turist/fetch, envinfo, git-up, is-docker, node-fetch
    
    * chore: update webpack
    
    * chore(gatsby-graphiql-explorer): update whatwg-fetch
    
    * chore(gatsby-legacy-polyfills): unpin and update whatwg-fetch
    
    * chore: update yarn.lock
    
    * fix: undo reverted gatsby package updates
    
    Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
    hoobdeebla and gatsbybot authored Aug 28, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    608f40c View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    19020c2 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    25e3a63 View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    04c75bb View commit details
  6. Admin/recipes gui (#26243)

    * initial commit of gui
    
    * initial commit of gui
    
    * it renders
    
    * pass recipe name
    
    * add params
    
    * add params
    
    * use state for gatsby link
    
    * clean up errors
    
    * remove recipe test data
    
    * refactor gui and remove unused reference
    
    * remove welcome message
    
    * remove welcome message
    
    * clean up imports
    
    * use optional chaining
    
    * move diff components out
    
    * restructure components still in progress
    
    * restructure components still in progress
    
    * refactor theme ui styling
    
    * break out more components
    
    * resource message refactor
    
    * use optional chaining instead
    
    * remove currently unused input stuff
    
    * remove currently unused input stuff
    
    * work around typeerror
    
    * refactor main component and removed unused input stuff
    
    * align on gatsby interface version
    
    * repin version
    
    * needs to be this version of interface
    
    * recipes doesn't need interface anymore
    
    * clean up theme ui merges
    
    * use a fragment
    
    * remove fragment
    
    * see if removing use of header in recipes page fixes build error
    
    * prevent verdaccio from failing
    
    * Move the transform code out of the client
    
    * transform each step
    
    * remove transform from mdx component and not renderer
    
    * rendering JS instead of MDX
    
    * Move MDX transform to parser and resolve component clashes
    
    * remove testing comment
    
    * yarn lock
    
    * refactor name and run babel shortcode transform always
    
    * try and fix linter
    
    * fix linting
    
    * Revert "fix linting"
    
    This reverts commit b90e8d5.
    
    * revert commits so we can change on master
    
    * comment out test we're not using
    
    * Add back validate steps but only check for introduction steps
    
    * fix in progress, validate steps is throwing intro error always
    
    * add error case back again
    
    * use metadata
    
    * Grab project root from service lock
    
    * Use sitePath instead
    
    * remnove comments
    
    * don't hardcode API endpoint port
    
    * Update packages/gatsby-recipes/src/components/step-renderer.js
    
    Co-authored-by: Brent Jackson <jxnblk@gmail.com>
    
    * move normalize.css to provider component
    
    * Expose StepRenderer as top level component for admin
    
    * fixing CLI
    
    * Remove li.p component that was causing the bug. We don't need it anyway.
    
    Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
    Co-authored-by: Brent Jackson <jxnblk@gmail.com>
    3 people authored Aug 28, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    703678e View commit details
  7. chore(release): Publish

     - babel-preset-gatsby@0.5.8
     - gatsby-admin@0.1.141
     - gatsby-cli@2.12.90
     - gatsby-core-utils@1.3.18
     - gatsby-dev-cli@2.7.18
     - gatsby-graphiql-explorer@0.4.13
     - gatsby-legacy-polyfills@0.0.4
     - gatsby-page-utils@0.2.23
     - gatsby-plugin-benchmark-reporting@0.2.15
     - gatsby-plugin-manifest@2.4.26
     - gatsby-plugin-mdx@1.2.37
     - gatsby-plugin-netlify-cms@4.3.12
     - gatsby-plugin-offline@3.2.26
     - gatsby-plugin-page-creator@2.3.25
     - gatsby-plugin-preact@4.0.10
     - gatsby-plugin-preload-fonts@1.2.23
     - gatsby-plugin-sharp@2.6.30
     - gatsby-recipes@0.2.19
     - gatsby-remark-images@3.3.28
     - gatsby-remark-katex@3.3.11
     - gatsby-source-contentful@2.3.40
     - gatsby-source-drupal@3.5.30
     - gatsby-source-filesystem@2.3.27
     - gatsby-source-graphql@2.7.2
     - gatsby-source-shopify@3.2.29
     - gatsby-source-wordpress@3.3.31
     - gatsby-telemetry@1.3.30
     - gatsby-transformer-remark@2.8.31
     - gatsby-transformer-sqip@2.3.30
     - gatsby@2.24.52
    vladar committed Aug 28, 2020
    Copy the full SHA
    ac72bfb View commit details
Showing with 1,438 additions and 1,968 deletions.
  1. +8 −8 benchmarks/mdx-without-images/package.json
  2. +4 −4 docs/docs/file-system-page-creation.md
  3. +1 −1 docs/docs/path-prefix.md
  4. +2 −2 package.json
  5. +6 −0 packages/babel-preset-gatsby/CHANGELOG.md
  6. +3 −3 packages/babel-preset-gatsby/package.json
  7. +4 −0 packages/babel-preset-gatsby/src/__tests__/__snapshots__/index.js.snap
  8. +14 −0 packages/babel-preset-gatsby/src/__tests__/index.js
  9. +5 −1 packages/babel-preset-gatsby/src/index.js
  10. +4 −0 packages/gatsby-admin/CHANGELOG.md
  11. +7 −0 packages/gatsby-admin/gatsby-node.js
  12. +4 −3 packages/gatsby-admin/package.json
  13. +74 −6 packages/gatsby-admin/src/components/providers.tsx
  14. +77 −0 packages/gatsby-admin/src/components/recipes-gui/code-diff.js
  15. +279 −0 packages/gatsby-admin/src/components/recipes-gui/index.js
  16. +116 −0 packages/gatsby-admin/src/components/recipes-gui/recipe-step.js
  17. +68 −0 packages/gatsby-admin/src/components/recipes-gui/resource-message.js
  18. +39 −0 packages/gatsby-admin/src/components/recipes-gui/utils.js
  19. +30 −0 packages/gatsby-admin/src/components/recipes-gui/welcome-message.js
  20. +8 −0 packages/gatsby-admin/src/pages/recipe.js
  21. +36 −0 packages/gatsby-admin/src/pages/recipes.tsx
  22. +5 −0 packages/gatsby-admin/src/urql-client.ts
  23. +4 −0 packages/gatsby-cli/CHANGELOG.md
  24. +5 −5 packages/gatsby-cli/package.json
  25. +1 −1 packages/gatsby-cli/src/reporter/redux/internal-actions.ts
  26. +4 −0 packages/gatsby-core-utils/CHANGELOG.md
  27. +1 −1 packages/gatsby-core-utils/package.json
  28. +1 −1 packages/gatsby-core-utils/src/service-lock.ts
  29. +4 −0 packages/gatsby-dev-cli/CHANGELOG.md
  30. +2 −2 packages/gatsby-dev-cli/package.json
  31. +4 −0 packages/gatsby-graphiql-explorer/CHANGELOG.md
  32. +3 −3 packages/gatsby-graphiql-explorer/package.json
  33. +4 −0 packages/gatsby-legacy-polyfills/CHANGELOG.md
  34. +2 −2 packages/gatsby-legacy-polyfills/package.json
  35. +4 −0 packages/gatsby-page-utils/CHANGELOG.md
  36. +3 −3 packages/gatsby-page-utils/package.json
  37. +4 −0 packages/gatsby-plugin-benchmark-reporting/CHANGELOG.md
  38. +2 −2 packages/gatsby-plugin-benchmark-reporting/package.json
  39. +1 −1 packages/gatsby-plugin-benchmark-reporting/src/gatsby-node.js
  40. +4 −0 packages/gatsby-plugin-manifest/CHANGELOG.md
  41. +2 −2 packages/gatsby-plugin-manifest/package.json
  42. +4 −0 packages/gatsby-plugin-mdx/CHANGELOG.md
  43. +2 −2 packages/gatsby-plugin-mdx/package.json
  44. +4 −0 packages/gatsby-plugin-netlify-cms/CHANGELOG.md
  45. +2 −2 packages/gatsby-plugin-netlify-cms/package.json
  46. +4 −0 packages/gatsby-plugin-offline/CHANGELOG.md
  47. +2 −2 packages/gatsby-plugin-offline/package.json
  48. +4 −0 packages/gatsby-plugin-page-creator/CHANGELOG.md
  49. +2 −2 packages/gatsby-plugin-page-creator/package.json
  50. +4 −0 packages/gatsby-plugin-preact/CHANGELOG.md
  51. +2 −2 packages/gatsby-plugin-preact/package.json
  52. +4 −0 packages/gatsby-plugin-preload-fonts/CHANGELOG.md
  53. +2 −2 packages/gatsby-plugin-preload-fonts/package.json
  54. +4 −0 packages/gatsby-plugin-sharp/CHANGELOG.md
  55. +3 −3 packages/gatsby-plugin-sharp/package.json
  56. +1 −1 packages/gatsby-plugin-sharp/src/scheduler.js
  57. +4 −0 packages/gatsby-recipes/CHANGELOG.md
  58. +3 −0 packages/gatsby-recipes/components.js
  59. +5 −5 packages/gatsby-recipes/package.json
  60. +13 −118 packages/gatsby-recipes/src/cli/index.js
  61. +3 −4 packages/gatsby-recipes/src/components/{mdx.js → step-renderer.js}
  62. +0 −1,013 packages/gatsby-recipes/src/gui.js
  63. +3 −0 packages/gatsby-recipes/src/parser/index.js
  64. +3 −3 packages/gatsby-recipes/src/recipe-machine/errors.test.js
  65. +3 −3 packages/gatsby-recipes/src/recipe-machine/index.js
  66. +108 −0 packages/gatsby-recipes/src/recipes-list.js
  67. +4 −7 packages/gatsby-recipes/src/transform-recipe-mdx.js
  68. +1 −9 packages/gatsby-recipes/src/validate-steps.js
  69. +4 −0 packages/gatsby-remark-images/CHANGELOG.md
  70. +2 −2 packages/gatsby-remark-images/package.json
  71. +4 −0 packages/gatsby-remark-katex/CHANGELOG.md
  72. +2 −2 packages/gatsby-remark-katex/package.json
  73. +3 −3 packages/gatsby-remark-katex/src/__tests__/__snapshots__/index.js.snap
  74. +4 −0 packages/gatsby-source-contentful/CHANGELOG.md
  75. +4 −4 packages/gatsby-source-contentful/package.json
  76. +4 −0 packages/gatsby-source-drupal/CHANGELOG.md
  77. +2 −2 packages/gatsby-source-drupal/package.json
  78. +4 −0 packages/gatsby-source-filesystem/CHANGELOG.md
  79. +3 −3 packages/gatsby-source-filesystem/package.json
  80. +4 −0 packages/gatsby-source-graphql/CHANGELOG.md
  81. +2 −2 packages/gatsby-source-graphql/package.json
  82. +1 −1 packages/gatsby-source-graphql/src/gatsby-node.js
  83. +4 −0 packages/gatsby-source-shopify/CHANGELOG.md
  84. +2 −2 packages/gatsby-source-shopify/package.json
  85. +4 −0 packages/gatsby-source-wordpress/CHANGELOG.md
  86. +2 −2 packages/gatsby-source-wordpress/package.json
  87. +4 −0 packages/gatsby-telemetry/CHANGELOG.md
  88. +8 −8 packages/gatsby-telemetry/package.json
  89. +2 −2 packages/gatsby-telemetry/src/in-memory-store.ts
  90. +3 −3 packages/gatsby-telemetry/src/telemetry.ts
  91. +4 −0 packages/gatsby-transformer-remark/CHANGELOG.md
  92. +2 −2 packages/gatsby-transformer-remark/package.json
  93. +4 −0 packages/gatsby-transformer-sqip/CHANGELOG.md
  94. +2 −2 packages/gatsby-transformer-sqip/package.json
  95. +11 −0 packages/gatsby/CHANGELOG.md
  96. +1 −1 packages/gatsby/cache-dir/error-overlay-handler.js
  97. +13 −13 packages/gatsby/package.json
  98. +1 −0 packages/gatsby/src/redux/__tests__/__snapshots__/babelrc.ts.snap
  99. +5 −1 packages/gatsby/src/redux/__tests__/jobsv2.js
  100. +1 −1 packages/gatsby/src/redux/nodes.ts
  101. +91 −2 packages/gatsby/src/schema/__tests__/node-model.js
  102. +11 −9 packages/gatsby/src/schema/node-model.js
  103. +1 −0 packages/gatsby/src/utils/__tests__/__snapshots__/webpack-utils.ts.snap
  104. +8 −6 packages/gatsby/src/utils/__tests__/jobs-manager.js
  105. +2 −1 packages/gatsby/src/utils/babel-loader-helpers.js
  106. +2 −1 packages/gatsby/src/utils/babel-loader.js
  107. +1 −1 packages/gatsby/src/utils/create-node-id.ts
  108. +10 −1 packages/gatsby/src/utils/eslint-config.ts
  109. +2 −2 packages/gatsby/src/utils/jobs-manager.ts
  110. +19 −1 packages/gatsby/src/utils/webpack-utils.ts
  111. +4 −0 renovate.json5
  112. +128 −659 yarn.lock
16 changes: 8 additions & 8 deletions benchmarks/mdx-without-images/package.json
Original file line number Diff line number Diff line change
@@ -14,18 +14,18 @@
"format": "prettier --write \"**/*.{js,jsx,json,md}\""
},
"dependencies": {
"@mdx-js/mdx": "1.6.6",
"@mdx-js/react": "1.6.6",
"@mdx-js/mdx": "^1",
"@mdx-js/react": "^1",
"faker": "^4.1.0",
"front-matter": "4.0.2",
"gatsby": "2.24.2",
"front-matter": "^4",
"gatsby": "^2",
"gatsby-plugin-benchmark-reporting": "*",
"gatsby-plugin-mdx": "1.2.25",
"gatsby-plugin-page-creator": "2.3.10",
"gatsby-source-filesystem": "2.3.18",
"gatsby-plugin-mdx": "^1",
"gatsby-plugin-page-creator": "^2",
"gatsby-source-filesystem": "^2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"remark-react": "^7.0.1"
"remark-react": "^7"
},
"devDependencies": {
"prettier": "2.0.4"
8 changes: 4 additions & 4 deletions docs/docs/file-system-page-creation.md
Original file line number Diff line number Diff line change
@@ -140,22 +140,22 @@ Assume that a `Product` model is used in two pages:
- `/src/pages/products/{Product.name}.js`
- `/src/pages/discounts/{Product.name}.js`

If you wanted to link to the `products/{Product:name}` route from your home page, you would have a component like this:
If you wanted to link to the `products/{Product.name}` route from your home page, you would have a component like this:

```jsx:title=/src/pages/index.js
import { Link, graphql } from "gatsby"
export default function HomePage(props) {
return props.data.allProducts.map(
product => <Link to={product.path}>{product.name}</Link>
product => <Link to={product.gatsbyPath}>{product.name}</Link>
);
}
export const query = graphql`
query ($id: String) {
query {
allProducts {
name
gatsbyPath(filePath: "/products/{Product:name}")
gatsbyPath(filePath: "/products/{Product.name}")
}
}
}
2 changes: 1 addition & 1 deletion docs/docs/path-prefix.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ Many applications are hosted at something other than the root (`/`) of their dom

For example, a Gatsby blog could live at `example.com/blog/`, or a site could be hosted on GitHub Pages at `example.github.io/my-gatsby-site/`.

Each of these sites need a prefix added to all paths on the site. So a link to
Each of these sites needs a prefix added to all paths on the site. So a link to
`/my-sweet-blog-post/` should be rewritten as `/blog/my-sweet-blog-post`.

In addition, links to various resources (JavaScript, CSS, images, and other static content) need the same prefix, so that the site continues to function correctly when served with the path prefix in place.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@
"babel-eslint": "^10.1.0",
"babel-jest": "^24.9.0",
"chalk": "^2.4.2",
"chokidar": "^3.4.0",
"chokidar": "^3.4.2",
"cross-env": "^5.2.1",
"danger": "^8.0.0",
"date-fns": "^1.30.1",
@@ -45,7 +45,7 @@
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.2",
"eslint-plugin-react": "^7.20.6",
"fs-extra": "^8.1.0",
"glob": "^7.1.6",
"husky": "3.1.0",
6 changes: 6 additions & 0 deletions packages/babel-preset-gatsby/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.5.8](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.5.7...babel-preset-gatsby@0.5.8) (2020-08-28)

### Features

- **gatsby:** Support React 17's new JSX Transform ([#26652](https://github.com/gatsbyjs/gatsby/issues/26652)) ([6ba68f8](https://github.com/gatsbyjs/gatsby/commit/6ba68f8))

## [0.5.7](https://github.com/gatsbyjs/gatsby/compare/babel-preset-gatsby@0.5.6...babel-preset-gatsby@0.5.7) (2020-08-26)

**Note:** Version bump only for package babel-preset-gatsby
6 changes: 3 additions & 3 deletions packages/babel-preset-gatsby/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-gatsby",
"version": "0.5.7",
"version": "0.5.8",
"author": "Philipp Spiess <hello@philippspiess.com>",
"repository": {
"type": "git",
@@ -21,8 +21,8 @@
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-macros": "^2.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"gatsby-core-utils": "^1.3.17",
"gatsby-legacy-polyfills": "^0.0.3"
"gatsby-core-utils": "^1.3.18",
"gatsby-legacy-polyfills": "^0.0.4"
},
"peerDependencies": {
"@babel/core": "^7.0.0",
Original file line number Diff line number Diff line change
@@ -258,6 +258,7 @@ Object {
Object {
"development": false,
"pragma": "React.createElement",
"runtime": "classic",
"useBuiltIns": true,
},
],
@@ -527,6 +528,7 @@ Object {
Object {
"development": false,
"pragma": "React.createElement",
"runtime": "classic",
"useBuiltIns": true,
},
],
@@ -790,6 +792,7 @@ Object {
Object {
"development": false,
"pragma": "React.createElement",
"runtime": "classic",
"useBuiltIns": true,
},
],
@@ -1053,6 +1056,7 @@ Object {
Object {
"development": true,
"pragma": "React.createElement",
"runtime": "classic",
"useBuiltIns": true,
},
],
14 changes: 14 additions & 0 deletions packages/babel-preset-gatsby/src/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -26,4 +26,18 @@ describe(`babel-preset-gatsby`, () => {
}),
])
})

it(`Allows to configure react runtime`, () => {
const { presets } = preset(null, {
reactRuntime: `automatic`,
})

expect(presets[1]).toEqual([
expect.stringContaining(path.join(`@babel`, `preset-react`)),
expect.objectContaining({
pragma: undefined,
runtime: `automatic`,
}),
])
})
})
6 changes: 5 additions & 1 deletion packages/babel-preset-gatsby/src/index.js
Original file line number Diff line number Diff line change
@@ -77,8 +77,12 @@ export default function preset(_, options = {}) {
resolve(`@babel/preset-react`),
{
useBuiltIns: true,
pragma: `React.createElement`,
pragma:
options.reactRuntime === `automatic`
? undefined
: `React.createElement`,
development: stage === `develop`,
runtime: options.reactRuntime || `classic`,
},
],
],
4 changes: 4 additions & 0 deletions packages/gatsby-admin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.141](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.1.140...gatsby-admin@0.1.141) (2020-08-28)

**Note:** Version bump only for package gatsby-admin

## [0.1.140](https://github.com/gatsbyjs/gatsby/compare/gatsby-admin@0.1.139...gatsby-admin@0.1.140) (2020-08-26)

### Features
7 changes: 7 additions & 0 deletions packages/gatsby-admin/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
node: {
fs: 'empty'
}
})
}
7 changes: 4 additions & 3 deletions packages/gatsby-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gatsby-admin",
"version": "0.1.140",
"version": "0.1.141",
"main": "index.js",
"author": "Max Stoiber",
"license": "MIT",
@@ -19,15 +19,16 @@
"csstype": "^2.6.10",
"feedback-fish": "^0.1.12",
"formik": "^2.1.4",
"gatsby": "^2.24.51",
"gatsby": "^2.24.52",
"gatsby-interface": "0.0.183",
"gatsby-plugin-typescript": "^2.4.18",
"gatsby-plugin-webfonts": "^1.1.3",
"gatsby-source-graphql": "^2.7.1",
"gatsby-source-graphql": "^2.7.2",
"lodash-es": "^4.17.15",
"ncp": "^2.0.0",
"nodemon": "^2.0.4",
"prism-react-renderer": "^1.1.1",
"query-string": "^6.13.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-helmet": "^6.1.0",
80 changes: 74 additions & 6 deletions packages/gatsby-admin/src/components/providers.tsx
Original file line number Diff line number Diff line change
@@ -2,19 +2,87 @@ import React from "react"
import { Provider, Client } from "urql"
import { ThemeProvider, getTheme } from "gatsby-interface"
import { ThemeProvider as StrictUIProvider } from "strict-ui"
import { Spinner } from "theme-ui"
import { Spinner, merge } from "theme-ui"
import { createUrqlClient } from "../urql-client"
import "normalize.css"

const baseTheme = getTheme()

const theme = {
...baseTheme,
const recipesTheme = merge(baseTheme, {
colors: {
background: `white`,
},
styles: {
h1: {
fontSize: 6,
fontFamily: `heading`,
fontWeight: `heading`,
mt: 0,
mb: 4,
},
h2: {
fontSize: 5,
fontFamily: `heading`,
fontWeight: `heading`,
mt: 0,
mb: 4,
},
p: {
color: baseTheme.tones.NEUTRAL.dark,
fontSize: 2,
fontFamily: `body`,
fontWeight: `body`,
mt: 0,
mb: 4,
lineHeight: 1.45,
},
pre: {
fontFamily: baseTheme.fonts.monospace,
fontSize: 0,
lineHeight: 1.45,
mt: 0,
mb: 6,
whiteSpace: `pre-wrap`,
},
inlineCode: {
backgroundColor: `hsla(0,0%,0%,0.06)`,
color: baseTheme.tones.NEUTRAL.darker,
borderRadius: `3px`,
py: `0.2em`,
px: `0.2em`,
fontSize: `90%`,
},
ol: {
color: baseTheme.tones.NEUTRAL.dark,
paddingLeft: 8,
mt: 0,
mb: 6,
fontFamily: `body`,
fontWeight: `body`,
},
ul: {
color: baseTheme.tones.NEUTRAL.dark,
paddingLeft: 8,
mt: 0,
mb: 6,
fontFamily: `body`,
fontWeight: `body`,
},
li: {
color: baseTheme.tones.NEUTRAL.dark,
mb: 2,
fontFamily: `body`,
fontWeight: `body`,
lineHeight: 1.6,
},
},
})

const theme = merge(recipesTheme, {
colors: {
...baseTheme.colors,
background: baseTheme.colors.primaryBackground,
},
fonts: {
...baseTheme.fonts,
// We want to use inter for all text on the page, no more futura!
brand: baseTheme.fonts.sans,
heading: baseTheme.fonts.sans,
@@ -61,7 +129,7 @@ const theme = {
backgroundColor: `grey.5`,
},
},
}
})

const GraphQLProvider: React.FC<{}> = ({ children }) => {
const [status, setStatus] = React.useState(`loading`)
Loading