Skip to content

Commit 186dc0e

Browse files
committed
chore: up lru cache
1 parent a85eddc commit 186dc0e

File tree

5 files changed

+55
-92
lines changed

5 files changed

+55
-92
lines changed

packages/nuxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"dependencies": {
4040
"@nuxt/kit": "^3.0.0",
41-
"lru-cache": "^7.17.0"
41+
"lru-cache": "^10.0.0"
4242
},
4343
"peerDependencies": {
4444
"@firebase/app-types": ">=0.8.1",

packages/nuxt/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"nuxt": "^3.0.0"
1212
},
1313
"dependencies": {
14-
"@firebase/app-types": "^0.8.1",
14+
"@firebase/app-types": "^0.9.0",
1515
"firebase": "^9.23.0",
1616
"nuxt-vuefire": "workspace:*",
1717
"vuefire": "workspace:*"

packages/nuxt/src/runtime/app/plugin.server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { deleteApp, FirebaseApp, initializeApp } from 'firebase/app'
22
import type { User } from 'firebase/auth'
3-
import LRU from 'lru-cache'
4-
import { defineNuxtPlugin, useAppConfig } from '#app'
3+
import { LRUCache } from 'lru-cache'
54
import { log } from '../logging'
65
import { UserSymbol } from '../constants'
6+
import { defineNuxtPlugin, useAppConfig } from '#app'
77

88
// TODO: allow customizing
99
// TODO: find sensible defaults. Should they change depending on the platform?
1010
// copied from https://github.com/FirebaseExtended/firebase-framework-tools/blob/e69f5bdd44695274ad88dbb4e21aac778ba60cc8/src/constants.ts
1111
export const LRU_MAX_INSTANCES = 100
1212
export const LRU_TTL = 1_000 * 60 * 5
13-
const appCache = new LRU<string, FirebaseApp>({
13+
const appCache = new LRUCache<string, FirebaseApp>({
1414
max: LRU_MAX_INSTANCES,
1515
ttl: LRU_TTL,
1616
allowStale: true,

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"vuex": "^4.1.0"
1919
},
2020
"devDependencies": {
21-
"@firebase/app-types": "^0.8.1",
21+
"@firebase/app-types": "^0.9.0",
2222
"@types/node": "^18.16.19",
2323
"@vitejs/plugin-vue": "^4.2.3",
2424
"@vue/tsconfig": "^0.4.0",

0 commit comments

Comments
 (0)