Skip to content

Commit c559e03

Browse files
committed
Pretty
1 parent 13622ea commit c559e03

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

packages/firestore/src/local/globals_cache.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { PersistenceTransaction } from './persistence_transaction';
19-
import { PersistencePromise } from './persistence_promise';
2018
import { ByteString } from '../util/byte_string';
2119

20+
import { PersistencePromise } from './persistence_promise';
21+
import { PersistenceTransaction } from './persistence_transaction';
22+
2223
/**
2324
* General purpose cache for global values.
2425
*

packages/firestore/src/local/indexeddb_globals_cache.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
* limitations under the License.
1616
*/
1717
import { ByteString } from '../util/byte_string';
18+
1819
import { GlobalsCache } from './globals_cache';
20+
import { DbGlobals } from './indexeddb_schema';
21+
import { DbGlobalsStore, DbGlobalsKey } from './indexeddb_sentinels';
22+
import { getStore } from './indexeddb_transaction';
1923
import { PersistencePromise } from './persistence_promise';
2024
import { PersistenceTransaction } from './persistence_transaction';
2125
import { SimpleDbStore } from './simple_db';
22-
import { DbGlobalsStore, DbGlobalsKey } from './indexeddb_sentinels';
23-
import { DbGlobals } from './indexeddb_schema';
24-
import { getStore } from './indexeddb_transaction';
2526

2627
export class IndexedDbGlobalsCache implements GlobalsCache {
2728
private globalsStore(

packages/firestore/src/local/indexeddb_persistence.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ import { DocumentLike, WindowLike } from '../util/types';
2929

3030
import { BundleCache } from './bundle_cache';
3131
import { DocumentOverlayCache } from './document_overlay_cache';
32+
import { GlobalsCache } from './globals_cache';
3233
import { IndexManager } from './index_manager';
3334
import { IndexedDbBundleCache } from './indexeddb_bundle_cache';
3435
import { IndexedDbDocumentOverlayCache } from './indexeddb_document_overlay_cache';
36+
import { IndexedDbGlobalsCache } from './indexeddb_globals_cache';
3537
import { IndexedDbIndexManager } from './indexeddb_index_manager';
3638
import { IndexedDbLruDelegateImpl } from './indexeddb_lru_delegate_impl';
3739
import { IndexedDbMutationQueue } from './indexeddb_mutation_queue';
@@ -69,8 +71,6 @@ import {
6971
SimpleDb,
7072
SimpleDbStore
7173
} from './simple_db';
72-
import { IndexedDbGlobalsCache } from './indexeddb_globals_cache';
73-
import { GlobalsCache } from './globals_cache';
7474

7575
const LOG_TAG = 'IndexedDbPersistence';
7676

packages/firestore/src/local/memory_globals_cache.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* limitations under the License.
1616
*/
1717
import { ByteString } from '../util/byte_string';
18+
1819
import { GlobalsCache } from './globals_cache';
1920
import { PersistencePromise } from './persistence_promise';
2021
import { PersistenceTransaction } from './persistence_transaction';

packages/firestore/src/local/memory_persistence.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { ObjectMap } from '../util/obj_map';
2929

3030
import { DocumentOverlayCache } from './document_overlay_cache';
3131
import { encodeResourcePath } from './encoded_resource_path';
32+
import { GlobalsCache } from './globals_cache';
3233
import { IndexManager } from './index_manager';
3334
import { LocalSerializer } from './local_serializer';
3435
import {
@@ -40,6 +41,7 @@ import {
4041
import { newLruGarbageCollector } from './lru_garbage_collector_impl';
4142
import { MemoryBundleCache } from './memory_bundle_cache';
4243
import { MemoryDocumentOverlayCache } from './memory_document_overlay_cache';
44+
import { MemoryGlobalsCache } from './memory_globals_cache';
4345
import { MemoryIndexManager } from './memory_index_manager';
4446
import { MemoryMutationQueue } from './memory_mutation_queue';
4547
import {
@@ -56,8 +58,6 @@ import {
5658
} from './persistence_transaction';
5759
import { ReferenceSet } from './reference_set';
5860
import { TargetData } from './target_data';
59-
import { GlobalsCache } from './globals_cache';
60-
import { MemoryGlobalsCache } from './memory_globals_cache';
6161

6262
const LOG_TAG = 'MemoryPersistence';
6363
/**

packages/firestore/src/local/persistence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { DocumentKey } from '../model/document_key';
2121

2222
import { BundleCache } from './bundle_cache';
2323
import { DocumentOverlayCache } from './document_overlay_cache';
24+
import { GlobalsCache } from './globals_cache';
2425
import { IndexManager } from './index_manager';
2526
import { MutationQueue } from './mutation_queue';
2627
import { PersistencePromise } from './persistence_promise';
@@ -31,7 +32,6 @@ import {
3132
import { RemoteDocumentCache } from './remote_document_cache';
3233
import { TargetCache } from './target_cache';
3334
import { TargetData } from './target_data';
34-
import { GlobalsCache } from './globals_cache';
3535

3636
/**
3737
* Callback type for primary state notifications. This callback can be

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717

1818
import { expect } from 'chai';
1919

20-
import * as persistenceHelpers from './persistence_test_helpers';
2120
import { IndexedDbPersistence } from '../../../src/local/indexeddb_persistence';
2221
import { Persistence } from '../../../src/local/persistence';
23-
import { TestGlobalsCache } from './test_globals_cache';
24-
import { ByteString } from '../../../src/util/byte_string';
2522
import { encodeBase64 } from '../../../src/platform/base64';
23+
import { ByteString } from '../../../src/util/byte_string';
24+
25+
import * as persistenceHelpers from './persistence_test_helpers';
26+
import { TestGlobalsCache } from './test_globals_cache';
2627

2728
let persistence: Persistence;
2829

@@ -71,13 +72,13 @@ function genericGlobalsTests(): void {
7172
const token = ByteString.fromBase64String(encodeBase64('theToken'));
7273

7374
await cache.setSessionToken(token);
74-
let result = await cache.getSessionToken();
75+
const result = await cache.getSessionToken();
7576
expect(result.isEqual(token)).to.be.true;
7677
});
7778

7879
it('returns empty session token that was previously saved', async () => {
7980
await cache.setSessionToken(ByteString.EMPTY_BYTE_STRING);
80-
let result = await cache.getSessionToken();
81+
const result = await cache.getSessionToken();
8182
expect(result.isEqual(ByteString.EMPTY_BYTE_STRING)).to.be.true;
8283
});
8384
}

0 commit comments

Comments
 (0)