enhance: support Unicode 15.0 emoji (#135)

This commit is contained in:
zyoshoka 2023-12-16 10:12:07 +09:00 committed by GitHub
parent ae92c2a9d0
commit 902da0b291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 17 deletions

View file

@ -11,6 +11,10 @@
--> -->
## 0.x.x (unreleased)
### Features
- Supports Unicode 15.0 emoji
## 0.23.3 ## 0.23.3
- tweak fn parsing - tweak fn parsing
- fnNameList option removed - fnNameList option removed

26
package-lock.json generated
View file

@ -1,15 +1,15 @@
{ {
"name": "mfm-js", "name": "mfm-js",
"version": "0.23.2", "version": "0.23.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mfm-js", "name": "mfm-js",
"version": "0.23.2", "version": "0.23.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"twemoji-parser": "14.0.0" "@twemoji/parser": "15.0.0"
}, },
"devDependencies": { "devDependencies": {
"@microsoft/api-extractor": "^7.28.4", "@microsoft/api-extractor": "^7.28.4",
@ -1292,6 +1292,11 @@
"tsserver": "typescript/bin/tsserver" "tsserver": "typescript/bin/tsserver"
} }
}, },
"node_modules/@twemoji/parser": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/@twemoji/parser/-/parser-15.0.0.tgz",
"integrity": "sha512-lh9515BNsvKSNvyUqbj5yFu83iIDQ77SwVcsN/SnEGawczhsKU6qWuogewN1GweTi5Imo5ToQ9s+nNTf97IXvg=="
},
"node_modules/@types/argparse": { "node_modules/@types/argparse": {
"version": "1.0.38", "version": "1.0.38",
"resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz",
@ -5184,11 +5189,6 @@
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
} }
}, },
"node_modules/twemoji-parser": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-14.0.0.tgz",
"integrity": "sha512-9DUOTGLOWs0pFWnh1p6NF+C3CkQ96PWmEFwhOVmT3WbecRC+68AIqpsnJXygfkFcp4aXbOp8Dwbhh/HQgvoRxA=="
},
"node_modules/type-check": { "node_modules/type-check": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@ -6466,6 +6466,11 @@
"integrity": "sha512-jbtC+RgKZ9Kk65zuRZbKLTACf+tvFW4Rfq0JEMXrlmV3P3yme+Hm+pnb5fJRyt61SjIitcrC810wj7+1tgsEmg==", "integrity": "sha512-jbtC+RgKZ9Kk65zuRZbKLTACf+tvFW4Rfq0JEMXrlmV3P3yme+Hm+pnb5fJRyt61SjIitcrC810wj7+1tgsEmg==",
"dev": true "dev": true
}, },
"@twemoji/parser": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/@twemoji/parser/-/parser-15.0.0.tgz",
"integrity": "sha512-lh9515BNsvKSNvyUqbj5yFu83iIDQ77SwVcsN/SnEGawczhsKU6qWuogewN1GweTi5Imo5ToQ9s+nNTf97IXvg=="
},
"@types/argparse": { "@types/argparse": {
"version": "1.0.38", "version": "1.0.38",
"resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz",
@ -9357,11 +9362,6 @@
"tslib": "^1.8.1" "tslib": "^1.8.1"
} }
}, },
"twemoji-parser": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/twemoji-parser/-/twemoji-parser-14.0.0.tgz",
"integrity": "sha512-9DUOTGLOWs0pFWnh1p6NF+C3CkQ96PWmEFwhOVmT3WbecRC+68AIqpsnJXygfkFcp4aXbOp8Dwbhh/HQgvoRxA=="
},
"type-check": { "type-check": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",

View file

@ -36,7 +36,7 @@
"typescript": "4.7.4" "typescript": "4.7.4"
}, },
"dependencies": { "dependencies": {
"twemoji-parser": "14.0.0" "@twemoji/parser": "15.0.0"
}, },
"files": [ "files": [
"built", "built",

View file

@ -1,4 +1,4 @@
declare module 'twemoji-parser/dist/lib/regex' { declare module '@twemoji/parser/dist/lib/regex' {
const regex: RegExp; const regex: RegExp;
export default regex; export default regex;
} }

View file

@ -3,11 +3,11 @@ import * as P from './core';
import { mergeText } from './util'; import { mergeText } from './util';
// NOTE: // NOTE:
// tsdのテストでファイルを追加しているにも関わらず「twemoji-parser/dist/lib/regex」の型定義ファイルがないとエラーが出るため、 // tsdのテストでファイルを追加しているにも関わらず「@twemoji/parser/dist/lib/regex」の型定義ファイルがないとエラーが出るため、
// このエラーを無視する。 // このエラーを無視する。
/* eslint @typescript-eslint/ban-ts-comment: 1 */ /* eslint @typescript-eslint/ban-ts-comment: 1 */
// @ts-ignore // @ts-ignore
import twemojiRegex from 'twemoji-parser/dist/lib/regex'; import twemojiRegex from '@twemoji/parser/dist/lib/regex';
type ArgPair = { k: string, v: string | true }; type ArgPair = { k: string, v: string | true };
type Args = Record<string, string | true>; type Args = Record<string, string | true>;