Skip to content

Create npm metadata when package is deprecated but metadata does not exist

Description

In order to deprecate a package version we need to set attribute deprecated in the package's metadata, so having a metadata entry is a requirement. Currently not all npm packages have associated metadata and this prevents the package from being deprecated.

Solution

Change the Packages::Npm::DeprecatePackageService to also create metadata entries (bulk insert), when they don't exist.
To have correct package metadata, pass the whole params to the worker and not only the versions and the deprecation message.