Skip to content

Commit

Permalink
fix(gatsby-source-contentful): avoid confusion of Gatsby node and Con…
Browse files Browse the repository at this point in the history
…tentful node count in logs (#34830)
  • Loading branch information
axe312ger committed Feb 17, 2022
1 parent ee8c874 commit ac1d777
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 8 additions & 8 deletions packages/gatsby-source-contentful/src/__tests__/gatsby-node.js
Expand Up @@ -461,7 +461,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 deleted entries",
],
Array [
"Contentful: 22 cached entries",
"Contentful: 11 cached entries",
],
Array [
"Contentful: 1 new assets",
Expand All @@ -470,7 +470,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 updated assets",
],
Array [
"Contentful: 8 cached assets",
"Contentful: 4 cached assets",
],
Array [
"Contentful: 0 deleted assets",
Expand Down Expand Up @@ -551,7 +551,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 deleted entries",
],
Array [
"Contentful: 28 cached entries",
"Contentful: 14 cached entries",
],
Array [
"Contentful: 0 new assets",
Expand All @@ -560,7 +560,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 updated assets",
],
Array [
"Contentful: 10 cached assets",
"Contentful: 5 cached assets",
],
Array [
"Contentful: 0 deleted assets",
Expand Down Expand Up @@ -653,7 +653,7 @@ describe(`gatsby-node`, () => {
"Contentful: 1 deleted entries",
],
Array [
"Contentful: 28 cached entries",
"Contentful: 14 cached entries",
],
Array [
"Contentful: 0 new assets",
Expand All @@ -662,7 +662,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 updated assets",
],
Array [
"Contentful: 10 cached assets",
"Contentful: 5 cached assets",
],
Array [
"Contentful: 0 deleted assets",
Expand Down Expand Up @@ -739,7 +739,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 deleted entries",
],
Array [
"Contentful: 28 cached entries",
"Contentful: 14 cached entries",
],
Array [
"Contentful: 0 new assets",
Expand All @@ -748,7 +748,7 @@ describe(`gatsby-node`, () => {
"Contentful: 0 updated assets",
],
Array [
"Contentful: 10 cached assets",
"Contentful: 5 cached assets",
],
Array [
"Contentful: 1 deleted assets",
Expand Down
8 changes: 6 additions & 2 deletions packages/gatsby-source-contentful/src/source-nodes.js
Expand Up @@ -211,10 +211,14 @@ export async function sourceNodes(
reporter.info(`Contentful: ${nodeCounts.newEntry} new entries`)
reporter.info(`Contentful: ${nodeCounts.updatedEntry} updated entries`)
reporter.info(`Contentful: ${nodeCounts.deletedEntry} deleted entries`)
reporter.info(`Contentful: ${nodeCounts.existingEntry} cached entries`)
reporter.info(
`Contentful: ${nodeCounts.existingEntry / locales.length} cached entries`
)
reporter.info(`Contentful: ${nodeCounts.newAsset} new assets`)
reporter.info(`Contentful: ${nodeCounts.updatedAsset} updated assets`)
reporter.info(`Contentful: ${nodeCounts.existingAsset} cached assets`)
reporter.info(
`Contentful: ${nodeCounts.existingAsset / locales.length} cached assets`
)
reporter.info(`Contentful: ${nodeCounts.deletedAsset} deleted assets`)

reporter.verbose(`Building Contentful reference map`)
Expand Down

0 comments on commit ac1d777

Please sign in to comment.