Skip to content

Commit 9d9136b

Browse files
authored
chore: add deprecation warning (#645)
1 parent 12b0730 commit 9d9136b

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
> [!WARNING]
2+
> **`react-native-enriched` has been renamed to [`react-native-enriched-html`](https://github.com/software-mansion/react-native-enriched-html).**
3+
> This package will not receive any further updates or bug fixes. Migrate without any breaking changes:
4+
> ```sh
5+
> npm install react-native-enriched-html
6+
> ```
7+
> See the [official announcement](https://github.com/software-mansion/react-native-enriched-html/releases/tag/v1.0.0) for details.
8+
9+
110
<img src="https://github.com/user-attachments/assets/c8ba03bc-4ea8-48f4-9566-02ebac0c19d3" alt="react-native-enriched by Software Mansion" width="100%">
211
312
[![Ad](https://swm-delivery.com/www/images/zone-gh-react-native-enriched-1?n=1)](https://swm-delivery.com/www/delivery/ck-slug.php?zoneid=zone-gh-react-native-enriched-1&n=1)

src/deprecate.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const warnDeprecated = () => {
2+
console.warn(`react-native-enriched has been renamed to react-native-enriched-html.
3+
This package will not receive any further updates or bug fixes. Migrate without any breaking changes using: "npm install react-native-enriched-html".
4+
Official announcement: https://github.com/software-mansion/react-native-enriched-html/releases/tag/v1.0.0`);
5+
};

src/index.native.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ export type {
3232
OnMentionPressEvent,
3333
OnLinkPressEvent,
3434
} from './types';
35+
36+
import { warnDeprecated } from './deprecate';
37+
warnDeprecated();

src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ export type {
2222
OnMentionPressEvent,
2323
OnLinkPressEvent,
2424
} from './types';
25+
26+
import { warnDeprecated } from './deprecate';
27+
warnDeprecated();

0 commit comments

Comments
 (0)