Skip to content

Commit a3ecd18

Browse files
committed
chore: bump version to 3.1.0 and fix installation docs
- Update all packages to version 3.1.0 - Add @react-code-view/unplugin to installation instructions - Clarify that unplugin is needed for markdown imports - Add note about when unplugin is optional
1 parent 9c50a75 commit a3ecd18

File tree

6 files changed

+56
-7
lines changed

6 files changed

+56
-7
lines changed

NPM_DEPRECATION_COMMANDS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ A React component library for rendering code with **live preview** and syntax hi
2929

3030
```bash
3131
# npm
32-
npm install @react-code-view/react
32+
npm install @react-code-view/react @react-code-view/unplugin
3333

3434
# pnpm
35-
pnpm add @react-code-view/react
35+
pnpm add @react-code-view/react @react-code-view/unplugin
3636

3737
# yarn
38-
yarn add @react-code-view/react
38+
yarn add @react-code-view/react @react-code-view/unplugin
3939
```
4040

41+
> **Note:** `@react-code-view/unplugin` is needed if you want to import `.md` files directly as React components. For basic CodeView usage without markdown imports, you only need `@react-code-view/react`.
42+
4143
## 🚀 Quick Start
4244

4345
### ⭐ Import Markdown as React Components

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-code-view-monorepo",
3-
"version": "3.0.1",
3+
"version": "3.1.0",
44
"private": true,
55
"description": "Monorepo for react-code-view - A React component for rendering code with live preview",
66
"repository": {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-code-view/core",
3-
"version": "3.0.1",
3+
"version": "3.1.0",
44
"description": "Core markdown transformation utilities for react-code-view",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-code-view/react",
3-
"version": "3.0.1",
3+
"version": "3.1.0",
44
"description": "React components for rendering code with live preview",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/unplugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-code-view/unplugin",
3-
"version": "3.0.1",
3+
"version": "3.1.0",
44
"description": "Build tool plugins for react-code-view (Webpack, Vite, Rollup, esbuild, Rspack)",
55
"license": "MIT",
66
"main": "./dist/index.cjs",

0 commit comments

Comments
 (0)