Description
Deprecation is an important part of the open source software lifecycle. Construct library vendors should have a way to mark a library as deprecated on the Construct Hub.
On NPM, authors can specifically mark their packages as deprecated, in a process which allows them to include a deprecation reason. See https://docs.npmjs.com/deprecating-and-undeprecating-packages-or-package-versions
Requiring authors to specify some kind of extra metadata in their package.json isn't really appropriate here because after an author has deprecated a library, it's likely they do not want to publish a new version (with the updated package.json).
A more appropriate solution here is to check against externally to see if the package has been deprecated. It's possible to check if the package has been deprecated on npm from the output of npm view <package> --json
. (We could also (optionally) check if the package's repository is on GitHub, in which case if the repository has been archived then we could assume it has been deleted.)
If a package is deprecated, we still want to show it and its API reference, but we probably don't want to show it in search results (?) and we should clearly indicate that it is deprecated on the package's detail page