|
| 1 | +# Changelog |
| 2 | + |
| 3 | +## 4.0.0 |
| 4 | + |
| 5 | +### Breaking Changes |
| 6 | + |
| 7 | +- **Minimum React 18.0.0** (was 16.2.0) |
| 8 | +- **Minimum React Native 0.73.0** (was 0.50.4) |
| 9 | +- **`react-native-fit-image` removed** - The default `image` render rule now uses React Native's built-in `<Image>` component. Users who need auto-sizing image behavior should provide a custom `image` render rule. |
| 10 | +- **`prop-types` removed** - Runtime prop validation is no longer performed. Use TypeScript for type checking. |
| 11 | +- **Class component replaced with function component** - `<Markdown>` is now a function component using hooks. Code relying on class instance methods or refs will break. |
| 12 | +- **`markdown-it` upgraded from ^8 to ^14** - Custom markdown-it plugins should verify compatibility. |
| 13 | +- **Package entry points changed** - `main` now points to `lib/commonjs/index.js`, `module` to `lib/module/index.js`, `types` to `lib/typescript/index.d.ts`. |
| 14 | + |
| 15 | +### New Features |
| 16 | + |
| 17 | +- Full TypeScript source with auto-generated type declarations |
| 18 | +- Exported types: `ASTNode`, `RenderFunction`, `RenderRules`, `MarkdownStyles`, `MarkdownProps` |
| 19 | +- ESM module output via react-native-builder-bob |
| 20 | +- Proper memoization using `useMemo` hooks for better rendering performance |
| 21 | + |
| 22 | +### Improvements |
| 23 | + |
| 24 | +- All source converted from JavaScript to TypeScript |
| 25 | +- Deprecated `componentWillMount` and `componentWillReceiveProps` replaced with hooks |
| 26 | +- Broken `PropTypes` import from `react` removed in AstRenderer |
| 27 | +- Unused `React` and `View` imports removed from parser |
| 28 | +- ESLint + Prettier configured |
| 29 | +- Jest test suite with 99 tests across 17 suites |
| 30 | +- Integration snapshot tests for comprehensive markdown rendering |
| 31 | + |
| 32 | +### Removed |
| 33 | + |
| 34 | +- `react-native-fit-image` dependency |
| 35 | +- `prop-types` dependency |
| 36 | +- `chokidar` and `fs-extra` dev dependencies |
| 37 | +- `bin/` build scripts (replaced by react-native-builder-bob) |
| 38 | +- `export.json` debug artifact |
| 39 | +- Hand-written `index.d.ts` (replaced by auto-generated types) |
| 40 | +- `.npmignore` (replaced by `files` field in package.json) |
0 commit comments