From 8804d34d59890ee61ef4555ec7f2852ff1c9376b Mon Sep 17 00:00:00 2001 From: Samuel Meuli Date: Wed, 25 Mar 2020 13:28:27 +0100 Subject: [PATCH] Use `word-count` fork Fork is used until PRs get merged into the `word-count` upstream: - TypeScript type definitions - Fix for word counting with Cyrillic script (fixes #63) --- package.json | 2 +- src/renderer/d.ts | 5 ----- yarn.lock | 5 ++--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 243731cf..481f4466 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "remark-stringify": "^7.0.3", "semver": "^7.1.3", "strip-markdown": "^3.1.0", - "word-count": "^0.2.2" + "word-count": "github:samuelmeuli/word-count" }, "devDependencies": { "@babel/core": "^7.8.4", diff --git a/src/renderer/d.ts b/src/renderer/d.ts index 6050a30d..8c254ea7 100644 --- a/src/renderer/d.ts +++ b/src/renderer/d.ts @@ -11,8 +11,3 @@ declare module "*.svg" { declare module "markdown-draft-js"; declare module "strip-markdown"; - -// TODO: Remove once https://github.com/yuehu/word-count/pull/5 is merged -declare module "word-count" { - export default function count(data: string): number; -} diff --git a/yarn.lock b/yarn.lock index b8587a86..a6b10aa2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11029,10 +11029,9 @@ widest-line@^3.1.0: dependencies: string-width "^4.0.0" -word-count@^0.2.2: +"word-count@github:samuelmeuli/word-count": version "0.2.2" - resolved "https://registry.yarnpkg.com/word-count/-/word-count-0.2.2.tgz#699192fca6829fe936d41cb0d95db9248c570451" - integrity sha1-aZGS/KaCn+k21Byw2V25JIxXBFE= + resolved "https://codeload.github.com/samuelmeuli/word-count/tar.gz/10765b790119ff0506db73f186b01a908e146a12" word-wrap@~1.2.3: version "1.2.3"