From 4d88ee312e55fdf9c059a71b5d25e5c6fc2c3185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Mon, 19 Dec 2022 22:20:32 +0100 Subject: [PATCH] fix(i18n): use floor rounding on use time ago (#444) --- composables/i18n.ts | 1 + package.json | 4 ++-- pnpm-lock.yaml | 42 +++++++++++++++++++++--------------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/composables/i18n.ts b/composables/i18n.ts index 66c7d470..ea8a7f36 100644 --- a/composables/i18n.ts +++ b/composables/i18n.ts @@ -63,6 +63,7 @@ export const useTimeAgoOptions = (short = false): UseTimeAgoOptions => { const prefix = short ? 'short_' : '' return { + rounding: 'floor', showSecond: !short, updateInterval: short ? 60_000 : 1_000, messages: { diff --git a/package.json b/package.json index 1bdd32ab..f5d85723 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ "@unocss/nuxt": "^0.47.5", "@vitejs/plugin-vue": "^3.2.0", "@vue-macros/nuxt": "^0.1.2", - "@vueuse/integrations": "^9.6.0", - "@vueuse/nuxt": "^9.6.0", + "@vueuse/integrations": "^9.7.0", + "@vueuse/nuxt": "^9.7.0", "blurhash": "^2.0.4", "browser-fs-access": "^0.31.1", "eslint": "^8.29.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2fd38b06..15c367f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,8 +29,8 @@ specifiers: '@unocss/nuxt': ^0.47.5 '@vitejs/plugin-vue': ^3.2.0 '@vue-macros/nuxt': ^0.1.2 - '@vueuse/integrations': ^9.6.0 - '@vueuse/nuxt': ^9.6.0 + '@vueuse/integrations': ^9.7.0 + '@vueuse/nuxt': ^9.7.0 blurhash: ^2.0.4 browser-fs-access: ^0.31.1 eslint: ^8.29.0 @@ -100,8 +100,8 @@ devDependencies: '@unocss/nuxt': 0.47.5 '@vitejs/plugin-vue': 3.2.0 '@vue-macros/nuxt': 0.1.2_nuxt@3.0.0+vue-tsc@1.0.11 - '@vueuse/integrations': 9.6.0_7zhv6s73i5wtygx2wkeytrmn7q - '@vueuse/nuxt': 9.6.0_nuxt@3.0.0 + '@vueuse/integrations': 9.7.0_7zhv6s73i5wtygx2wkeytrmn7q + '@vueuse/nuxt': 9.7.0_nuxt@3.0.0 blurhash: 2.0.4 browser-fs-access: 0.31.1 eslint: 8.29.0 @@ -3417,12 +3417,12 @@ packages: resolution: {integrity: sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==} dev: true - /@vueuse/core/9.6.0: - resolution: {integrity: sha512-qGUcjKQXHgN+jqXEgpeZGoxdCbIDCdVPz3QiF1uyecVGbMuM63o96I1GjYx5zskKgRI0FKSNsVWM7rwrRMTf6A==} + /@vueuse/core/9.7.0: + resolution: {integrity: sha512-/AGY/t7jJPxCyRoVTygNKoroTiCvRaaZIW+yeSlBCnI7QRpQ9cvXNTdNaSl3GvSyFbn83+XwZwEZvI1OpQfeGw==} dependencies: '@types/web-bluetooth': 0.0.16 - '@vueuse/metadata': 9.6.0 - '@vueuse/shared': 9.6.0 + '@vueuse/metadata': 9.7.0 + '@vueuse/shared': 9.7.0 vue-demi: 0.13.11 transitivePeerDependencies: - '@vue/composition-api' @@ -3441,8 +3441,8 @@ packages: vue: 3.2.45 dev: true - /@vueuse/integrations/9.6.0_7zhv6s73i5wtygx2wkeytrmn7q: - resolution: {integrity: sha512-+rs2OWY/3spxoAGQMnlHQpxf8ErAYf4D1bT0aXaPnxphmtYgexm6KIjTFpBbcQnHwVi1g2ET1SJoQL16yDrgWA==} + /@vueuse/integrations/9.7.0_7zhv6s73i5wtygx2wkeytrmn7q: + resolution: {integrity: sha512-YWJIV+9gMQi2dGMw+x+Ocizs2/N/weQbPr71WdR6RguCvEctNbiwQt5FcKbS9KvCY7+7hdoqYF+vCL+cIXRkEg==} peerDependencies: async-validator: '*' axios: '*' @@ -3479,8 +3479,8 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 9.6.0 - '@vueuse/shared': 9.6.0 + '@vueuse/core': 9.7.0 + '@vueuse/shared': 9.7.0 focus-trap: 7.2.0 fuse.js: 6.6.2 vue-demi: 0.13.11 @@ -3489,18 +3489,18 @@ packages: - vue dev: true - /@vueuse/metadata/9.6.0: - resolution: {integrity: sha512-sIC8R+kWkIdpi5X2z2Gk8TRYzmczDwHRhEFfCu2P+XW2JdPoXrziqsGpDDsN7ykBx4ilwieS7JUIweVGhvZ93w==} + /@vueuse/metadata/9.7.0: + resolution: {integrity: sha512-M7WsAgw28FNtTH0bzsGuHEtJOPJqPpyeHS6PHq+8UesLgNjZ9waMAntiUrgUQlxt09M4i2lH7y9sRi0jkfeXGA==} dev: true - /@vueuse/nuxt/9.6.0_nuxt@3.0.0: - resolution: {integrity: sha512-r+ngzHijvrfn89KnwlFCSe/xzFCiuskwmxbDdzFtpcZ57RHqLPdUS34YYrDxt7XasM0vlD3dmLIKEH//btf7sw==} + /@vueuse/nuxt/9.7.0_nuxt@3.0.0: + resolution: {integrity: sha512-wXwg3h4AJNLB0EJzB5O7yPyDH3bCNl0dGzBVP1i2pS569TJnnUc6USZ6htbH3XXEflD3Lr0fM/0vkulOxQHHNw==} peerDependencies: - nuxt: ^3.0.0-rc.9 + nuxt: ^3.0.0 dependencies: '@nuxt/kit': 3.0.0 - '@vueuse/core': 9.6.0 - '@vueuse/metadata': 9.6.0 + '@vueuse/core': 9.7.0 + '@vueuse/metadata': 9.7.0 local-pkg: 0.4.2 nuxt: 3.0.0_s5ps7njkmjlaqajutnox5ntcla vue-demi: 0.13.11 @@ -3511,8 +3511,8 @@ packages: - vue dev: true - /@vueuse/shared/9.6.0: - resolution: {integrity: sha512-/eDchxYYhkHnFyrb00t90UfjCx94kRHxc7J1GtBCqCG4HyPMX+krV9XJgVtWIsAMaxKVU4fC8NSUviG1JkwhUQ==} + /@vueuse/shared/9.7.0: + resolution: {integrity: sha512-pwmt1y3TJ2s5KqWmkv9ZKEV59GwuZQZk8XLiU+hGswz0jej318ozbea9E4A/A50ksyM26swSFr7sZ9llNPsZHg==} dependencies: vue-demi: 0.13.11 transitivePeerDependencies: