Npm deprecation

I need a way to query non-deprecated versions of a package using npm or the nexus rest api. We use semantic versioning to create development versions of packages for testing during development. For nuget and maven and other package types, we can easily delete these versions, e.g., when pull requests get merged. The npm wizzards, unfortunately, decreed that this shall not be. I can delete packages manually through the Nexus UI, but even through the Nexus Components REST API I can’t delete these packages (I get a HTTP 405 or 422, I forget which it returned).

Right, so, I deprecate the temporary packages per the npm wizzards’ wimsy. The issue is that for projects with a lot of active development, the temporary packages really start to pile up. I would just really, really, really like to delete these packages. Barring that, I would at least like a way to query which packages have already been deprecated. npm view just doesn’t do this. I can list all versions of a package that way - comically it even separately lists the versions with the date they were created - but then I apparently have to npm view on each individual package version to determine whether it’s already been deprecated (the same applies if I were to just re-deprecate packages). Shelling out to run npm view takes around a second. So with thousands of package versions, this just doesn’t work. The nexus search rest API endpoint, unfortunately, doesn’t seem to return whether a particular package version is deprecated.

I’m posting here to solve a problem: I have thousands of npm packages, 66% of them are deprecated, 33% of them are working build versions. I need a way to identify the < 1% that need deprecation when I go to do this. Respectfully, I’m not interested in opinions about whether we should be creating temporary packages or other misdirection or efforts to rearchitect. However well intended.

I reiterate that it would be really, really nice to be able to delete npm packages in some automated fashion. Every other package management tool with which we use nexus supports this in some way. I’ve gone to about half the bother of reverse-engineering the UI delete functionality, but it’s a lot of work and obviously a bad idea for a variety of reasons.

We’re on Sonatype Nexus Repository Manager PRO 3.38.1-01.