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@3.4.0
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@3.4.1
Choose a head ref
  • 7 commits
  • 70 files changed
  • 6 contributors

Commits on Apr 28, 2021

  1. fix(gatsby-plugin-gatsby-cloud): Copying manifest (#31092) (#31094)

    Co-authored-by: Lennart <lekoarts@gmail.com>
    GatsbyJS Bot and LekoArts authored Apr 28, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    renovate-bot Mend Renovate
    Copy the full SHA
    9fbbde1 View commit details
  2. chore(release): Publish

     - gatsby-plugin-gatsby-cloud@2.4.1
    LekoArts committed Apr 28, 2021

    Verified

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

Commits on May 4, 2021

  1. tests: isolate tests to tmp directory (#30646) (#31239)

    Cherry-picked from 1527e47
    
    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    vladar and wardpeet authored May 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    169dc17 View commit details
  2. chore: Update mini-css-extract-plugin to 1.5.1 (#31110) (#31237)

    (cherry picked from commit c0b6dd9)
    
    Co-authored-by: Lennart <lekoarts@gmail.com>
    Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
    3 people authored May 4, 2021
    Copy the full SHA
    1861243 View commit details
  3. fix(gatsby-source-wordpress): previewing drafts requires using the pr…

    …eview query (#31133) (#31243)
    
    (cherry picked from commit 53f7d7d)
    
    Co-authored-by: Tyler Barnes <tyler@gatsbyjs.com>
    GatsbyJS Bot and TylerBarnes authored May 4, 2021
    Copy the full SHA
    22590b4 View commit details
  4. fix(gatsby-telemetry): Read installedGatsbyVersion correctly for work…

    …spaces (#31196) (#31244)
    
    * Read Gatsby version correctly
    
    * Simplify logic
    
    Co-authored-by: Jarmo Isotalo <jamo@isotalo.fi>
    (cherry picked from commit af12b66)
    
    Co-authored-by: Sidhartha Chatterjee <me@sidharthachatterjee.com>
    GatsbyJS Bot and sidharthachatterjee authored May 4, 2021
    Copy the full SHA
    f0ef523 View commit details
  5. chore(release): Publish

     - gatsby-admin@0.14.1
     - gatsby-cli@3.4.1
     - gatsby-plugin-netlify-cms@5.4.1
     - gatsby-plugin-page-creator@3.4.1
     - gatsby-plugin-sharp@3.4.1
     - gatsby-recipes@0.15.1
     - gatsby-source-wordpress@5.4.1
     - gatsby-telemetry@2.4.1
     - gatsby-transformer-sqip@3.4.1
     - gatsby@3.4.1
    vladar committed May 4, 2021
    Copy the full SHA
    c583e74 View commit details
Showing with 301 additions and 308 deletions.
  1. +11 −8 .circleci/config.yml
  2. +1 −0 e2e-tests/contentful/package.json
  3. +2 −1 e2e-tests/gatsby-static-image/package.json
  4. +2 −0 e2e-tests/production-runtime/package.json
  5. +5 −5 integration-tests/artifacts/__tests__/index.js
  6. +2 −3 integration-tests/artifacts/package.json
  7. +6 −7 integration-tests/cache-resilience/__tests__/cache.js
  8. +3 −3 integration-tests/cache-resilience/package.json
  9. +4 −0 integration-tests/functions/jest-transformer.js
  10. +1 −1 integration-tests/functions/jest.config.js
  11. +9 −6 integration-tests/functions/package.json
  12. +4 −0 integration-tests/gatsby-cli/jest-transformer.js
  13. +0 −42 integration-tests/gatsby-cli/jest.boot.js
  14. +3 −15 integration-tests/gatsby-cli/jest.config.js
  15. +9 −2 integration-tests/gatsby-cli/package.json
  16. +6 −5 integration-tests/gatsby-cli/test-helpers/invoke-cli.js
  17. +5 −1 integration-tests/gatsby-pipeline/__tests__/lazy-image-build/develop.js
  18. +1 −0 integration-tests/gatsby-pipeline/gatsby-config.js
  19. +8 −0 integration-tests/gatsby-pipeline/jest.config.js
  20. +9 −7 integration-tests/gatsby-pipeline/package.json
  21. +1 −1 integration-tests/gatsby-pipeline/src/components/seo.js
  22. +2 −4 integration-tests/gatsby-pipeline/utils/create-devserver.js
  23. +6 −3 integration-tests/gatsby-source-wordpress/package.json
  24. +4 −4 integration-tests/gatsby-source-wordpress/test-fns/test-utils/get-gatsby-process.js
  25. +4 −0 integration-tests/images/jest-transformer.js
  26. +6 −0 integration-tests/images/jest.config.js
  27. +4 −3 integration-tests/images/package.json
  28. +0 −20 integration-tests/jest.config.js
  29. +3 −0 integration-tests/long-term-caching/jest.config.js
  30. +3 −4 integration-tests/long-term-caching/package.json
  31. +0 −6 integration-tests/ssr/jest.config.js
  32. +1 −2 integration-tests/ssr/package.json
  33. +1 −7 integration-tests/structured-logging/__tests__/ipc-send.js
  34. +1 −7 integration-tests/structured-logging/__tests__/logs.js
  35. +1 −7 integration-tests/structured-logging/__tests__/panic.js
  36. +5 −11 integration-tests/structured-logging/__tests__/plugin-errors.js
  37. +1 −7 integration-tests/structured-logging/__tests__/status.js
  38. +19 −10 integration-tests/structured-logging/__tests__/to-do.js
  39. +29 −41 integration-tests/structured-logging/__tests__/validate-options.js
  40. +3 −3 integration-tests/structured-logging/package.json
  41. +0 −7 jest-transformer.js
  42. +4 −0 packages/gatsby-admin/CHANGELOG.md
  43. +2 −2 packages/gatsby-admin/package.json
  44. +4 −0 packages/gatsby-cli/CHANGELOG.md
  45. +3 −3 packages/gatsby-cli/package.json
  46. +6 −0 packages/gatsby-plugin-gatsby-cloud/CHANGELOG.md
  47. +1 −1 packages/gatsby-plugin-gatsby-cloud/package.json
  48. +7 −3 packages/gatsby-plugin-gatsby-cloud/src/copy-functions-manifest.js
  49. +1 −1 packages/gatsby-plugin-gatsby-cloud/src/gatsby-node.js
  50. +4 −0 packages/gatsby-plugin-netlify-cms/CHANGELOG.md
  51. +2 −2 packages/gatsby-plugin-netlify-cms/package.json
  52. +4 −0 packages/gatsby-plugin-page-creator/CHANGELOG.md
  53. +2 −2 packages/gatsby-plugin-page-creator/package.json
  54. +4 −0 packages/gatsby-plugin-sharp/CHANGELOG.md
  55. +2 −2 packages/gatsby-plugin-sharp/package.json
  56. +4 −0 packages/gatsby-recipes/CHANGELOG.md
  57. +2 −2 packages/gatsby-recipes/package.json
  58. +6 −0 packages/gatsby-source-wordpress/CHANGELOG.md
  59. +1 −1 packages/gatsby-source-wordpress/package.json
  60. +1 −2 packages/gatsby-source-wordpress/src/steps/source-nodes/update-nodes/wp-actions/update.js
  61. +6 −0 packages/gatsby-telemetry/CHANGELOG.md
  62. +1 −1 packages/gatsby-telemetry/package.json
  63. +3 −7 packages/gatsby-telemetry/src/telemetry.ts
  64. +4 −0 packages/gatsby-transformer-sqip/CHANGELOG.md
  65. +2 −2 packages/gatsby-transformer-sqip/package.json
  66. +4 −0 packages/gatsby/CHANGELOG.md
  67. +5 −5 packages/gatsby/package.json
  68. +10 −2 scripts/cypress-run-with-conditional-record-flag.js
  69. +17 −4 scripts/e2e-test.sh
  70. +4 −13 yarn.lock
19 changes: 11 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@ commands:
default: false
trigger_pattern:
type: string
default: "packages/*|.circleci/*"
default: "packages/*|.circleci/*|scripts/e2e-test.sh"
test_path:
type: string
test_command:
@@ -168,6 +168,9 @@ commands:
- run: ./scripts/assert-changed-files.sh "<< parameters.trigger_pattern >>|<< parameters.test_path >>/*"

- <<: *attach_to_bootstrap
- run:
name: Install gatsby-dev
command: yarn global add gatsby-dev-cli
- run:
name: Run tests (using defaults)
command: ./scripts/e2e-test.sh "<< parameters.test_path >>" "<< parameters.test_command >>"
@@ -179,7 +182,7 @@ jobs:
executor: node
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*|yarn.lock"
- run: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*|scripts/e2e-test.sh|yarn.lock"
- <<: *restore_cache
- <<: *install_node_modules
- <<: *check_lockfile
@@ -256,7 +259,7 @@ jobs:
steps:
- e2e-test:
test_path: integration-tests/gatsby-cli
trigger_pattern: packages/gatsby-cli/*|packages/gatsby/*|integration-tests/gatsby-cli/*
trigger_pattern: packages/gatsby-cli/*|packages/gatsby/*|integration-tests/gatsby-cli/*|scripts/e2e-test.sh

integration_tests_structured_logging:
executor: node
@@ -369,8 +372,8 @@ jobs:
CYPRESS_RECORD_KEY: 3fb49000-4143-4bd8-9ab4-219389060910
steps:
- e2e-test:
test_path: e2e-tests/themes/development-runtime
test_command: yarn test
test_path: e2e-tests/themes
test_command: cd development-runtime; yarn test

themes_e2e_tests_production_runtime:
<<: *e2e-executor
@@ -379,8 +382,8 @@ jobs:
CYPRESS_RECORD_KEY: e4e7b3b8-e1e7-4a74-a0c9-9ac76585236b
steps:
- e2e-test:
test_path: e2e-tests/themes/production-runtime
test_command: yarn test
test_path: e2e-tests/themes
test_command: cd production-runtime; yarn test

mdx_e2e_tests:
<<: *e2e-executor
@@ -482,7 +485,7 @@ jobs:
steps:
- checkout
- run:
command: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*|yarn.lock"
command: ./scripts/assert-changed-files.sh "packages/*|(e2e|integration)-tests/*|.circleci/*|scripts/e2e-test.sh|yarn.lock"
shell: bash.exe
# Restoring cache takes as long as installing node modules, so skipping
# - restore_cache:
1 change: 1 addition & 0 deletions e2e-tests/contentful/package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
"gatsby-plugin-sharp": "^3.1.2",
"gatsby-source-contentful": "^5.1.1",
"gatsby-transformer-remark": "^3.2.0",
"gatsby-transformer-sharp": "^3.3.0",
"gatsby-transformer-sqip": "3.1.1",
"modern-normalize": "^1.0.0",
"prop-types": "^15.7.2",
3 changes: 2 additions & 1 deletion e2e-tests/gatsby-static-image/package.json
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
"gatsby": "^2.0.118",
"gatsby-plugin-image": "^0.0.2",
"gatsby-plugin-sharp": "^2.0.20",
"gatsby-source-filesystem": "^3.3.0",
"react": "^16.9.0",
"react-dom": "^16.9.0"
},
@@ -36,4 +37,4 @@
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
}
}
}
2 changes: 2 additions & 0 deletions e2e-tests/production-runtime/package.json
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
"babel-plugin-search-and-replace": "^1.1.0",
"cypress": "^6.5.0",
"gatsby": "^3.0.0-next.6",
"gatsby-cypress": "^1.3.0",
"gatsby-plugin-image": "^1.0.0-next.5",
"gatsby-plugin-less": "^5.1.0-next.2",
"gatsby-plugin-manifest": "^3.0.0-next.0",
@@ -15,6 +16,7 @@
"gatsby-plugin-sass": "^4.1.0-next.2",
"gatsby-plugin-sharp": "^3.0.0-next.5",
"gatsby-plugin-stylus": "^3.1.0-next.2",
"gatsby-source-filesystem": "^3.3.0",
"gatsby-seo": "^0.1.0",
"glob": "^7.1.3",
"react": "^16.9.0",
10 changes: 5 additions & 5 deletions integration-tests/artifacts/__tests__/index.js
Original file line number Diff line number Diff line change
@@ -9,16 +9,16 @@ jest.setTimeout(100000)

const publicDir = path.join(process.cwd(), `public`)

const gatsbyBin = path.join(`node_modules`, `.bin`, `gatsby`)
const gatsbyBin = path.join(`node_modules`, `gatsby`, `cli.js`)

const manifest = {}
const filesToRevert = {}

function runGatsbyWithRunTestSetup(runNumber = 1) {
return function beforeAllImpl() {
return new Promise(resolve => {
const gatsbyProcess = spawn(gatsbyBin, [`build`], {
stdio: [`inherit`, `inherit`, `inherit`, `inherit`],
const gatsbyProcess = spawn(process.execPath, [gatsbyBin, `build`], {
stdio: [`inherit`, `inherit`, `inherit`],
env: {
...process.env,
NODE_ENV: `production`,
@@ -331,8 +331,8 @@ function assertNodeCorrectness(runNumber) {
beforeAll(done => {
fs.removeSync(path.join(__dirname, `__debug__`))

const gatsbyCleanProcess = spawn(gatsbyBin, [`clean`], {
stdio: [`inherit`, `inherit`, `inherit`, `inherit`],
const gatsbyCleanProcess = spawn(process.execPath, [gatsbyBin, `clean`], {
stdio: [`inherit`, `inherit`, `inherit`],
env: {
...process.env,
NODE_ENV: `production`,
5 changes: 2 additions & 3 deletions integration-tests/artifacts/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"develop": "gatsby develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "jest --config=jest.config.js --runInBand"
"test": "jest --runInBand"
},
"dependencies": {
"gatsby": "^3.0.0-next.0",
@@ -19,8 +19,7 @@
},
"devDependencies": {
"fs-extra": "^9.0.0",
"jest": "^24.0.0",
"jest-cli": "^24.0.0"
"jest": "^24.0.0"
},
"repository": {
"type": "git",
13 changes: 6 additions & 7 deletions integration-tests/cache-resilience/__tests__/cache.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fs = require(`fs-extra`)
const { spawnSync } = require(`child_process`)
const path = require(`path`)
const os = require(`os`)
const _ = require(`lodash`)
const {
ON_PRE_BOOTSTRAP_FILE_PATH,
@@ -30,13 +31,7 @@ const getDiskCacheSnapshotSubStateByPlugins = (state, pluginNamesArray) =>

jest.setTimeout(100000)

const gatsbyBin = path.join(
`node_modules`,
`gatsby`,
`dist`,
`bin`,
`gatsby.js`
)
const gatsbyBin = path.join(`node_modules`, `gatsby`, `cli.js`)

const { compareState } = require(`../utils/nodes-diff`)

@@ -380,6 +375,10 @@ describe(`Some plugins changed between gatsby runs`, () => {

describe(`Query results`, () => {
const getQueryResultTestArgs = scenarioName => {
if (os.platform() === "win32") {
scenarioName = scenarioName.replace("/", "\\")
}

const result = {
dataFirstRun: states.queryResults.firstRun[scenarioName].data,
dataSecondRun: states.queryResults.secondRun[scenarioName].data,
6 changes: 3 additions & 3 deletions integration-tests/cache-resilience/package.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"develop": "gatsby develop",
"prebuild": "node utils/prebuild.js",
"build": "gatsby build",
"test": "jest --verbose",
"test": "jest",
"serve": "gatsby serve",
"use-setup": "node utils/select-configuration",
"inspect-state": "node utils/inspect-state"
@@ -22,9 +22,9 @@
"fs-extra": "^9.0.1",
"glob": "^7.1.6",
"jest": "^24.0.0",
"jest-cli": "^24.0.0",
"jest-serializer-path": "^0.1.15",
"lodash": "^4.17.20",
"slash": "^3.0.0",
"snapshot-diff": "^0.6.1"
}
}
}
4 changes: 4 additions & 0 deletions integration-tests/functions/jest-transformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const babelPreset = require(`babel-preset-gatsby-package`)()
module.exports = require(`babel-jest`).createTransformer({
...babelPreset,
})
2 changes: 1 addition & 1 deletion integration-tests/functions/jest.config.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,6 @@ module.exports = {
],
watchPathIgnorePatterns: ["src/api", ".cache"],
transform: {
"^.+\\.[jt]sx?$": `<rootDir>../../jest-transformer.js`,
"^.+\\.[jt]sx?$": `./jest-transformer.js`,
},
}
15 changes: 9 additions & 6 deletions integration-tests/functions/package.json
Original file line number Diff line number Diff line change
@@ -4,27 +4,30 @@
"private": true,
"description": "functions",
"author": "Kyle Mathews",
"keywords": ["gatsby"],
"keywords": [
"gatsby"
],
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"serve": "gatsby serve",
"start-servers-and-test": "start-server-and-test servers '8000|9000' test:jest",
"start-servers-and-test": "start-server-and-test servers \"8000|9000\" test:jest",
"servers": "run-p develop serve",
"test:jest": "jest",
"test": "npm-run-all -s build start-servers-and-test"
},
"devDependencies": {
"babel-jest": "^24.0.0",
"babel-preset-gatsby-package": "^1.3.0",
"fs-extra": "^9.0.0",
"jest": "^24.0.0",
"jest-cli": "^24.0.0",
"npm-run-all": "4.1.5",
"start-server-and-test": "^1.11.3"
},
"dependencies": {
"gatsby": "3.4.0-next.2-dev-1618947033238",
"gatsby-plugin-gatsby-cloud": "latest",
"gatsby": "^3.5.0-next.0",
"gatsby-plugin-gatsby-cloud": "^2.5.0-next.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
}
4 changes: 4 additions & 0 deletions integration-tests/gatsby-cli/jest-transformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const babelPreset = require(`babel-preset-gatsby-package`)()
module.exports = require(`babel-jest`).createTransformer({
...babelPreset,
})
42 changes: 0 additions & 42 deletions integration-tests/gatsby-cli/jest.boot.js

This file was deleted.

18 changes: 3 additions & 15 deletions integration-tests/gatsby-cli/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
const fs = require(`fs`)
const path = require(`path`)
const os = require(`os`)
const baseConfig = require(`../jest.config.js`)

// install global gatsby-cli to tmp dir to simulate sandbox
const GLOBAL_GATSBY_CLI_LOCATION = (process.env.GLOBAL_GATSBY_CLI_LOCATION = fs.mkdtempSync(
path.join(os.tmpdir(), `gatsby-cli-`)
))

module.exports = {
...baseConfig,
globalSetup: "<rootDir>/integration-tests/gatsby-cli/jest.boot.js",
rootDir: `../../`,
globals: {
GLOBAL_GATSBY_CLI_LOCATION,
testPathIgnorePatterns: [`/node_modules/`, `__tests__/fixtures`, `.cache`],
transform: {
"^.+\\.[jt]sx?$": `./jest-transformer.js`,
},
}
11 changes: 9 additions & 2 deletions integration-tests/gatsby-cli/package.json
Original file line number Diff line number Diff line change
@@ -6,13 +6,20 @@
},
"license": "MIT",
"scripts": {
"test": "jest --config=./jest.config.js gatsby-cli/"
"test": "jest"
},
"devDependencies": {
"babel-jest": "^24.0.0",
"babel-preset-gatsby-package": "^1.3.0",
"del-cli": "^3.0.1",
"execa": "^4.0.1",
"fs-extra": "^9.0.0",
"jest": "^24.0.0"
"gatsby": "^3.3.0",
"gatsby-cli": "^3.3.0",
"gatsby-core-utils": "^2.3.0",
"jest": "^24.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"repository": {
"type": "git",
11 changes: 6 additions & 5 deletions integration-tests/gatsby-cli/test-helpers/invoke-cli.js
Original file line number Diff line number Diff line change
@@ -4,10 +4,11 @@ import strip from "strip-ansi"
import { createLogsMatcher } from "./matcher"

const gatsbyBinLocation = join(
GLOBAL_GATSBY_CLI_LOCATION,
__dirname,
"..",
`node_modules`,
`.bin`,
`gatsby`
`gatsby-cli`,
`cli.js`
)

// Use as `GatsbyCLI.cwd('execution-folder').invoke('new', 'foo')`
@@ -17,7 +18,7 @@ export const GatsbyCLI = {
invoke(args) {
const NODE_ENV = args[0] === `develop` ? `development` : `production`
try {
const results = sync(gatsbyBinLocation, [].concat(args), {
const results = sync("node", [gatsbyBinLocation].concat(args), {
cwd: join(__dirname, `../`, `./${relativeCwd}`),
env: { NODE_ENV, CI: 1, GATSBY_LOGGER: `ink` },
})
@@ -36,7 +37,7 @@ export const GatsbyCLI = {

invokeAsync: (args, onExit) => {
const NODE_ENV = args[0] === `develop` ? `development` : `production`
const res = execa(gatsbyBinLocation, [].concat(args), {
const res = execa("node", [gatsbyBinLocation].concat(args), {
cwd: join(__dirname, `../`, `./${relativeCwd}`),
env: { NODE_ENV, CI: 1, GATSBY_LOGGER: `ink` },
})
Loading