npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

How do I fetch all npm packages that contain a given keyword

So previously there was this stackoverflow question

That recommended fetching all npm packages with the keyword docpad-plugin like so:["docpad-plugin"]&endkey=["docpad-plugin",{}]&group_level=2

Which is the technique used by and — the latter being what DocPad uses to fetch its plugins.

However, now that URL just returns an empty page:

HTTP/1.1 404 Not Found
Connection: keep-alive
Date: Wed, 11 Jul 2018 10:51:09 GMT
Expect-CT: max-age=604800, report-uri=""
Server: cloudflare
path=/;; HttpOnly
Transfer-Encoding: chunked
npm-notice: this endpoint is deprecated

Thus breaking pluginclerk, thus breaking the DocPad web helper, and thus breaking DocPad.

What is the workaround? Is there any?

It’s deprecated, as it says. Use the search endpoint instead, which can filter by keywords:.

Great, thank you.

Seems the new call then is:

pluginclerk is now updated for the new API