Skip to content

Commit a0d195c

Browse files
Fix build
1 parent 0465d2f commit a0d195c

File tree

3 files changed

+47
-50
lines changed

3 files changed

+47
-50
lines changed

packages/firestore/src/local/memory_remote_document_cache.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ export class MemoryRemoteDocumentCache implements RemoteDocumentCache {
177177
}
178178

179179
getNewDocumentChanges(
180-
transaction: PersistenceTransaction,
181-
sinceReadTime: SnapshotVersion
180+
transaction: PersistenceTransaction,
181+
sinceReadTime: SnapshotVersion
182182
): PersistencePromise<{
183183
changedDocs: MaybeDocumentMap;
184184
readTime: SnapshotVersion;
185185
}> {
186186
throw new Error(
187-
'getNewDocumentChanges() is not supported with MemoryPersistence'
187+
'getNewDocumentChanges() is not supported with MemoryPersistence'
188188
);
189189
}
190190

packages/firestore/src/local/simple_db.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export class SimpleDb {
257257

258258
async runTransaction<T>(
259259
mode: SimpleDbTransactionMode,
260-
objectStores: string[],x
260+
objectStores: string[],
261261
transactionFn: (transaction: SimpleDbTransaction) => PersistencePromise<T>
262262
): Promise<T> {
263263
const readonly = mode.startsWith('readonly');

packages/firestore/test/unit/local/local_store.test.ts

+43-46
Original file line numberDiff line numberDiff line change
@@ -1487,54 +1487,51 @@ function genericLocalStoreTests(
14871487
// Comment back in when done with the idempotent migration.
14881488
// (queryEngine instanceof IndexFreeQueryEngine && !gcIsEager ? it : it.skip)(
14891489
// eslint-disable-next-line no-restricted-properties
1490-
it.skip(
1491-
'uses target mapping to execute queries',
1492-
() => {
1493-
// This test verifies that once a target mapping has been written, only
1494-
// documents that match the query are read from the RemoteDocumentCache.
1490+
it.skip('uses target mapping to execute queries', () => {
1491+
// This test verifies that once a target mapping has been written, only
1492+
// documents that match the query are read from the RemoteDocumentCache.
14951493

1496-
const query = Query.atPath(path('foo')).addFilter(
1497-
filter('matches', '==', true)
1498-
);
1499-
return (
1500-
expectLocalStore()
1501-
.afterAllocatingQuery(query)
1502-
.toReturnTargetId(2)
1503-
.after(setMutation('foo/a', { matches: true }))
1504-
.after(setMutation('foo/b', { matches: true }))
1505-
.after(setMutation('foo/ignored', { matches: false }))
1506-
.afterAcknowledgingMutation({ documentVersion: 10 })
1507-
.afterAcknowledgingMutation({ documentVersion: 10 })
1508-
.afterAcknowledgingMutation({ documentVersion: 10 })
1509-
.afterExecutingQuery(query)
1510-
// Execute the query, but note that we read all existing documents
1511-
// from the RemoteDocumentCache since we do not yet have target
1512-
// mapping.
1513-
.toHaveRead({ documentsByQuery: 2 })
1514-
.after(
1515-
docAddedRemoteEvent(
1516-
[
1517-
doc('foo/a', 10, { matches: true }),
1518-
doc('foo/b', 10, { matches: true })
1519-
],
1520-
[2],
1521-
[]
1522-
)
1523-
)
1524-
.after(
1525-
noChangeEvent(/* targetId= */ 2, /* snapshotVersion= */ 10, 'foo')
1526-
)
1527-
.after(localViewChanges(2, /* fromCache= */ false, {}))
1528-
.afterExecutingQuery(query)
1529-
.toHaveRead({ documentsByKey: 2, documentsByQuery: 0 })
1530-
.toReturnChanged(
1531-
doc('foo/a', 10, { matches: true }),
1532-
doc('foo/b', 10, { matches: true })
1494+
const query = Query.atPath(path('foo')).addFilter(
1495+
filter('matches', '==', true)
1496+
);
1497+
return (
1498+
expectLocalStore()
1499+
.afterAllocatingQuery(query)
1500+
.toReturnTargetId(2)
1501+
.after(setMutation('foo/a', { matches: true }))
1502+
.after(setMutation('foo/b', { matches: true }))
1503+
.after(setMutation('foo/ignored', { matches: false }))
1504+
.afterAcknowledgingMutation({ documentVersion: 10 })
1505+
.afterAcknowledgingMutation({ documentVersion: 10 })
1506+
.afterAcknowledgingMutation({ documentVersion: 10 })
1507+
.afterExecutingQuery(query)
1508+
// Execute the query, but note that we read all existing documents
1509+
// from the RemoteDocumentCache since we do not yet have target
1510+
// mapping.
1511+
.toHaveRead({ documentsByQuery: 2 })
1512+
.after(
1513+
docAddedRemoteEvent(
1514+
[
1515+
doc('foo/a', 10, { matches: true }),
1516+
doc('foo/b', 10, { matches: true })
1517+
],
1518+
[2],
1519+
[]
15331520
)
1534-
.finish()
1535-
);
1536-
}
1537-
);
1521+
)
1522+
.after(
1523+
noChangeEvent(/* targetId= */ 2, /* snapshotVersion= */ 10, 'foo')
1524+
)
1525+
.after(localViewChanges(2, /* fromCache= */ false, {}))
1526+
.afterExecutingQuery(query)
1527+
.toHaveRead({ documentsByKey: 2, documentsByQuery: 0 })
1528+
.toReturnChanged(
1529+
doc('foo/a', 10, { matches: true }),
1530+
doc('foo/b', 10, { matches: true })
1531+
)
1532+
.finish()
1533+
);
1534+
});
15381535

15391536
it('last limbo free snapshot is advanced during view processing', async () => {
15401537
// This test verifies that the `lastLimboFreeSnapshot` version for QueryData

0 commit comments

Comments
 (0)