Skip to content

Commit 4608d80

Browse files
[AUTOMATED]: Prettier Code Styling
1 parent bdac12d commit 4608d80

File tree

6 files changed

+31
-31
lines changed

6 files changed

+31
-31
lines changed

packages/firestore/src/local/indexeddb_persistence.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,7 @@ export class IndexedDbPersistence implements Persistence {
422422
return false;
423423
} else if (updateTimeMs > maxAcceptable) {
424424
log.error(
425-
`Detected an update time that is in the future: ${updateTimeMs} > ${
426-
maxAcceptable
427-
}`
425+
`Detected an update time that is in the future: ${updateTimeMs} > ${maxAcceptable}`
428426
);
429427
return false;
430428
}

packages/firestore/src/local/indexeddb_schema.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function createOrUpgradeDb(
6262

6363
if (fromVersion < 2 && toVersion >= 2) {
6464
p = ensureTargetGlobalExists(txn).next(targetGlobal =>
65-
saveTargetCount(txn, targetGlobal)
65+
saveTargetCount(txn, targetGlobal)
6666
);
6767
}
6868

@@ -517,11 +517,11 @@ function createQueryCache(db: IDBDatabase): void {
517517
* global singleton.
518518
*/
519519
function saveTargetCount(
520-
txn: SimpleDbTransaction,
521-
metadata: DbTargetGlobal
520+
txn: SimpleDbTransaction,
521+
metadata: DbTargetGlobal
522522
): PersistencePromise<void> {
523523
const globalStore = txn.store<DbTargetGlobalKey, DbTargetGlobal>(
524-
DbTargetGlobal.store
524+
DbTargetGlobal.store
525525
);
526526
const targetStore = txn.store<DbTargetKey, DbTarget>(DbTarget.store);
527527
return targetStore.count().next(count => {
@@ -537,24 +537,24 @@ function saveTargetCount(
537537
* @param {IDBTransaction} txn The version upgrade transaction for indexeddb
538538
*/
539539
function ensureTargetGlobalExists(
540-
txn: SimpleDbTransaction
540+
txn: SimpleDbTransaction
541541
): PersistencePromise<DbTargetGlobal> {
542542
const globalStore = txn.store<DbTargetGlobalKey, DbTargetGlobal>(
543-
DbTargetGlobal.store
543+
DbTargetGlobal.store
544544
);
545545
return globalStore.get(DbTargetGlobal.key).next(metadata => {
546-
if (metadata != null) {
547-
return PersistencePromise.resolve(metadata);
548-
} else {
549-
metadata = new DbTargetGlobal(
550-
/*highestTargetId=*/ 0,
551-
/*lastListenSequenceNumber=*/ 0,
552-
SnapshotVersion.MIN.toTimestamp(),
553-
/*targetCount=*/ 0
554-
);
555-
return globalStore.put(DbTargetGlobal.key, metadata).next(() => metadata);
556-
}
557-
});
546+
if (metadata != null) {
547+
return PersistencePromise.resolve(metadata);
548+
} else {
549+
metadata = new DbTargetGlobal(
550+
/*highestTargetId=*/ 0,
551+
/*lastListenSequenceNumber=*/ 0,
552+
SnapshotVersion.MIN.toTimestamp(),
553+
/*targetCount=*/ 0
554+
);
555+
return globalStore.put(DbTargetGlobal.key, metadata).next(() => metadata);
556+
}
557+
});
558558
}
559559

560560
/**

packages/firestore/src/util/async_queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export enum TimerId {
5656
* A timer used to update the client metadata in IndexedDb, which is used
5757
* to determine the primary leaseholder.
5858
*/
59-
ClientMetadataRefresh = 'client_metadata_refresh',
59+
ClientMetadataRefresh = 'client_metadata_refresh'
6060
}
6161

6262
/**

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ import {
2121
createOrUpgradeDb,
2222
DbTarget,
2323
DbTargetGlobal,
24-
DbTargetGlobalKey, V1_STORES, V2_STORES
24+
DbTargetGlobalKey,
25+
V1_STORES,
26+
V2_STORES
2527
} from '../../../src/local/indexeddb_schema';
2628
import { SimpleDb, SimpleDbTransaction } from '../../../src/local/simple_db';
2729
import { PersistencePromise } from '../../../src/local/persistence_promise';
28-
import {asyncQueue} from '../../integration/util/internal_helpers';
30+
import { asyncQueue } from '../../integration/util/internal_helpers';
2931

3032
const INDEXEDDB_TEST_DATABASE = 'schemaTest';
3133

@@ -143,10 +145,10 @@ describe('IndexedDbSchema: createOrUpgradeDb', () => {
143145

144146
it('can upgrade from schema version 2 to 3', () => {
145147
return withDb(2, async () => {}).then(() =>
146-
withDb(3, async db => {
147-
expect(db.version).to.be.equal(3);
148-
expect(getAllObjectStores(db)).to.have.members(ALL_STORES);
149-
})
148+
withDb(3, async db => {
149+
expect(db.version).to.be.equal(3);
150+
expect(getAllObjectStores(db)).to.have.members(ALL_STORES);
151+
})
150152
);
151153
});
152154
});

packages/firestore/test/unit/specs/persistence_spec.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { doc, path } from '../../util/helpers';
2020

2121
import { describeSpec, specTest } from './describe_spec';
2222
import { client, spec } from './spec_builder';
23-
import {TimerId} from '../../../src/util/async_queue';
23+
import { TimerId } from '../../../src/util/async_queue';
2424

2525
describeSpec('Persistence:', [], () => {
2626
specTest('Local mutations are persisted and re-sent', [], () => {
@@ -223,7 +223,7 @@ describeSpec('Persistence:', [], () => {
223223
.runTimer(TimerId.ClientMetadataRefresh)
224224
.expectPrimaryState(false)
225225
.client(2)
226-
.runTimer(TimerId.ClientMetadataRefresh)
226+
.runTimer(TimerId.ClientMetadataRefresh)
227227
.expectPrimaryState(true)
228228
);
229229
});

packages/firestore/test/unit/specs/spec_builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class SpecBuilder {
209209
becomeVisible(): SpecBuilder {
210210
this.nextStep();
211211
this.currentStep = {
212-
applyClientState: {visibility: 'visible'}
212+
applyClientState: { visibility: 'visible' }
213213
};
214214
return this;
215215
}

0 commit comments

Comments
 (0)