diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 9443b529a33e..e7a605cbf5a7 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -49,7 +49,7 @@ "@typescript-eslint/type-utils": "5.60.1", "@typescript-eslint/utils": "5.60.1", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", "semver": "^7.3.7", @@ -63,7 +63,6 @@ "@types/prettier": "*", "chalk": "^5.0.1", "cross-fetch": "^3.1.5", - "grapheme-splitter": "^1.0.4", "json-schema": "*", "markdown-table": "^3.0.2", "marked": "^4.0.15", diff --git a/packages/eslint-plugin/src/util/getStringLength.ts b/packages/eslint-plugin/src/util/getStringLength.ts index 65a22551949a..6bec9f4e1adc 100644 --- a/packages/eslint-plugin/src/util/getStringLength.ts +++ b/packages/eslint-plugin/src/util/getStringLength.ts @@ -1,6 +1,6 @@ -import GraphemeSplitter from 'grapheme-splitter'; +import Graphemer from 'graphemer'; -let splitter: GraphemeSplitter; +let splitter: Graphemer; function isASCII(value: string): boolean { return /^[\u0020-\u007f]*$/u.test(value); @@ -11,7 +11,7 @@ export function getStringLength(value: string): number { return value.length; } - splitter ??= new GraphemeSplitter(); + splitter ??= new Graphemer(); return splitter.countGraphemes(value); } diff --git a/yarn.lock b/yarn.lock index cde29eb04f36..4b2848083d41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8343,6 +8343,11 @@ grapheme-splitter@^1.0.4: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + gray-matter@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy