You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_emoji-regex_ offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard.
4
-
5
-
This repository contains a script that generates this regular expression based on [Unicode data](https://github.com/node-unicode/node-unicode-data). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard.
3
+
_emoji-regex_ offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. It’s based on [_emoji-test-regex-pattern_](https://github.com/mathiasbynens/emoji-test-regex-pattern), which generates (at build time) the regular expression pattern based on the Unicode Standard. As a result, _emoji-regex_ can easily be updated whenever new emoji are added to Unicode.
### How to update emoji-regex after new Unicode Standard releases
88
52
53
+
1.[Update _emoji-test-regex-pattern_ as described in its repository](https://github.com/mathiasbynens/emoji-test-regex-pattern#how-to-update-emoji-test-regex-pattern-after-new-uts51-releases).
54
+
55
+
1. Bump the _emoji-test-regex-pattern_ dependency to the latest version.
56
+
89
57
1. Update the Unicode data dependency in `package.json` by running the following commands:
90
58
91
-
```sh
92
-
# Example: updating from Unicode v12 to Unicode v13.
93
-
npm uninstall @unicode/unicode-12.0.0
94
-
npm install @unicode/unicode-13.0.0 --save-dev
95
-
````
59
+
```sh
60
+
# Example: updating from Unicode v13 to Unicode v14.
61
+
npm uninstall @unicode/unicode-13.0.0
62
+
npm install @unicode/unicode-14.0.0 --save-dev
63
+
````
96
64
97
-
1. Generate the new output:
65
+
1. Generate the new output:
98
66
99
-
```sh
100
-
npm run build
101
-
```
67
+
```sh
68
+
npm run build
69
+
```
102
70
103
-
1. Verify that tests still pass:
71
+
1. Verify that tests still pass:
104
72
105
-
```sh
106
-
npm test
107
-
```
73
+
```sh
74
+
npm test
75
+
```
108
76
109
-
1. Send a pull request with the changes, and get it reviewed & merged.
77
+
### How to publish a new release
110
78
111
79
1. On the `main` branch, bump the emoji-regex version number in`package.json`:
0 commit comments