Merge pull request #28947 from deejay1/remove-node-fetch-docs

docs: Remove node-fetch requirement from doc examples
This commit is contained in:
Ben Lambert
2025-03-07 08:20:44 +01:00
committed by GitHub
2 changed files with 3 additions and 4 deletions
@@ -686,9 +686,8 @@ export class SystemXReaderProcessor implements CatalogProcessor {
try {
// Use the builtin reader facility to grab data from the
// API. If you prefer, you can just use plain fetch here
// (from the node-fetch package), or any other method of
// your choosing.
// API. If you prefer, you can just use plain fetch here,
// or any other method of your choosing.
const response = await this.reader.readUrl(location.target);
const json = JSON.parse((await response.buffer()).toString());
// Repeatedly call emit(processingResult.entity(location, <entity>))
@@ -46,7 +46,7 @@ We will use some libraries in the module, so let's add them to your plugin modul
git checkout -b tutorials/new-faq-snippets-collator
# Install the package containing the interface
yarn workspace @internal/backstage-plugin-search-backend-module-faq-snippets-collator add node-fetch @backstage/plugin-search-common @backstage/plugin-search-backend-node
yarn workspace @internal/backstage-plugin-search-backend-module-faq-snippets-collator add @backstage/plugin-search-common @backstage/plugin-search-backend-node
```
#### 3. Use Backstage App configuration