Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-source-contentful): avoid confusion of Gatsby node and Contentful node count in logs #34830

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions packages/gatsby-source-contentful/src/__tests__/gatsby-node.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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