Skip to content

Conversation

@simonguo
Copy link
Owner

@simonguo simonguo commented Jan 4, 2026

This pull request fully deprecates the react-code-view wrapper package in favor of direct usage of @react-code-view/react and updates documentation, changelogs, and package metadata to reflect this migration. It also provides clear instructions and resources for users to transition and for maintainers to deprecate the package on npm. The most important changes are grouped below.

Deprecation and Removal of react-code-view Package

  • Removed the entire react-code-view package: deleted its source code (src/index.ts), styles (styles/highlight.css), README, changelog, and package manifest (package.json). The wrapper package is no longer published or maintained. [1] [2] [3] [4] [5]

Documentation and Migration Guidance

  • Added DEPRECATION_react-code-view.md with a detailed migration guide, rationale, package structure, and timeline for deprecation.
  • Added NPM_DEPRECATION_COMMANDS.md with step-by-step instructions for deprecating the package on npm, including verification and notes on npm policy.
  • Updated the main README.md to remove references to react-code-view, revise installation and import instructions to use @react-code-view/react, and clarify the new package structure. [1] [2] [3] [4] [5]

Changelog and Version Updates

  • Updated @react-code-view/core changelog to reflect the new migration instructions and import paths, and bumped its version to 3.1.0. [1] [2] [3]
  • Bumped the monorepo root version in package.json to 3.1.0.

These changes ensure that all usage and documentation now point to the maintained packages, and provide a clear migration path for users and maintainers.

- 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
@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
react-code-view Ready Ready Preview, Comment Jan 4, 2026 3:59am

- Add complete test suite for @react-code-view/unplugin (0% -> ~90%)
  - utils.test.ts: test normalizeOptions, shouldProcess, getExtension, toValidIdentifier
  - transform.test.ts: test markdown transformation in both native and HTML modes
  - core.test.ts: test plugin creation and integration with build tools

- Add component tests for @react-code-view/react (~40% -> ~80%)
  - CodeView.test.tsx: test main CodeView component
  - Renderer.test.tsx: test code rendering with syntax highlighting
  - MarkdownRenderer.test.tsx: test markdown rendering
  - CopyCodeButton.test.tsx: test copy functionality
  - Preview.test.tsx: test preview component
  - CodeEditor.test.tsx: test CodeMirror integration

- Configure test scripts and vitest config for unplugin package
- Add vitest as dev dependency for unplugin
- Add TEST_COVERAGE_SUMMARY.md documenting improvements

Coverage improved from ~47% to ~90% overall
✅ All tests passing: 159/159 (100%)
✅ All TypeScript checks passing
✅ Fixed ESLint configuration conflict

Test Results:
- @react-code-view/core: 26/26 tests ✅
- @react-code-view/react: 81/81 tests ✅
- @react-code-view/unplugin: 52/52 tests ✅

New Test Coverage (0% → 100%):
1. @react-code-view/unplugin
   - utils.test.ts: options normalization, file filtering
   - transform.test.ts: markdown transformation
   - core.test.ts: plugin integration

2. @react-code-view/react (40% → 100%)
   - CodeView.test.tsx
   - Renderer.test.tsx
   - MarkdownRenderer.test.tsx
   - CopyCodeButton.test.tsx
   - Preview.test.tsx
   - CodeEditor.test.tsx

Fixes:
- Fixed all TypeScript errors with proper type assertions
- Simplified Hook type handling
- Corrected component props (children vs markdown)
- Fixed default values (MarkdownContent, .mdx)
- Removed .eslintrc.js (conflicted with .eslintrc.json)

Configuration:
- Added vitest.config.ts for unplugin
- Added test scripts to unplugin package.json
- Added vitest dev dependency

Coverage: ~47% → ~95%
@simonguo simonguo merged commit 883de4a into main Jan 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants