Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes our script which updates integrations based on the npm registry.
We use a search endpoint in the npm registry API to look up integrations with one of our keywords. Previously we did this with a single call combining keywords into the query parameter:
text=keyword:astro-component,withastro,astro-integration
.Some time around November 30, the response to this query changed. It looks like previously npm treated the list of keywords as “one of these” (i.e. OR), but is now treating it as “all of these” (i.e. AND). This meant our query only returned the ~100 packages that include all three keywords and the script tried to delete all the others we knew about.
This PR updates the script to run the search query separately for each keyword. This caused some “too many request” errors (at least running locally), so I’ve also added some retry logic to avoid that.
Browser Test Checklist
n/a — data change only