|
| 1 | +# NPM Deprecation Commands for react-code-view |
| 2 | + |
| 3 | +## 🚨 Important: Run these commands to deprecate the package on npm |
| 4 | + |
| 5 | +After merging the PR that removes the `react-code-view` package, run the following commands to deprecate it on npm: |
| 6 | + |
| 7 | +### Deprecate all versions |
| 8 | + |
| 9 | +```bash |
| 10 | +# Deprecate all versions of react-code-view |
| 11 | +npm deprecate react-code-view "Package deprecated. Please use @react-code-view/react instead. See https://github.com/simonguo/react-code-view/blob/main/DEPRECATION_react-code-view.md for migration guide." |
| 12 | +``` |
| 13 | + |
| 14 | +### Deprecate specific version ranges (alternative) |
| 15 | + |
| 16 | +If you prefer to deprecate specific versions: |
| 17 | + |
| 18 | +```bash |
| 19 | +# Deprecate v3.x versions |
| 20 | +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/DEPRECATION_react-code-view.md for migration guide." |
| 21 | + |
| 22 | +# Deprecate v2.x versions (if needed) |
| 23 | +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/DEPRECATION_react-code-view.md for migration guide." |
| 24 | +``` |
| 25 | + |
| 26 | +## 📋 Verification |
| 27 | + |
| 28 | +After running the deprecation command, verify it worked: |
| 29 | + |
| 30 | +```bash |
| 31 | +npm view react-code-view |
| 32 | +``` |
| 33 | + |
| 34 | +You should see a deprecation warning in the output. |
| 35 | + |
| 36 | +## 📝 Notes |
| 37 | + |
| 38 | +- Deprecation does NOT unpublish the package - it remains available for existing users |
| 39 | +- Users will see a warning when installing: `npm WARN deprecated react-code-view@x.x.x: Package deprecated...` |
| 40 | +- The package will still be installable, but users are encouraged to migrate |
| 41 | +- According to npm policy, you should NOT unpublish packages that others depend on |
| 42 | + |
| 43 | +## 🔗 References |
| 44 | + |
| 45 | +- npm deprecate documentation: https://docs.npmjs.com/cli/v10/commands/npm-deprecate |
| 46 | +- npm unpublish policy: https://docs.npmjs.com/policies/unpublish |
| 47 | +- Migration guide: [DEPRECATION_react-code-view.md](./DEPRECATION_react-code-view.md) |
0 commit comments