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: ab793c3f0eee95eee3017585d63beb4b83492cd1
Choose a base ref
...
head repository: gatsbyjs/gatsby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5e72a5d1fab1f312685a533f25a637fbbbefb518
Choose a head ref
  • 8 commits
  • 172 files changed
  • 8 contributors

Commits on Nov 23, 2022

  1. fix(gatsby-source-wordpress) pass store for auth (#37006) (#37083)

    Co-authored-by: Ward Peeters <ward@coding-tech.com>
    Co-authored-by: Sophie McGarity <48594165+sophiemcgarity@users.noreply.github.com>
    3 people authored Nov 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1f92e69 View commit details
  2. feat(gatsby-source-wordpress): MediaItem.excludeFieldNames / auto exc…

    …lude interface types that have no fields (#37062) (#37085)
    
    Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
    LekoArts and TylerBarnes authored Nov 23, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2bc5902 View commit details
  3. feat(gatsby-source-drupal): Provide proxyUrl in addition to baseUrl t…

    …o allow using CDN, API gateway, etc. (#36819) (#37084)
    
    Co-authored-by: Tomáš Fülöpp <tomi@vacilando.org>
    gatsbybot and Vacilando authored Nov 23, 2022

    Verified

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

     - gatsby-source-drupal@5.25.1
     - gatsby-source-wordpress@6.24.1
    marvinjude committed Nov 23, 2022
    Copy the full SHA
    49cca44 View commit details

Commits on Dec 6, 2022

  1. fix(gatsby-source-wordpress): WPGraphQL 1.13.0 compatibility (#37134) (

    …#37183)
    
    * fix(gatsby-source-wordpress): WPGraphQL 1.13.0 compatibility (#37134)
    
    (cherry picked from commit dd52a14)
    
    * v4 starters
    
    * v4 assertion
    
    Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
    Co-authored-by: pieh <misiek.piechowiak@gmail.com>
    3 people authored Dec 6, 2022

    Verified

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

     - gatsby-source-wordpress@6.24.2
    pieh committed Dec 6, 2022
    Copy the full SHA
    07c0478 View commit details
  3. chore: remove tracedSVG (#37093) (#37127)

    * init
    
    * gri
    
    * update shopify snapshot
    
    * gatsby-plugin-sharp tests
    
    * update gatsby-remark-images/gatsby-node tests
    
    * update gatsby-plugin-image tests
    
    * update schema print tests
    
    * remove traceSVG unit tests as it was removed
    
    * legacy gatsby-image fields
    
    * update polyfill tests
    
    * update cypress assertion
    
    * update contentful cypress assertions
    
    * drop few more packages from gatsby-plugin-sharp as they are no onger used
    
    * correct IMAGE_CDN fallback for TRACE_SVG
    
    * update generateImageData
    
    * update e2e-prod/assertions
    
    * update unit test
    
    * update snapshot
    
    * update e2e-dev/assertions
    
    * drop more unused
    
    * sync yarn.lock
    
    * a bit more prod warnings
    
    * adjust gatsby-remark-images plugin options warning
    
    * add link to gatsby-remark-images warning
    
    (cherry picked from commit 94c2d73)
    
    Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
    gatsbybot and pieh authored Dec 6, 2022

    Verified

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

Commits on Dec 7, 2022

  1. chore(release): Publish

     - babel-plugin-remove-graphql-queries@4.25.0
     - babel-preset-gatsby-package@2.25.0
     - babel-preset-gatsby@2.25.0
     - create-gatsby@2.25.0
     - gatsby-cli@4.25.0
     - gatsby-codemods@3.25.0
     - gatsby-core-utils@3.25.0
     - gatsby-cypress@2.25.0
     - gatsby-design-tokens@4.25.0
     - gatsby-dev-cli@4.25.0
     - gatsby-graphiql-explorer@2.25.0
     - gatsby-legacy-polyfills@2.25.0
     - gatsby-link@4.25.0
     - gatsby-page-utils@2.25.0
     - gatsby-parcel-config@0.16.0
     - @gatsbyjs/parcel-namer-relative-to-cwd@1.10.0
     - gatsby-plugin-benchmark-reporting@2.25.0
     - gatsby-plugin-canonical-urls@4.25.0
     - gatsby-plugin-catch-links@4.25.0
     - gatsby-plugin-coffeescript@4.25.0
     - gatsby-plugin-cxs@4.25.0
     - gatsby-plugin-emotion@7.25.0
     - gatsby-plugin-facebook-analytics@4.25.0
     - gatsby-plugin-feed@4.25.0
     - gatsby-plugin-flow@3.25.0
     - gatsby-plugin-fullstory@4.25.0
     - gatsby-plugin-gatsby-cloud@4.25.0
     - gatsby-plugin-google-analytics@4.25.0
     - gatsby-plugin-google-gtag@4.25.0
     - gatsby-plugin-google-tagmanager@4.25.0
     - gatsby-plugin-image@2.25.0
     - gatsby-plugin-jss@4.25.0
     - gatsby-plugin-layout@3.25.0
     - gatsby-plugin-less@6.25.0
     - gatsby-plugin-lodash@5.25.0
     - gatsby-plugin-manifest@4.25.0
     - gatsby-plugin-mdx@4.4.0
     - gatsby-plugin-netlify-cms@6.25.0
     - gatsby-plugin-no-sourcemaps@4.25.0
     - gatsby-plugin-nprogress@4.25.0
     - gatsby-plugin-offline@5.25.0
     - gatsby-plugin-page-creator@4.25.0
     - gatsby-plugin-postcss@5.25.0
     - gatsby-plugin-preact@6.25.0
     - gatsby-plugin-preload-fonts@3.25.0
     - gatsby-plugin-react-css-modules@4.25.0
     - gatsby-plugin-react-helmet@5.25.0
     - gatsby-plugin-sass@5.25.0
     - gatsby-plugin-schema-snapshot@3.25.0
     - gatsby-plugin-sharp@4.25.0
     - gatsby-plugin-sitemap@5.25.0
     - gatsby-plugin-styled-components@5.25.0
     - gatsby-plugin-styled-jsx@5.25.0
     - gatsby-plugin-styletron@7.25.0
     - gatsby-plugin-stylus@4.25.0
     - gatsby-plugin-subfont@4.25.0
     - gatsby-plugin-twitter@4.25.0
     - gatsby-plugin-typescript@4.25.0
     - gatsby-plugin-typography@4.25.0
     - gatsby-plugin-utils@3.19.0
     - gatsby-react-router-scroll@5.25.0
     - gatsby-remark-autolink-headers@5.25.0
     - gatsby-remark-code-repls@6.25.0
     - gatsby-remark-copy-linked-files@5.25.0
     - gatsby-remark-custom-blocks@4.25.0
     - gatsby-remark-embed-snippet@7.25.0
     - gatsby-remark-graphviz@4.25.0
     - gatsby-remark-images-contentful@5.25.0
     - gatsby-remark-images@6.25.0
     - gatsby-remark-katex@6.25.0
     - gatsby-remark-prismjs@6.25.0
     - gatsby-remark-responsive-iframe@5.25.0
     - gatsby-remark-smartypants@5.25.0
     - gatsby-script@1.10.0
     - gatsby-sharp@0.19.0
     - gatsby-source-contentful@7.23.0
     - gatsby-source-drupal@5.26.0
     - gatsby-source-faker@4.25.0
     - gatsby-source-filesystem@4.25.0
     - gatsby-source-graphql@4.25.0
     - gatsby-source-hacker-news@4.25.0
     - gatsby-source-lever@4.25.0
     - gatsby-source-medium@4.25.0
     - gatsby-source-mongodb@4.25.0
     - gatsby-source-npm-package-search@4.25.0
     - gatsby-source-shopify@7.14.0
     - gatsby-source-wikipedia@4.25.0
     - gatsby-source-wordpress@6.25.0
     - gatsby-telemetry@3.25.0
     - gatsby-transformer-asciidoc@3.25.0
     - gatsby-transformer-csv@4.25.0
     - gatsby-transformer-documentationjs@6.25.0
     - gatsby-transformer-excel@4.25.0
     - gatsby-transformer-hjson@4.25.0
     - gatsby-transformer-javascript-frontmatter@4.25.0
     - gatsby-transformer-javascript-static-exports@4.25.0
     - gatsby-transformer-json@4.25.0
     - gatsby-transformer-pdf@3.25.0
     - gatsby-transformer-react-docgen@7.25.0
     - gatsby-transformer-remark@5.25.0
     - gatsby-transformer-screenshot@4.25.0
     - gatsby-transformer-sharp@4.25.0
     - gatsby-transformer-sqip@4.25.0
     - gatsby-transformer-toml@4.25.0
     - gatsby-transformer-xml@4.25.0
     - gatsby-transformer-yaml@4.25.0
     - gatsby-worker@1.25.0
     - gatsby@4.25.0
    pieh committed Dec 7, 2022
    Copy the full SHA
    5e72a5d View commit details
Showing with 1,440 additions and 1,523 deletions.
  1. +1 −1 e2e-tests/contentful/cypress/integration/gatsby-plugin-image.js
  2. BIN e2e-tests/contentful/cypress/snapshots/gatsby-plugin-image.js/english-0.snap.png
  3. +1 −1 e2e-tests/contentful/snapshots.js
  4. +3 −1 e2e-tests/contentful/src/pages/gatsby-plugin-image.js
  5. +3 −2 e2e-tests/development-runtime/cypress/integration/remote-file/gatsby-plugin-image.js
  6. +7 −5 e2e-tests/development-runtime/cypress/integration/static-image/traced.js
  7. +125 −121 e2e-tests/production-runtime/cypress/integration/remote-file.js
  8. +7 −5 e2e-tests/production-runtime/cypress/integration/static-image/traced.js
  9. +1 −0 examples/using-contentful/package.json
  10. +6 −2 integration-tests/gatsby-cli/__tests__/new.js
  11. +53 −39 integration-tests/gatsby-source-wordpress/__tests__/__snapshots__/index.js.snap
  12. +40 −0 integration-tests/gatsby-source-wordpress/__tests__/index.js
  13. +1 −0 integration-tests/gatsby-source-wordpress/gatsby-config.js
  14. +0 −2 integration-tests/gatsby-source-wordpress/test-fns/test-utils/queries.js
  15. +3 −3 packages/babel-plugin-remove-graphql-queries/package.json
  16. +1 −1 packages/babel-preset-gatsby-package/package.json
  17. +4 −4 packages/babel-preset-gatsby/package.json
  18. +2 −2 packages/create-gatsby/package.json
  19. +5 −5 packages/gatsby-cli/package.json
  20. +2 −2 packages/gatsby-codemods/package.json
  21. +2 −2 packages/gatsby-core-utils/package.json
  22. +2 −2 packages/gatsby-cypress/package.json
  23. +1 −1 packages/gatsby-design-tokens/package.json
  24. +2 −2 packages/gatsby-dev-cli/package.json
  25. +2 −2 packages/gatsby-graphiql-explorer/package.json
  26. +1 −1 packages/gatsby-legacy-polyfills/package.json
  27. +2 −2 packages/gatsby-link/package.json
  28. +3 −3 packages/gatsby-page-utils/package.json
  29. +2 −2 packages/gatsby-parcel-config/package.json
  30. +3 −3 packages/gatsby-parcel-namer-relative-to-cwd/package.json
  31. +3 −3 packages/gatsby-plugin-benchmark-reporting/package.json
  32. +2 −2 packages/gatsby-plugin-canonical-urls/package.json
  33. +2 −2 packages/gatsby-plugin-catch-links/package.json
  34. +2 −2 packages/gatsby-plugin-coffeescript/package.json
  35. +3 −3 packages/gatsby-plugin-cxs/package.json
  36. +2 −2 packages/gatsby-plugin-emotion/package.json
  37. +2 −2 packages/gatsby-plugin-facebook-analytics/package.json
  38. +3 −3 packages/gatsby-plugin-feed/package.json
  39. +3 −3 packages/gatsby-plugin-flow/package.json
  40. +2 −2 packages/gatsby-plugin-fullstory/package.json
  41. +4 −4 packages/gatsby-plugin-gatsby-cloud/package.json
  42. +2 −2 packages/gatsby-plugin-google-analytics/package.json
  43. +2 −2 packages/gatsby-plugin-google-gtag/package.json
  44. +3 −3 packages/gatsby-plugin-google-tagmanager/package.json
  45. +4 −4 packages/gatsby-plugin-image/package.json
  46. +3 −3 packages/gatsby-plugin-image/src/resolver-utils.ts
  47. +2 −2 packages/gatsby-plugin-jss/package.json
  48. +2 −2 packages/gatsby-plugin-layout/package.json
  49. +2 −2 packages/gatsby-plugin-less/package.json
  50. +2 −2 packages/gatsby-plugin-lodash/package.json
  51. +4 −4 packages/gatsby-plugin-manifest/package.json
  52. +4 −4 packages/gatsby-plugin-mdx/package.json
  53. +2 −2 packages/gatsby-plugin-netlify-cms/package.json
  54. +1 −1 packages/gatsby-plugin-no-sourcemaps/package.json
  55. +2 −2 packages/gatsby-plugin-nprogress/package.json
  56. +4 −4 packages/gatsby-plugin-offline/package.json
  57. +6 −6 packages/gatsby-plugin-page-creator/package.json
  58. +2 −2 packages/gatsby-plugin-postcss/package.json
  59. +2 −2 packages/gatsby-plugin-preact/package.json
  60. +3 −3 packages/gatsby-plugin-preload-fonts/package.json
  61. +2 −2 packages/gatsby-plugin-react-css-modules/package.json
  62. +2 −2 packages/gatsby-plugin-react-helmet/package.json
  63. +3 −3 packages/gatsby-plugin-sass/package.json
  64. +1 −1 packages/gatsby-plugin-schema-snapshot/package.json
  65. +6 −9 packages/gatsby-plugin-sharp/package.json
  66. +4 −4 packages/gatsby-plugin-sharp/src/__tests__/__snapshots__/index.js.snap
  67. +9 −3 packages/gatsby-plugin-sharp/src/__tests__/index.js
  68. +0 −270 packages/gatsby-plugin-sharp/src/__tests__/trace-svg.js
  69. +12 −1 packages/gatsby-plugin-sharp/src/image-data.ts
  70. +44 −28 packages/gatsby-plugin-sharp/src/index.js
  71. +0 −187 packages/gatsby-plugin-sharp/src/trace-svg.js
  72. +3 −3 packages/gatsby-plugin-sitemap/package.json
  73. +2 −2 packages/gatsby-plugin-styled-components/package.json
  74. +2 −2 packages/gatsby-plugin-styled-jsx/package.json
  75. +2 −2 packages/gatsby-plugin-styletron/package.json
  76. +2 −2 packages/gatsby-plugin-stylus/package.json
  77. +2 −2 packages/gatsby-plugin-subfont/package.json
  78. +3 −3 packages/gatsby-plugin-twitter/package.json
  79. +3 −3 packages/gatsby-plugin-typescript/package.json
  80. +2 −2 packages/gatsby-plugin-typography/package.json
  81. +5 −8 packages/gatsby-plugin-utils/package.json
  82. +6 −6 packages/gatsby-plugin-utils/src/polyfill-remote-file/__tests__/gatsby-image-resolver.ts
  83. +12 −3 packages/gatsby-plugin-utils/src/polyfill-remote-file/graphql/gatsby-image-resolver.ts
  84. +14 −70 packages/gatsby-plugin-utils/src/polyfill-remote-file/placeholder-handler.ts
  85. +2 −2 packages/gatsby-react-router-scroll/package.json
  86. +3 −3 packages/gatsby-remark-autolink-headers/package.json
  87. +2 −2 packages/gatsby-remark-code-repls/package.json
  88. +2 −2 packages/gatsby-remark-copy-linked-files/package.json
  89. +2 −2 packages/gatsby-remark-custom-blocks/package.json
  90. +2 −2 packages/gatsby-remark-embed-snippet/package.json
  91. +2 −2 packages/gatsby-remark-graphviz/package.json
  92. +2 −2 packages/gatsby-remark-images-contentful/package.json
  93. +4 −5 packages/gatsby-remark-images/package.json
  94. +31 −31 packages/gatsby-remark-images/src/__tests__/__snapshots__/index.js.snap
  95. +113 −57 packages/gatsby-remark-images/src/__tests__/gatsby-node.js
  96. +2 −12 packages/gatsby-remark-images/src/__tests__/index.js
  97. +17 −15 packages/gatsby-remark-images/src/gatsby-node.js
  98. +1 −26 packages/gatsby-remark-images/src/index.js
  99. +2 −2 packages/gatsby-remark-katex/package.json
  100. +2 −2 packages/gatsby-remark-prismjs/package.json
  101. +2 −2 packages/gatsby-remark-responsive-iframe/package.json
  102. +2 −2 packages/gatsby-remark-smartypants/package.json
  103. +1 −1 packages/gatsby-script/package.json
  104. +1 −1 packages/gatsby-sharp/package.json
  105. +5 −5 packages/gatsby-source-contentful/package.json
  106. +4 −10 packages/gatsby-source-contentful/src/__tests__/__snapshots__/gatsby-plugin-image.js.snap
  107. +6 −7 packages/gatsby-source-contentful/src/__tests__/gatsby-plugin-image.js
  108. +12 −5 packages/gatsby-source-contentful/src/gatsby-plugin-image.js
  109. +23 −0 packages/gatsby-source-drupal/README.md
  110. +4 −4 packages/gatsby-source-drupal/package.json
  111. +41 −1 packages/gatsby-source-drupal/src/__tests__/index.js
  112. +9 −0 packages/gatsby-source-drupal/src/gatsby-node.js
  113. +2 −2 packages/gatsby-source-faker/package.json
  114. +3 −3 packages/gatsby-source-filesystem/package.json
  115. +3 −3 packages/gatsby-source-graphql/package.json
  116. +2 −2 packages/gatsby-source-hacker-news/package.json
  117. +2 −2 packages/gatsby-source-lever/package.json
  118. +2 −2 packages/gatsby-source-medium/package.json
  119. +2 −2 packages/gatsby-source-mongodb/package.json
  120. +2 −2 packages/gatsby-source-npm-package-search/package.json
  121. +6 −6 packages/gatsby-source-shopify/__tests__/__snapshots__/create-resolvers.ts.snap
  122. +5 −5 packages/gatsby-source-shopify/package.json
  123. +2 −2 packages/gatsby-source-wikipedia/package.json
  124. +21 −0 packages/gatsby-source-wordpress/docs/plugin-options.md
  125. +8 −8 packages/gatsby-source-wordpress/package.json
  126. +2 −2 packages/gatsby-source-wordpress/src/models/remoteSchema.ts
  127. +15 −67 packages/gatsby-source-wordpress/src/steps/create-schema-customization/build-types.js
  128. +169 −23 packages/gatsby-source-wordpress/src/steps/create-schema-customization/helpers.js
  129. +9 −6 packages/gatsby-source-wordpress/src/steps/create-schema-customization/index.js
  130. +3 −3 ...atsby-source-wordpress/src/steps/create-schema-customization/transform-fields/default-resolver.js
  131. +37 −14 ...sby-source-wordpress/src/steps/create-schema-customization/transform-fields/field-transformers.js
  132. +25 −20 packages/gatsby-source-wordpress/src/steps/create-schema-customization/transform-fields/index.js
  133. +6 −4 ...atsby-source-wordpress/src/steps/create-schema-customization/transform-fields/transform-object.js
  134. +3 −2 ...gatsby-source-wordpress/src/steps/create-schema-customization/transform-fields/transform-union.js
  135. +0 −14 packages/gatsby-source-wordpress/src/steps/create-schema-customization/type-filters.js
  136. +14 −0 packages/gatsby-source-wordpress/src/steps/declare-plugin-options-schema.js
  137. +1 −1 ...e-wordpress/src/steps/ingest-remote-schema/build-queries-from-introspection/build-node-queries.js
  138. +2 −2 ...ress/src/steps/ingest-remote-schema/build-queries-from-introspection/build-query-on-field-name.js
  139. +10 −1 ...s/ingest-remote-schema/build-queries-from-introspection/generate-queries-from-ingestable-types.js
  140. +24 −37 ...s/src/steps/ingest-remote-schema/build-queries-from-introspection/recursively-transform-fields.js
  141. +60 −31 ...ges/gatsby-source-wordpress/src/steps/ingest-remote-schema/identify-and-store-ingestable-types.js
  142. +21 −10 packages/gatsby-source-wordpress/src/steps/ingest-remote-schema/is-excluded.js
  143. +9 −1 packages/gatsby-source-wordpress/src/steps/ingest-remote-schema/write-queries-to-disk.js
  144. +1 −0 packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/create-local-file-node.js
  145. +2 −1 packages/gatsby-source-wordpress/src/steps/source-nodes/create-nodes/process-node.js
  146. +22 −1 packages/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes.js
  147. +10 −1 packages/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-referenced-media-items.js
  148. +2 −1 packages/gatsby-source-wordpress/src/steps/source-nodes/helpers.js
  149. +3 −3 packages/gatsby-telemetry/package.json
  150. +2 −2 packages/gatsby-transformer-asciidoc/package.json
  151. +2 −2 packages/gatsby-transformer-csv/package.json
  152. +2 −2 packages/gatsby-transformer-documentationjs/package.json
  153. +2 −2 packages/gatsby-transformer-excel/package.json
  154. +2 −2 packages/gatsby-transformer-hjson/package.json
  155. +2 −2 packages/gatsby-transformer-javascript-frontmatter/package.json
  156. +2 −2 packages/gatsby-transformer-javascript-static-exports/package.json
  157. +2 −2 packages/gatsby-transformer-json/package.json
  158. +2 −2 packages/gatsby-transformer-pdf/package.json
  159. +2 −2 packages/gatsby-transformer-react-docgen/package.json
  160. +4 −4 packages/gatsby-transformer-remark/package.json
  161. +2 −2 packages/gatsby-transformer-screenshot/package.json
  162. +3 −4 packages/gatsby-transformer-sharp/package.json
  163. +49 −30 packages/gatsby-transformer-sharp/src/customize-schema.js
  164. +6 −7 packages/gatsby-transformer-sharp/src/types.ts
  165. +4 −4 packages/gatsby-transformer-sqip/package.json
  166. +2 −2 packages/gatsby-transformer-toml/package.json
  167. +2 −2 packages/gatsby-transformer-xml/package.json
  168. +2 −2 packages/gatsby-transformer-yaml/package.json
  169. +2 −2 packages/gatsby-worker/package.json
  170. +19 −19 packages/gatsby/package.json
  171. +9 −9 packages/gatsby/src/schema/__tests__/__snapshots__/print.js.snap
  172. +1 −13 yarn.lock
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ describe(`gatsby-plugin-image`, () => {
testGatsbyPluginImage(`dominant-color`, hasColorPlaceholder)
)
it(`traced`, testConfig, () =>
testGatsbyPluginImage(`traced`, hasSVGPlaceholder)
testGatsbyPluginImage(`traced`, hasColorPlaceholder)
)
it(`blurred`, testConfig, () =>
testGatsbyPluginImage(`blurred`, hasBase64Placeholder)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion e2e-tests/contentful/snapshots.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion e2e-tests/contentful/src/pages/gatsby-plugin-image.js
Original file line number Diff line number Diff line change
@@ -94,7 +94,9 @@ const GatsbyPluginImagePage = ({ data }) => {
))}
</Grid>

<h2>gatsby-plugin-image: Traced SVG Placeholder</h2>
<h2>
gatsby-plugin-image: Traced SVG Placeholder (fallback to DOMINANT_COLOR)
</h2>
<Grid data-cy="traced">
{data.default.nodes.map(node => (
<div key={node.title}>
Original file line number Diff line number Diff line change
@@ -126,8 +126,9 @@ describe(`remote-file`, () => {
cy.get(".constrained_traced [data-placeholder-image]")
.first()
.should($el => {
expect($el.prop("tagName")).to.be.equal("IMG")
expect($el.prop("src")).to.contain("data:image/svg+xml,%3csvg")
// traced falls back to DOMINANT_COLOR
expect($el.prop("tagName")).to.be.equal("DIV")
expect($el).to.be.empty
})
cy.get(".full [data-placeholder-image]")
.first()
Original file line number Diff line number Diff line change
@@ -5,12 +5,14 @@ describe(`fixed`, () => {
cy.visit(`/static-image/traced`).waitForRouteChange()
})

it(`renders a traced svg`, () => {
it(`traced svg (falls back to DOMINANT_COLOR)`, () => {
cy.getTestElement(tracedTestId)
.find(`.gatsby-image-wrapper > img`)
.should(`have.attr`, `src`)
.and(src => {
;[`data:image/svg+xml`].forEach(part => expect(src).to.include(part))
.find(`.gatsby-image-wrapper > [data-placeholder-image]`)
.first()
.should($el => {
// traced falls
expect($el.prop("tagName")).to.be.equal("DIV")
expect($el).to.be.empty
})
})

246 changes: 125 additions & 121 deletions e2e-tests/production-runtime/cypress/integration/remote-file.js
Original file line number Diff line number Diff line change
@@ -1,143 +1,147 @@
describe(
`remote-file`,
`remote-file`,
{
retries: {
runMode: 4,
},
},
() => {
beforeEach(() => {
cy.visit(`/remote-file/`).waitForRouteChange()
beforeEach(() => {
cy.visit(`/remote-file/`).waitForRouteChange()

// trigger intersection observer
cy.scrollTo("top")
cy.wait(100)
cy.scrollTo("bottom", {
duration: 500,
})
cy.wait(500)
})

async function testImages(images, expectations) {
for (let i = 0; i < images.length; i++) {
const expectation = expectations[i]

const res = await fetch(images[i].currentSrc, {
method: "HEAD",
// trigger intersection observer
cy.scrollTo("top")
cy.wait(100)
cy.scrollTo("bottom", {
duration: 500,
})
expect(res.ok).to.be.true
if (expectation.width) {
expect(Math.ceil(images[i].getBoundingClientRect().width)).to.be.equal(
expectation.width
)
}
if (expectation.height) {
expect(Math.ceil(images[i].getBoundingClientRect().height)).to.be.equal(
expectation.height
)
}
}
}
cy.wait(500)
})

it(`should render correct dimensions`, () => {
cy.get('[data-testid="public"]').then(async $urls => {
const urls = Array.from($urls.map((_, $url) => $url.getAttribute("href")))
async function testImages(images, expectations) {
for (let i = 0; i < images.length; i++) {
const expectation = expectations[i]

for (const url of urls) {
const res = await fetch(url, {
const res = await fetch(images[i].currentSrc, {
method: "HEAD",
})
expect(res.ok).to.be.true
if (expectation.width) {
expect(
Math.ceil(images[i].getBoundingClientRect().width)
).to.be.equal(expectation.width)
}
if (expectation.height) {
expect(
Math.ceil(images[i].getBoundingClientRect().height)
).to.be.equal(expectation.height)
}
}
})

cy.get(".resize").then(async $imgs => {
await testImages(Array.from($imgs), [
{
width: 100,
height: 133,
},
{
width: 100,
height: 160,
},
{
width: 100,
height: 67,
},
])
})
}

cy.get(".fixed").then(async $imgs => {
await testImages(Array.from($imgs), [
{
width: 100,
height: 133,
},
{
width: 100,
height: 160,
},
{
width: 100,
height: 67,
},
])
})
it(`should render correct dimensions`, () => {
cy.get('[data-testid="public"]').then(async $urls => {
const urls = Array.from(
$urls.map((_, $url) => $url.getAttribute("href"))
)

cy.get(".constrained").then(async $imgs => {
await testImages(Array.from($imgs), [
{
width: 300,
height: 400,
},
{
width: 300,
height: 481,
},
{
width: 300,
height: 200,
},
])
})
for (const url of urls) {
const res = await fetch(url, {
method: "HEAD",
})
expect(res.ok).to.be.true
}
})

cy.get(".full").then(async $imgs => {
await testImages(Array.from($imgs), [
{
height: 1229,
},
{
height: 1478,
},
{
height: 614,
},
])
})
})
cy.get(".resize").then(async $imgs => {
await testImages(Array.from($imgs), [
{
width: 100,
height: 133,
},
{
width: 100,
height: 160,
},
{
width: 100,
height: 67,
},
])
})

it(`should render a placeholder`, () => {
cy.get(".fixed [data-placeholder-image]")
.first()
.should("have.css", "background-color", "rgb(232, 184, 8)")
cy.get(".constrained [data-placeholder-image]")
.first()
.should($el => {
expect($el.prop("tagName")).to.be.equal("IMG")
expect($el.prop("src")).to.contain("data:image/jpg;base64")
cy.get(".fixed").then(async $imgs => {
await testImages(Array.from($imgs), [
{
width: 100,
height: 133,
},
{
width: 100,
height: 160,
},
{
width: 100,
height: 67,
},
])
})
cy.get(".constrained_traced [data-placeholder-image]")
.first()
.should($el => {
expect($el.prop("tagName")).to.be.equal("IMG")
expect($el.prop("src")).to.contain("data:image/svg+xml,%3csvg")

cy.get(".constrained").then(async $imgs => {
await testImages(Array.from($imgs), [
{
width: 300,
height: 400,
},
{
width: 300,
height: 481,
},
{
width: 300,
height: 200,
},
])
})
cy.get(".full [data-placeholder-image]")
.first()
.should($el => {
expect($el.prop("tagName")).to.be.equal("DIV")
expect($el).to.be.empty

cy.get(".full").then(async $imgs => {
await testImages(Array.from($imgs), [
{
height: 1229,
},
{
height: 1478,
},
{
height: 614,
},
])
})
})
})
})

it(`should render a placeholder`, () => {
cy.get(".fixed [data-placeholder-image]")
.first()
.should("have.css", "background-color", "rgb(232, 184, 8)")
cy.get(".constrained [data-placeholder-image]")
.first()
.should($el => {
expect($el.prop("tagName")).to.be.equal("IMG")
expect($el.prop("src")).to.contain("data:image/jpg;base64")
})
cy.get(".constrained_traced [data-placeholder-image]")
.first()
.should($el => {
// traced falls back to DOMINANT_COLOR
expect($el.prop("tagName")).to.be.equal("DIV")
expect($el).to.be.empty
})
cy.get(".full [data-placeholder-image]")
.first()
.should($el => {
expect($el.prop("tagName")).to.be.equal("DIV")
expect($el).to.be.empty
})
})
}
)
Original file line number Diff line number Diff line change
@@ -5,12 +5,14 @@ describe(`fixed`, () => {
cy.visit(`/static-image/traced`).waitForRouteChange()
})

it(`renders a traced svg`, () => {
it(`traced svg (falls back to DOMINANT_COLOR)`, () => {
cy.getTestElement(tracedTestId)
.find(`.gatsby-image-wrapper > img`)
.should(`have.attr`, `src`)
.and(src => {
;[`data:image/svg+xml`].forEach(part => expect(src).to.include(part))
.find(`.gatsby-image-wrapper > [data-placeholder-image]`)
.first()
.should($el => {
// traced falls
expect($el.prop("tagName")).to.be.equal("DIV")
expect($el).to.be.empty
})
})

1 change: 1 addition & 0 deletions examples/using-contentful/package.json
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@
"scripts": {
"develop": "gatsby develop",
"build": "gatsby build",
"clean": "gatsby clean",
"start": "gatsby serve"
}
}
8 changes: 6 additions & 2 deletions integration-tests/gatsby-cli/__tests__/new.js
Original file line number Diff line number Diff line change
@@ -29,7 +29,11 @@ describe(`gatsby new`, () => {
})

it(`creates a gatsby site with the default starter`, () => {
const [code, logs] = GatsbyCLI.from(cwd).invoke([`new`, `gatsby-default`])
const [code, logs] = GatsbyCLI.from(cwd).invoke([
`new`,
`gatsby-default`,
`gatsbyjs/gatsby-starter-default#v4`,
])

logs.should.contain(
`info Creating new site from git: https://github.com/gatsbyjs/gatsby-starter-default.git`
@@ -48,7 +52,7 @@ describe(`gatsby new`, () => {
const [code, logs] = GatsbyCLI.from(cwd).invoke([
`new`,
`gatsby-blog`,
`gatsbyjs/gatsby-starter-blog`,
`gatsbyjs/gatsby-starter-blog#v4`,
])

logs.should.contain(
Loading