From 4dc464b40ab80af178175663202203ceb1641d4b Mon Sep 17 00:00:00 2001 From: GatsbyJS Bot Date: Mon, 9 Oct 2023 06:32:28 -0400 Subject: [PATCH] chore(source-npm-package-search): bespoke treatment for `plugin-gatsby-cloud` and `source-contentful` (#38619) (#38622) Adjust `source-npm-package-search` to pick up READMEs for - `gatsby-plugin-gatsby-cloud` - `gatsby-source-contentful` from unpkg.com instead of Algolia's outdated `npm-search` to make information from - https://github.com/gatsbyjs/gatsby/pull/38480 - https://github.com/gatsbyjs/gatsby/pull/38479 accessible to gatsbyjs.com users. (cherry picked from commit d44ada77c1a37ddc37410ba20d1dd351a2623482) Co-authored-by: Florian Kissling <21834+fk@users.noreply.github.com> --- .../gatsby-source-npm-package-search/src/gatsby-node.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-source-npm-package-search/src/gatsby-node.js b/packages/gatsby-source-npm-package-search/src/gatsby-node.js index cbd9219491b9..7d1e7e879dae 100644 --- a/packages/gatsby-source-npm-package-search/src/gatsby-node.js +++ b/packages/gatsby-source-npm-package-search/src/gatsby-node.js @@ -89,7 +89,11 @@ exports.sourceNodes = async ( hits.map(async hit => { const parentId = createNodeId(`plugin ${hit.objectID}`) - if (!hit.readme) { + if ( + !hit.readme || + hit.objectID === `gatsby-plugin-gatsby-cloud` || + hit.objectID === `gatsby-source-contentful` + ) { try { hit.readme = ( await got.get(