Skip to content

Commit

Permalink
Merge branch 'v11' into ch-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Sep 17, 2024
2 parents fed48f8 + a377fb2 commit 9d327c9
Show file tree
Hide file tree
Showing 36 changed files with 109 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"private": true,
"engines": {
"node": "16"
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@
"webpack": "5.76.0",
"webpack-cli": "4.10.0",
"webpack-dev-server": "4.11.1"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
},
"devDependencies": {
"typescript": "4.7.4"
},
"engines": {
"node": ">=18.0.0"
}
}
5 changes: 4 additions & 1 deletion integration/compat-typings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
},
"devDependencies": {
"typescript": "4.7.4"
},
"engines": {
"node": ">=18.0.0"
}
}
}
3 changes: 3 additions & 0 deletions integration/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"mocha": "9.2.2",
"npm-run-all": "4.1.5",
"typescript": "4.7.4"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions integration/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@
"typescript": "4.2.2",
"webpack": "5.76.0",
"webpack-stream": "7.0.0"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions integration/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"mocha": "9.2.2",
"undici": "6.19.7",
"selenium-assistant": "6.1.1"
},
"engines": {
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
"license": "Apache-2.0",
"engines": {
"node": "^8.13.0 || >=10.10.0"
"node": ">=18.0.0"
},
"homepage": "https://github.com/firebase/firebase-js-sdk",
"keywords": [
Expand Down
3 changes: 3 additions & 0 deletions packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/app-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/app-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/auth-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
5 changes: 4 additions & 1 deletion packages/auth/internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"browser": "../dist/esm2017/internal.js",
"esm5": "../dist/esm5/internal.js",
"typings": "../dist/esm5/internal/index.d.ts",
"private": true
"private": true,
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/database-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@
},
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/firestore-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@
},
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"engines": {
"node": ">=18.0.0"
}
}
5 changes: 4 additions & 1 deletion packages/firestore/lite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"react-native": "../dist/lite/index.rn.esm2017.js",
"esm5": "../dist/lite/index.browser.esm5.js",
"typings": "../dist/lite/index.d.ts",
"private": true
"private": true,
"engines": {
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@firebase/firestore",
"version": "4.7.0",
"engines": {
"node": ">=10.10.0"
"node": ">=18.0.0"
},
"description": "The Cloud Firestore component of the Firebase JS SDK.",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
Expand Down
4 changes: 3 additions & 1 deletion packages/firestore/src/api/cache_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class MemoryLocalCacheImpl implements MemoryLocalCache {
this._offlineComponentProvider =
settings.garbageCollector._offlineComponentProvider;
} else {
this._offlineComponentProvider = new MemoryOfflineComponentProvider();
this._offlineComponentProvider = new LruGcMemoryOfflineComponentProvider(
undefined
);
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/firestore/src/core/firestore_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import { Aggregate } from './aggregate';
import { NamedQuery } from './bundle';
import {
ComponentConfiguration,
LruGcMemoryOfflineComponentProvider,
MemoryOfflineComponentProvider,
OfflineComponentProvider,
OnlineComponentProvider
Expand Down Expand Up @@ -339,7 +340,7 @@ async function ensureOfflineComponents(
logDebug(LOG_TAG, 'Using default OfflineComponentProvider');
await setOfflineComponentProvider(
client,
new MemoryOfflineComponentProvider()
new LruGcMemoryOfflineComponentProvider(undefined)
);
}
}
Expand Down
13 changes: 13 additions & 0 deletions packages/firestore/test/integration/api/database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2212,4 +2212,17 @@ apiDescribe('Database', persistence => {
});
});
});

it('Lru GC is enabled by default.', () => {
const initialData = { key: 'value' };
return withTestDb(persistence, async db => {
const docRef = doc(collection(db, 'test-collection'));
await setDoc(docRef, initialData);
return getDocFromCache(docRef).then(doc => {
expect(doc.exists()).to.be.true;
expect(doc.metadata.fromCache).to.be.true;
expect(doc.data()).to.deep.equal(initialData);
});
});
});
});
4 changes: 1 addition & 3 deletions packages/firestore/test/integration/util/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ function apiDescribeInternal(
message: string,
testSuite: (persistence: PersistenceMode) => void
): void {
const persistenceModes: PersistenceMode[] = [
new MemoryEagerPersistenceMode()
];
const persistenceModes: PersistenceMode[] = [new MemoryLruPersistenceMode()];
if (isPersistenceAvailable()) {
persistenceModes.push(new IndexedDbPersistenceMode());
}
Expand Down
3 changes: 3 additions & 0 deletions packages/functions-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/rules-unit-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"./package.json": "./package.json"
},
"engines": {
"node": ">=10.10.0"
"node": ">=18.0.0"
},
"files": [
"dist"
Expand Down
3 changes: 3 additions & 0 deletions packages/storage-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,8 @@
},
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"engines": {
"node": ">=18.0.0"
}
}
5 changes: 4 additions & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,8 @@
"bugs": {
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"typings": "dist/src/index.d.ts"
"typings": "dist/src/index.d.ts",
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions repo-scripts/api-documenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
"@types/js-yaml": "4.0.9",
"@types/resolve": "1.20.6",
"mocha-chai-jest-snapshot": "1.1.3"
},
"engines": {
"node": ">=18.0.0"
}
}
3 changes: 3 additions & 0 deletions repo-scripts/changelog-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}
2 changes: 1 addition & 1 deletion repo-scripts/prune-dts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"engines": {
"node": "^8.13.0 || >=10.10.0"
"node": ">=18.0.0"
},
"description": "A script to prune non-exported types from a d.ts.",
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
Expand Down
3 changes: 3 additions & 0 deletions repo-scripts/size-analysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@
".ts"
],
"reportDir": "./coverage/node"
},
"engines": {
"node": ">=18.0.0"
}
}

0 comments on commit 9d327c9

Please sign in to comment.