From 0e754c8abf7f0428ecb63af428f9e33c30c40546 Mon Sep 17 00:00:00 2001 From: aliceoq Date: Mon, 15 Jan 2024 14:42:20 -0300 Subject: [PATCH 1/2] chore(package.json): update components lib version --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 74416a40..f94c8812 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@types/probe-image-size": "^7.2.0", "@types/uuid": "^9.0.0", "@vtex/brand-ui": "^0.46.1", - "@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.2.0", + "@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.4.0", "algoliasearch": "^4.14.2", "chalk": "^5.2.0", "copy-text-to-clipboard": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 445ced7f..2bbd9e0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3091,9 +3091,9 @@ resolved "https://registry.npmjs.org/@vtex/tsconfig/-/tsconfig-0.6.0.tgz" integrity sha512-SVQBxaSdEVdpJFja1aVTIiZBgpQKePyYOUWGzcYq6LYkSWqSbz2LoC7TuLUsmfweYmVkv8+4eVuxcDpQVEpq1A== -"@vtexdocs/components@https://github.com/vtexdocs/components.git#v1.2.0": - version "1.2.0" - resolved "https://github.com/vtexdocs/components.git#6d0937897665f590eb696a13f9d2c64029f73773" +"@vtexdocs/components@https://github.com/vtexdocs/components.git#v1.4.0": + version "1.4.0" + resolved "https://github.com/vtexdocs/components.git#8e2715b6df1538279cb23302a05f9d7f8719d40b" dependencies: "@code-hike/mdx" "^0.9.0" "@vtex/brand-ui" "^0.46.1" From 3088f68a78f8c08ff0f08e0f52636c5c283a560b Mon Sep 17 00:00:00 2001 From: aliceoq Date: Mon, 15 Jan 2024 14:56:03 -0300 Subject: [PATCH 2/2] fix: use ceil to round reading time --- src/utils/remark_plugins/remarkReadingTime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/remark_plugins/remarkReadingTime.ts b/src/utils/remark_plugins/remarkReadingTime.ts index 047493c7..9ec4b026 100644 --- a/src/utils/remark_plugins/remarkReadingTime.ts +++ b/src/utils/remark_plugins/remarkReadingTime.ts @@ -6,6 +6,6 @@ export function remarkReadingTime() { return function (tree: Node, file: any) { const textOnPage = toString(tree) const readingTime = getReadingTime(textOnPage) - file.data.matter['readingTime'] = Math.round(readingTime.minutes) + file.data.matter['readingTime'] = Math.ceil(readingTime.minutes) } }