Skip to content

Commit

Permalink
Use mutations in Gatsby Admin (#23337)
Browse files Browse the repository at this point in the history
* fix(gatsby): Throw error on default export in gatsby-ssr/brows… (#23133)

* fix: Handle default export case

* heh

* fix comment

* chore(release): Publish

 - gatsby-cli@2.11.12
 - gatsby-plugin-sitemap@2.3.5
 - gatsby-recipes@0.0.9
 - gatsby-remark-prismjs@3.4.4
 - gatsby-theme-blog-core@1.3.27
 - gatsby-theme-blog@1.4.27
 - gatsby-theme-notes@1.2.26
 - gatsby@2.20.26

* fix(docs): Using-MDX link (#23288)

* fix(docs): Link to apollo blog (#23290)

* fix(docs): change gatsby-config mention for global CSS import (#23245)

* fix `gatsby-config` mention

* chore: format

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* docs: added details signifying that node fields can be arbitra… (#23106)

* added details signifying that node fields can be arbitrary

* Update docs/docs/data-fetching.md

Co-Authored-By: Kyle Gill <kylerobertgill@gmail.com>

* Update docs/docs/data-fetching.md

Co-Authored-By: Kyle Gill <kylerobertgill@gmail.com>

* removed empty line to fix failed linting tests

Co-Authored-By: Kyle Gill <kylerobertgill@gmail.com>

Co-authored-by: Kyle Gill <kylerobertgill@gmail.com>

* chore(gatsby): drop the the (#23295)

* chore(showcase): Add new sites built by Bejamas to showcase; c… (#23125)

* chore(sites): add new sites built by bejamas

* chore(creators): update bejamas cover

* chore(showcase):Add SofaScore Corporate web to showcase sites (#23128)

Co-authored-by: Mario Nikolaus <mario.nikolaus@sofascore.com>

* fix local links (#23149)

* chore(docs): Reference new ComponentModel component rather than generic LayerModel (#23241)

* Reference new ComponentModel component rather than generic LayerModel

* Remove use of t macro from layer models

* Half-fixing lingui code

* Revert "Half-fixing lingui code"

This reverts commit 64f052a.

* Remove Lingui from layer-model

* fix(www): fix sidebar (#23301)

* fix(www): fix sidebar

* Update sidebar.js

* fix(recipes): Fix shadow-file resource for scoped NPM packages & re-enable e2e testing for resources (#23274)

* fix(recipes): Fix shadow-file resource for scoped NPM packages

* WILL SLASH FIX WINDOWS???

* Add missing code block

* Try again

* hmmm joinPath maybe is the problem

* More fixes

* try reenabling tests

* disable colors in diffs

* Fix npm script test

* Why do these keep changing all the time??

* Use parsed value for the plan

* Disable Chalk colors on unit tests so match local ones

* Update packages/gatsby-recipes/src/providers/utils/get-diff.js

Co-Authored-By: John Otander <johnotander@gmail.com>

Co-authored-by: John Otander <johnotander@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* chore(release): Publish

 - gatsby-cli@2.11.13
 - gatsby-recipes@0.0.10
 - gatsby-theme-blog-core@1.3.28
 - gatsby-theme-blog@1.4.28
 - gatsby-theme-notes@1.2.27
 - gatsby@2.20.27

* chore(starters): add gatsby-starter-ecommerce (#23037)

* chore(starters): add gatsby-starter-ecommerce

* chore(starters): add gatsby-starter-ecommerce

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* Add site Interficie Internet Services (#23130)

* Add site Interficie Internet Services

* Correct JavaScript cammelcase

* Prettier format

Co-authored-by: Obinna Ekwuno <obinnacodes@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* fix brand names (#23142)

* fix(blog): remove local domain (#23141)

* fix remove local domain

* fix local domain

* fix local domain

* fix remove local domain

* fix for linter

* Create paul scanlon 100 days of Gatsby blog post and add  assets (#23294)

* Create paul scanlon 100 days of Gatsby blog post and add  assets

* fix frontmatter

* fix frontmatter issue and ad relative links

* fix typos and spacing issues

* Update docs/blog/2020-04-20-paulie-scanlons-journey-of-100-days/index.md

Co-Authored-By: LB <laurie@gatsbyjs.com>

Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
Co-authored-by: LB <laurie@gatsbyjs.com>

* Clarify prefix-paths variable. (#23309)

The line (one line, two places) I'm editing was copied from a comment in #21627 without the surrounding context. This edit provides that context.

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* chore(showcase):Add shreysachdeva.tech to showchase (#23032)

* Add shreysachdeva.tech to sites.yml

**Description**
Added the details of my personal website shreysachdeva.tech.

**Documentation**
No documentation

**Related Issues**
N/A

* chore: format

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
Co-authored-by: Obinna Ekwuno <obinnacodes@gmail.com>

* fix(www): Fix sidebar expansion behavior (#23325)

* [gatsby-plugin-manifest] Generate a 32x32 favicon instead of generating from first manifest icon (#23077)

* Decouple favicons from manifest icons

* Update packages/gatsby-plugin-manifest/README.md

* Replace include_favicon undefined check with nullish coalescing operator

Co-Authored-By: Alex Moon <moonmeister@users.noreply.github.com>

* Assert gatsby-plugin-manifest generates favicon PNG (unless include_favicon option is false)

* Don't mock createContentDigest in gatsby-plugin-manifest's gatsby-ssr tests (to be consistent with gatsby-node tests)

* Tweak a comment

Co-authored-by: LB <laurie@gatsbyjs.com>
Co-authored-by: Alex Moon <moonmeister@users.noreply.github.com>

* Use mutations in Gatsby Admin

* Remove stray console.logs

* chore(gatsby-recipes): Update README typo (#23333)

Fixed typo in README.md

* fix(gatsby): Check for files before delete action when using GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES (#23219)

* Check for files before delete action

* fix lint issues

* fix lint issues and add return type to checkFolderHasContent

* rename check function

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* Install plugins as prod dependencies

* chore(release): Publish

 - gatsby-cli@2.11.14
 - gatsby-plugin-manifest@2.3.6
 - gatsby-recipes@0.0.11
 - gatsby-theme-blog-core@1.3.29
 - gatsby-theme-blog@1.4.29
 - gatsby-theme-notes@1.2.28
 - gatsby@2.20.28

* Add Besoegsvenner site to showcase (#23172)

* Add Besoegsvenner site to showcase

50.000 elderly people in Denmark feel lonely. This project seeks to inform people to become visitor friends ("Besøgsven" in Danish) to help fight loneliness and bring new friendships in to the world.

* Update sites.yml

Co-authored-by: Obinna Ekwuno <obinnacodes@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* chore(benchmarks): Add Drupal data updater script to update benchmark data (#23242)

* Add Drupal data updater script to update benchmark data

* Remove console.log statement

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* Make TypeScript happy

* fix(gatsby): fix Uncaught TypeError in navigation.js (#23196)

* Add null check to address #21263

#21263 is an issue many people are arriving at for a variety of reasons.  Since the code contains this logic on the following line:

```
      if (pageHeadings && pageHeadings.length) {
```

There should be no issue in seeing if `document.getElementById(`gatsby-focus-wrapper`) exists first before attempting to look up `getElementsByTagName`.

* Update packages/gatsby/cache-dir/navigation.js

Co-Authored-By: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>

* chore: format

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* Add support for file argument in remark plugins for gatsby-plugin-mdx (#21489)

* chore(gatsby-cli) Migrate remaining files in reporters/logger/ink to Typscript (#22782)

* Migrate remaining files in gatsby-cli/reporters/logger/ink to TS

* Rename "IProps" to something more contextual
Extend interface parameter individually instead of using utility

* Clean up after merging the redux master changes

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>

* Fix Drupal data update script (#23349)

* Add noop data update scripts for all benchmarks (#23352)

* Add noop data update scripts for all CMS benchmarks

* Add data update to remainder of benchmarks

* chore(babel-preset-gatsby): Convert dependencies to TS (#22038)

Co-authored-by: Blaine Kasten <blainekasten@gmail.com>

* fix(gatsby): Improve error message when calling useStaticQuery without graphql (#23189)

* Add warning message for a long queries (#23261)

* Add warning message for a long queries

* Change timeout to 15 seconds

* Replace console with report

* Print out queryJob.componentPath instead of page.internalComponentName

* Add new info in the warning message

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>

* refactor(gatsby): Convert inference metadata to TypeScript (#23264)

* refactor(inference-metadata): Convert to TypeScript

* Remove unused variable

* Forgot some types

* refactor(type-conflict-reporter): Node description

After tightening the original util function to return a string only, it
seemed sensible to convert that to use nullish coalescing. At that
point, seeing the function is only used in a single place and not
exported, I inlined it.

* refactor(inference-metadata): Interface renaming

* fix: Extract ValueType type

* refactor: Change type from unknown to object

* Corrected types, but left the code alone

* Removed redundant comments

* Update README.md (#23357)

* feat(gatsby-remark-images): support markdownCaptions in mdx + fix for remark (#21188)

* pass compiler to gatsby-remark-* plugins in the mdx plugin

* make getImageCaption async

* use async mdx compiler

* fix for using compiler

* don't mutate the node multiple times

* convert markdown ast to html ast

Co-authored-by: vladar

* chore(release): Publish

 - babel-preset-gatsby@0.3.4
 - gatsby-cli@2.11.15
 - gatsby-plugin-mdx@1.1.10
 - gatsby-recipes@0.0.12
 - gatsby-remark-images@3.2.5
 - gatsby-theme-blog-core@1.3.30
 - gatsby-theme-blog@1.4.30
 - gatsby-theme-notes@1.2.29
 - gatsby-transformer-remark@2.7.4
 - gatsby@2.20.29

* Fix lint errors

* Fix TypeScript unused declaration error

* Fix linting

Co-authored-by: Lennart <lekoarts@gmail.com>
Co-authored-by: Jeremy Albright <1935258+Js-Brecht@users.noreply.github.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
Co-authored-by: Elijah <35966941+ElijahCano33@users.noreply.github.com>
Co-authored-by: Kyle Gill <kylerobertgill@gmail.com>
Co-authored-by: Peter van der Zee <209817+pvdz@users.noreply.github.com>
Co-authored-by: Michał Zieliński <zielinski-michal@outlook.com>
Co-authored-by: Mario Nikolaus <mnikolaus@users.noreply.github.com>
Co-authored-by: Mario Nikolaus <mario.nikolaus@sofascore.com>
Co-authored-by: Michael <184316+muescha@users.noreply.github.com>
Co-authored-by: Aisha Blake <aisha@gatsbyjs.com>
Co-authored-by: Ward Peeters <ward@coding-tech.com>
Co-authored-by: Kyle Mathews <mathews.kyle@gmail.com>
Co-authored-by: John Otander <johnotander@gmail.com>
Co-authored-by: Lorenzo GM <dev@lorenzogm.com>
Co-authored-by: aperacaula <36845488+aperacaula@users.noreply.github.com>
Co-authored-by: Obinna Ekwuno <obinnacodes@gmail.com>
Co-authored-by: Michelle Gienow <michellegienow@gmail.com>
Co-authored-by: Laurie Barth <laurie@LauriesrkLaptop.fios-router.home>
Co-authored-by: LB <laurie@gatsbyjs.com>
Co-authored-by: Alex Fornuto <github@alexf.co>
Co-authored-by: Shrey Sachdeva <shreysachdeva.2000@gmail.com>
Co-authored-by: Nat Alison <1278991+tesseralis@users.noreply.github.com>
Co-authored-by: Owen <owen@dangerfarms.com>
Co-authored-by: Alex Moon <moonmeister@users.noreply.github.com>
Co-authored-by: Marcus Lyons <10541922+marcuslyons@users.noreply.github.com>
Co-authored-by: Stuart Rayson <stuart.a.rayson@gmail.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
Co-authored-by: Jacob Packert <jacobpackert@gmail.com>
Co-authored-by: Shane Thomas <shane@codekarate.com>
Co-authored-by: nick shook <nick@shook.family>
Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Arthur <arthur@mediamonks.com>
Co-authored-by: Blaine Kasten <blainekasten@gmail.com>
Co-authored-by: Nicholas Duffy <duffn@outlook.com>
Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
Co-authored-by: Rebenkov Aleksey <rebenkovaleksey@yandex.ru>
Co-authored-by: Ross Hendry <rhendry@googlemail.com>
Co-authored-by: Khaled Garbaya <khaled@contentful.com>
Co-authored-by: Mathieu Dutour <mathieu@dutour.me>
Co-authored-by: Sidhartha Chatterjee <me@sidharthachatterjee.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 134 changed files with 2,512 additions and 575 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,16 @@ jobs:

unit_tests_node10:
executor: node
environment:
FORCE_COLOR: 0
<<: *test_template

unit_tests_node12:
executor:
name: node
image: "12"
environment:
FORCE_COLOR: 0
<<: *test_template

unit_tests_www:
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/markdown_id/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"react-dom": "^16.12.0",
"react-helmet": "^5.2.1",
"react-typography": "^0.16.19",
"ts-node": "^8.9.0",
"typeface-merriweather": "0.0.72",
"typeface-montserrat": "0.0.75",
"typescript": "^3.8.3",
"typography": "^0.16.19",
"typography-theme-wordpress-2016": "^0.16.19"
},
Expand All @@ -46,6 +48,7 @@
"bench": "rm -r markdown-pages; NUM_PAGES=${NUM_PAGES:-2000} node md.generate.js; gatsby clean; node --max_old_space_size=2000 node_modules/.bin/gatsby build",
"benchnb": "gatsby clean; node --max_old_space_size=2000 node_modules/.bin/gatsby build",
"build": "gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"start": "npm run develop",
"serve": "gatsby serve",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/markdown_id/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
3 changes: 3 additions & 0 deletions benchmarks/markdown_slug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"react-dom": "^16.12.0",
"react-helmet": "^5.2.1",
"react-typography": "^0.16.19",
"ts-node": "^8.9.0",
"typeface-merriweather": "0.0.72",
"typeface-montserrat": "0.0.75",
"typescript": "^3.8.3",
"typography": "^0.16.19",
"typography-theme-wordpress-2016": "^0.16.19"
},
Expand All @@ -46,6 +48,7 @@
"bench": "rm -r markdown-pages; NUM_PAGES=${NUM_PAGES:-2000} node md.generate.js; gatsby clean; node --max_old_space_size=2000 node_modules/.bin/gatsby build",
"benchnb": "gatsby clean; node --max_old_space_size=2000 node_modules/.bin/gatsby build",
"build": "gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"start": "npm run develop",
"serve": "gatsby serve",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/markdown_slug/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
5 changes: 4 additions & 1 deletion benchmarks/markdown_table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
"bench": "set -x; gatsby clean; NUM_PAGES=${NUM_PAGES:-2000} gatsby build",
"develop": "gatsby develop",
"build": "gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"serve": "gatsby serve"
},
"dependencies": {
"gatsby": "^2.19.5",
"gatsby-transformer-remark": "^2.6.48",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-dom": "^16.12.0",
"ts-node": "^8.9.0",
"typescript": "^3.8.3"
},
"devDependencies": {
"faker": "^4.1.0",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/markdown_table/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
5 changes: 4 additions & 1 deletion benchmarks/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"build": "gatsby build",
"build:send": "cross-env BENCHMARK_REPORTING_URL=true gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"postinstall": "del-cli src/articles && gatsby clean && willit --use-pregenerated-data --type=mdx --num-pages=${NUM_PAGES:-512}",
Expand All @@ -27,7 +28,9 @@
"gatsby-source-filesystem": "^2.2.3",
"gatsby-transformer-sharp": "^2.4.5",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-dom": "^16.12.0",
"ts-node": "^8.9.0",
"typescript": "^3.8.3"
},
"devDependencies": {
"cross-env": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/mdx/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
5 changes: 4 additions & 1 deletion benchmarks/source-contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"clean": "gatsby clean",
"build": "gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"serve": "gatsby serve",
Expand All @@ -26,7 +27,9 @@
"gatsby-source-filesystem": "^2.1.48",
"gatsby-transformer-sharp": "^2.3.14",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-dom": "^16.12.0",
"ts-node": "^8.9.0",
"typescript": "^3.8.3"
},
"devDependencies": {
"chalk": "^2.4.2",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/source-contentful/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
5 changes: 4 additions & 1 deletion benchmarks/source-datocms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"build": "gatsby build",
"build:send": "cross-env BENCHMARK_REPORTING_URL=true gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"serve": "gatsby serve",
Expand All @@ -22,7 +23,9 @@
"gatsby-transformer-sharp": "^2.3.14",
"lodash.kebabcase": "^4.1.1",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-dom": "^16.12.0",
"ts-node": "^8.9.0",
"typescript": "^3.8.3"
},
"devDependencies": {
"cross-env": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/source-datocms/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
2 changes: 2 additions & 0 deletions benchmarks/source-drupal/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
BENCHMARK_DRUPAL_BASE_URL=
BENCHMARK_DRUPAL_USERNAME=
BENCHMARK_DRUPAL_PASSWORD=
7 changes: 6 additions & 1 deletion benchmarks/source-drupal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@
"scripts": {
"build": "gatsby build",
"build:send": "cross-env BENCHMARK_REPORTING_URL=true gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve"
},
"dependencies": {
"dotenv": "^8.2.0",
"faker": "^4.1.0",
"gatsby": "^2.19.7",
"gatsby-image": "^2.2.40",
"gatsby-plugin-sharp": "^2.4.5",
"gatsby-source-drupal": "^3.3.18",
"gatsby-source-filesystem": "^2.1.48",
"gatsby-transformer-sharp": "^2.3.14",
"lodash.kebabcase": "^4.1.1",
"node-fetch": "^2.6.0",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-dom": "^16.12.0",
"ts-node": "^8.6.2",
"typescript": "^3.8.3"
},
"devDependencies": {
"cross-env": "^7.0.0",
Expand Down
13 changes: 13 additions & 0 deletions benchmarks/source-drupal/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env node

import { update } from "./updater"

require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})

const username = process.env.BENCHMARK_DRUPAL_USERNAME
const password = process.env.BENCHMARK_DRUPAL_PASSWORD
const server = process.env.BENCHMARK_DRUPAL_BASE_URL

update(username, password, server)
62 changes: 62 additions & 0 deletions benchmarks/source-drupal/scripts/updater.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import fetch from "node-fetch"
import faker from "faker"

interface IArticle {
id: string
attributes: {
title: string
}
}

// Remove last word of title and replace it with a random word.
const updateTitle = (title: string): string =>
`${title.substring(0, title.lastIndexOf(` `))} ${faker.lorem.word()}`

const patchArticle = async (
username: string,
password: string,
server: string,
article: IArticle
): Promise<void> => {
const url = `${server}/jsonapi/node/article/${article.id}`

const response = await fetch(url, {
method: `PATCH`,
headers: {
"Content-Type": `application/vnd.api+json`,
Authorization: `Basic ${Buffer.from(`${username}:${password}`).toString(
`base64`
)}`,
},
body: JSON.stringify({
data: {
type: `node--article`,
id: article.id,
attributes: {
title: updateTitle(article.attributes.title),
},
},
}),
})
}

const getFirstArticle = async (server: string): Promise<IArticle> => {
const url = `${server}/jsonapi/node/article?page[limit]=1&sort=created`
const response = await fetch(url)
const body = await response.json()
return body.data[0]
}

export const update = async (
username?: string,
password?: string,
server?: string
): Promise<void> => {
if (!username || !password || !server) {
console.error(`You must pass username, password and server`)
return
}

const article = await getFirstArticle(server)
await patchArticle(username, password, server, article)
}
11 changes: 11 additions & 0 deletions benchmarks/source-drupal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"typeRoots": ["./node_modules/@types", "./typings"],
"target": "ES2018" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
"strict": true /* Enable all strict type-checking options. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
"noImplicitAny": false
}
}
5 changes: 4 additions & 1 deletion benchmarks/source-wordpress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"build": "gatsby build",
"build:send": "cross-env BENCHMARK_REPORTING_URL=true gatsby build",
"data-update": "ts-node scripts/data-update.ts",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"serve": "gatsby serve",
Expand All @@ -21,7 +22,9 @@
"gatsby-source-wordpress-experimental": "^0.0.31",
"gatsby-transformer-sharp": "^2.3.14",
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react-dom": "^16.12.0",
"ts-node": "^8.9.0",
"typescript": "^3.8.3"
},
"devDependencies": {
"cross-env": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions benchmarks/source-wordpress/scripts/data-update.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop for now, but will be created later.
24 changes: 12 additions & 12 deletions docs/blog/2020-04-02-community-qa-with-kyle-mathews/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The [full video is on YouTube](https://www.youtube.com/watch?v=mGyUJvKjzXQ&featu

## In 2018 you blogged about "a new version of Gatsby" with incremental and parallelizing builds—what's the status & roadmap for incremental builds with Gatsby?

I’m guessing this question is referring to [my blog post on the launch of our company in 2018](https://www.gatsbyjs.org/blog/2018-05-24-launching-new-gatsby-company/) and that supporting very fast deployments for everyone is our top goal as a company.
I’m guessing this question is referring to [my blog post on the launch of our company in 2018](/blog/2018-05-24-launching-new-gatsby-company/) and that supporting very fast deployments for everyone is our top goal as a company.

This has always been my goal with Gatsby. The Gatsby v1 architecture was designed specifically to support this. Here’s the original tweet announcing when the basic support for incremental builds was added to the framework in a 1.0 alpha:

Expand All @@ -21,7 +21,7 @@ Gatsby has always used “incremental building” to drive developing on sites.

The Gatsby cache, if saved between builds, also substantially increases the speed of builds by avoiding much of the rework.

As most of you know, [we recently launched our own continuous deployment product on Gatsby Cloud](https://www.gatsbyjs.org/blog/2020-01-27-announcing-gatsby-builds-and-reports/). Included in that was initial support for parallelizing parts of the build process — images to start with, and more to come.
As most of you know, [we recently launched our own continuous deployment product on Gatsby Cloud](/blog/2020-01-27-announcing-gatsby-builds-and-reports/). Included in that was initial support for parallelizing parts of the build process — images to start with, and more to come.

That drove some impressive improvements to build speeds:

Expand Down Expand Up @@ -55,29 +55,29 @@ We’re razor focused right now on solving these two problems (see the last answ

There are still two remaining valid reasons for run-time SSR that we plan to support. One is personalization where the page needs to be customized for the visitor based on a variety of factors. The other is A/B testing. Both of those require that you can render custom versions of pages on the fly. We will not only support this but also solve it in a way that doesn’t sacrifice the speed and simplicity Gatsby is known for.

## What's a realistic availability timeline for incremental builds using Wordpress with WPGraphQL?
## What's a realistic availability timeline for incremental builds using WordPress with WPGraphQL?

A bit of back history for everyone: last year we hired [Jason Bahl](https://twitter.com/jasonbahl), the creator of [WPGraphQL](https://www.wpgraphql.com/), to continue his work. We want to fully support WordPress + Gatsby, meaning content authors can see real-time previews and content changes deploy in less than 10 seconds. This is the great experience that CMSs provide for content authors. Replicating it is a hard requirement for most people considering moving to a headless WordPress + Gatsby stack.

We choose WPGraphQL as the way forward as Jason’s done an amazing job making incremental querying incredibly fast—as well as adding GraphQL subscription support, which will drive both preview & incremental builds.

Last fall [Tyler Barnes](https://github.com/TylerBarnes) — a long-time Gatsby/WP developer — joined the team to work on a new version of gatsby-source-wordpress that leverages WPGraphQL to drive preview/10 second deploys.
Last fall [Tyler Barnes](https://github.com/TylerBarnes) — a long-time Gatsby/WordPress developer — joined the team to work on a new version of gatsby-source-wordpress that leverages WPGraphQL to drive preview/10 second deploys.

They’ve been making incredible progress. Check out [the umbrella issue for the epic](https://github.com/gatsbyjs/gatsby/issues/19292). A number of people are experimenting with the alphas and even shipping sites! If you’re interested in this space, please dive in.

What’s amazing about this work is that **you’ll soon be able to seamlessly swap out the WordPress presentation layer for Gatsby **without** anyone working in the WordPress CMS noticing**. As a developer, you’ll be able to deliver way faster sites, enjoy far simpler hosting, put WordPress behind a firewall (maybe even skip some of those security updates! 😅🤪), and enjoy all the advantages of working in the world of modern React/JS tooling.
What’s amazing about this work is that **you’ll soon be able to seamlessly swap out the WordPress presentation layer for Gatsby **without** anyone working in the WordPress CMS noticing**. As a developer, you’ll be able to deliver way faster sites, enjoy far simpler hosting, put WordPress behind a firewall (maybe even skip some of those security updates! 😅🤪), and enjoy all the advantages of working in the world of modern React/JavaScript tooling.

## Working with images is a pain, and the distinction between page and static query seems a wrong API. The [issue #10482](https://github.com/gatsbyjs/gatsby/issues/10482) seems to fix both. What's the plan?

We’ve worked on a number of ideas/prototypes for solving this but haven’t yet arrived at something we feel is a genuine improvement. There are more ideas floating around for better APIs, so stay tuned. We’d love to pair with anyone who has ideas for improving things as well.

## Is there going to be a WP integration with Gatsby Cloud?
## Is there going to be a WordPress integration with Gatsby Cloud?

Yup! Once the new gatsby-source-wordpress version is ready, Preview & Incremental builds will work out-of-the-box on Gatsby Cloud.

## Are there going to be any big Gatsby core releases coming up?

We ship releases multiple times a week. Most are incremental improvements and bug releases. We periodically write blog posts summarizing improvements. You can catch up with them at [https://www.gatsbyjs.org/blog/tags/gazette/](https://www.gatsbyjs.org/blog/tags/gazette/)
We ship releases multiple times a week. Most are incremental improvements and bug releases. We periodically write blog posts summarizing improvements. You can catch up with them at [https://www.gatsbyjs.org/blog/tags/gazette/](/blog/tags/gazette/)

We put up a couple of RFCs recently for “[Recipes](https://github.com/gatsbyjs/gatsby/pull/22610)” and a “[Gatsby Admin](https://github.com/gatsbyjs/gatsby/pull/22713)” experience you can go read. They’re going to push the Gatsby experience forward a lot.

Expand All @@ -99,7 +99,7 @@ We’re also investigating better patterns for building themes to ensure they’

## Is there a limit on the size of a website generated with Gatsby? At what point does the build time become unmanageable?

That’s a constantly moving target as we improve the Gatsby build process. Our open source team is now 15 people strong and many of them are working on the build process from different angles from improving source plugins to core parts of the build process. [Peter van der Zee](https://twitter.com/kuvos) joined the team as a build performance specialist last fall from Facebook where he was a JS Infrastructure Engineer and [has a long string of PRs improving the build process over the past months](https://github.com/gatsbyjs/gatsby/commits?author=pvdz).
That’s a constantly moving target as we improve the Gatsby build process. Our open source team is now 15 people strong and many of them are working on the build process from different angles from improving source plugins to core parts of the build process. [Peter van der Zee](https://twitter.com/kuvos) joined the team as a build performance specialist last fall from Facebook where he was a JavaScript Infrastructure Engineer and [has a long string of PRs improving the build process over the past months](https://github.com/gatsbyjs/gatsby/commits?author=pvdz).

We’re also working on adding benchmark sites that’ll show more clearly when a site is a good fit for Gatsby.

Expand All @@ -111,14 +111,14 @@ Awww thanks! I don’t know there’s anything magic other than just caring enou

Yes! This is something we’re pretty excited about shipping. If you’re interested in learning more or helping out, check out this issue [Sidhartha Chatterjee](https://github.com/sidharthachatterjee) put together — [https://github.com/gatsbyjs/gatsby/issues/18983](https://github.com/gatsbyjs/gatsby/issues/18983)

[Blaine Kasten](https://twitter.com/blainekasten) has also been leading the effort to convert the entire codebase to Typescript which has been a massive effort by dozens of people — [https://github.com/gatsbyjs/gatsby/issues/21995](https://github.com/gatsbyjs/gatsby/issues/21995)
[Blaine Kasten](https://twitter.com/blainekasten) has also been leading the effort to convert the entire codebase to TypeScript which has been a massive effort by dozens of people — [https://github.com/gatsbyjs/gatsby/issues/21995](https://github.com/gatsbyjs/gatsby/issues/21995)

## Are you guys trying to catch up to Next.js's smaller JS bundle size?
## Are you guys trying to catch up to Next.js's smaller JavaScript bundle size?

A team at Chrome has been doing a lot of investigation into how frameworks like Next.js & Gatsby can optimize how we ship JavaScript. Next.js implemented that a few months ago and last week [Ward Peeters](https://twitter.com/wardpeet) shipped [a PR implementing the same new webpack bundling algorithm](https://github.com/gatsbyjs/gatsby/pull/22253) for Gatsby—so bundle sizes are now identical to Next.js. Very exciting improvement!

## Are you continuing to work on even more good accessibility defaults for Gatsby in the future? How important is accessibility overall within Gatsby?

We care a lot about accessibility. We think that’s part and parcel of building a great framework. We moved to @reach/router as part of Gatsby v2 to take advantage of Ryan Florence’s work on JS router accessibility, and Marcy Sutton has done a lot of testing on how to solve some lingering issues. We hired [Madalyn Rose](https://twitter.com/madalynrose) last fall as a full-time specialist for accessibility engineering in Gatsby.
We care a lot about accessibility. We think that’s part and parcel of building a great framework. We moved to @reach/router as part of Gatsby v2 to take advantage of Ryan Florence’s work on JavaScript router accessibility, and Marcy Sutton has done a lot of testing on how to solve some lingering issues. We hired [Madalyn Rose](https://twitter.com/madalynrose) last fall as a full-time specialist for accessibility engineering in Gatsby.

Check out our blog posts tagged with accessibility: [https://www.gatsbyjs.org/blog/tags/accessibility](https://www.gatsbyjs.org/blog/tags/accessibility)
Check out our blog posts tagged with accessibility: [https://www.gatsbyjs.org/blog/tags/accessibility](/blog/tags/accessibility)

0 comments on commit 6ff3d43

Please sign in to comment.