Skip to content

Commit 75acbda

Browse files
committed
AI feedback
1 parent d83626e commit 75acbda

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎demos/react-supabase-todolist/src/components/providers/SystemProvider.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type QueryStore = {
4141
* Whether to use [checkpoint requests](https://docs.powersync.com/client-sdks/advanced/checkpoint-requests) to add an
4242
* explicit sync button to this demo.
4343
*/
44-
export const useCheckpointRequests = import.meta.env.VITE_USE_POWERSYNC_CHECKPOINT_REQUESTS;
44+
export const useCheckpointRequests = import.meta.env.VITE_USE_POWERSYNC_CHECKPOINT_REQUESTS == 'true';
4545

4646
export const syncOptions: SyncOptions = {
4747
appMetadata: {

‎packages/common/etc/common.api.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export type CheckpointMode = 'legacy' | 'requests' | {
261261

262262
// @alpha
263263
export interface CheckpointRequest {
264-
readonly hasSyned: boolean;
264+
readonly hasSynced: boolean;
265265
waitForSync(options?: {
266266
signal?: AbortSignal;
267267
}): Promise<void>;

‎packages/common/src/client/sync/CheckpointRequest.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface CheckpointRequest {
1818
/**
1919
* Whether this checkpoint request has synced before.
2020
*/
21-
readonly hasSyned: boolean;
21+
readonly hasSynced: boolean;
2222

2323
/**
2424
* Waits until this checkpoint has been synced locally.

‎packages/node/tests/sync.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ describe('Sync', () => {
233233

234234
const checkpoint = await db.requestCheckpoint();
235235
syncService.pushLine({ checkpoint: { last_op_id: '0', buckets: [], write_checkpoint: '2' } });
236-
expect(checkpoint.hasSyned).toBeFalsy();
236+
expect(checkpoint.hasSynced).toBeFalsy();
237237
syncService.pushLine({ checkpoint_complete: { last_op_id: '0' } });
238238

239239
await checkpoint.waitForSync();
240-
expect(checkpoint.hasSyned).toBeTruthy();
240+
expect(checkpoint.hasSynced).toBeTruthy();
241241
});
242242

243243
mockSyncServiceTest('throws on disconnect but can request again', async ({ syncService }) => {

‎packages/shared-internals/src/client/ConnectionManager.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class ConnectionManager extends BaseObserver<ConnectionManagerListener> {
100100
*/
101101
protected pendingConnectionOptions: StoredConnectionOptions | null;
102102

103-
protected currentOptions: ResolvedSyncOptions | null;
103+
private currentOptions: ResolvedSyncOptions | null;
104104

105105
syncStreamImplementation: StreamingSyncImplementation | null;
106106

‎packages/shared-internals/src/client/sync/CheckpointRequestImpl.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export class CheckpointRequestImpl implements CheckpointRequest {
1313
private readonly database: BasePowerSyncDatabase
1414
) {}
1515

16-
get hasSyned(): boolean {
16+
get hasSynced(): boolean {
1717
const status = this.database.currentStatus.core;
1818
return isCheckpointRequestApplied(status, this.requestId);
1919
}
2020

2121
async waitForSync(options?: { signal?: AbortSignal }): Promise<void> {
22-
if (this.hasSyned) return;
22+
if (this.hasSynced) return;
2323

2424
const signal = options?.signal;
2525
const manager = this.database.connectionManager;

0 commit comments

Comments
 (0)