After merging the PR that removes the react-code-view package, run the following commands to deprecate it on npm:
# Deprecate all versions of react-code-view
npm deprecate react-code-view "Package deprecated. Please use @react-code-view/react instead. See https://github.com/simonguo/react-code-view/blob/main/docs/DEPRECATION_react-code-view.md for migration guide."If you prefer to deprecate specific versions:
# Deprecate v3.x versions
npm deprecate react-code-view@3.x "Package deprecated. Please use @react-code-view/react instead. See https://github.com/simonguo/react-code-view/blob/main/docs/DEPRECATION_react-code-view.md for migration guide."
# Deprecate v2.x versions (if needed)
npm deprecate react-code-view@2.x "Package deprecated. Please use @react-code-view/react instead. See https://github.com/simonguo/react-code-view/blob/main/docs/DEPRECATION_react-code-view.md for migration guide."After running the deprecation command, verify it worked:
npm view react-code-viewYou should see a deprecation warning in the output.
- Deprecation does NOT unpublish the package - it remains available for existing users
- Users will see a warning when installing:
npm WARN deprecated react-code-view@x.x.x: Package deprecated... - The package will still be installable, but users are encouraged to migrate
- According to npm policy, you should NOT unpublish packages that others depend on
- npm deprecate documentation: https://docs.npmjs.com/cli/v10/commands/npm-deprecate
- npm unpublish policy: https://docs.npmjs.com/policies/unpublish
- Migration guide: docs/DEPRECATION_react-code-view.md