As discussed in #435 we want to refactor NpmUrlUpdater.
It is currently a WebsiteUrlUpdater what is designed for grepping versions out of HTML content and should only be used as last resort solution if there is no better way.
However, here the configured website is serving JSON and not HTML.
Therefore, it would make sense to migrate to JsonUrlUpdater.
Then we also do not need to "grep" the versions via regex pattern but find them from the JSON structure without the need for a regex.
Since the npmjs registry is a global concept just like the maven central repository, we should consider creating an abstract base class NpmBasedUrlUpdater that contains the logic to parse the JSON from the NPM registry so sub-classes of it like NpmUrlUpdater will only need minimal code/configuration.
As discussed in #435 we want to refactor
NpmUrlUpdater
. It is currently aWebsiteUrlUpdater
what is designed for grepping versions out of HTML content and should only be used as last resort solution if there is no better way. However, here the configured website is serving JSON and not HTML. Therefore, it would make sense to migrate toJsonUrlUpdater
. Then we also do not need to "grep" the versions via regex pattern but find them from the JSON structure without the need for a regex.Since the npmjs registry is a global concept just like the maven central repository, we should consider creating an abstract base class
NpmBasedUrlUpdater
that contains the logic to parse the JSON from the NPM registry so sub-classes of it likeNpmUrlUpdater
will only need minimal code/configuration.