@finema/finework-layer 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.18](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.17...0.2.18) (2025-10-20)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **auth:** handle missing timestamp in cache expiration check ([90fe085](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/90fe08598b92e0c1f6f2e8da2db65c7397a8cf67))
8
+
9
+ ## [0.2.17](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.16...0.2.17) (2025-10-20)
10
+
3
11
  ## [0.2.16](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.15...0.2.16) (2025-10-20)
4
12
 
5
13
  ### Performance Improvements
@@ -82,10 +82,10 @@ export const useAuth = () => {
82
82
  }
83
83
 
84
84
  const isShouldFetch = computed(() => {
85
- if (!value.value) return true
85
+ if (!value.value || !timestamp.value) return true
86
86
 
87
- // expire 1 mins
88
- return !timestamp.value || timestamp.value < Date.now() - 1000 * 60 * 1
87
+ // expire after 1 min - fetch if timestamp is older than 1 minute ago
88
+ return Date.now() - timestamp.value > 1000 * 60 * 1
89
89
  })
90
90
 
91
91
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "0.2.16",
4
+ "version": "0.2.18",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",