Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/libsql-client-wasm/src/wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export class Sqlite3Client implements Client {
}
}

/** @deprecated sync() is deprecated and will be removed in a future release. Use `@tursodatabase/sync` instead. Learn more: https://tur.so/newsync */
async sync(): Promise<Replicated> {
throw new LibsqlError(
"sync not supported in wasm mode",
Expand Down
1 change: 1 addition & 0 deletions packages/libsql-client/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export class HttpClient implements Client {
});
}

/** @deprecated sync() is deprecated and will be removed in a future release. Use `@tursodatabase/sync` instead. Learn more: https://tur.so/newsync */
sync(): Promise<Replicated> {
throw new LibsqlError(
"sync not supported in http mode",
Expand Down
7 changes: 7 additions & 0 deletions packages/libsql-client/src/sqlite3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {

export * from "@libsql/core/api";

let _syncDeprecationWarned = false;

export function createClient(config: Config): Client {
return _createClient(expandConfig(config, true));
}
Expand Down Expand Up @@ -255,7 +257,12 @@ export class Sqlite3Client implements Client {
}
}

/** @deprecated sync() is deprecated and will be removed in a future release. Use `@tursodatabase/sync` instead. Learn more: https://tur.so/newsync */
async sync(): Promise<Replicated> {
if (!_syncDeprecationWarned) {
console.warn("libSQL: sync() is deprecated and will be removed in a future release. Use `@tursodatabase/sync` instead. Learn more: https://tur.so/newsync");
_syncDeprecationWarned = true;
}
this.#checkNotClosed();
const rep = await this.#getDb().sync();
return {
Expand Down
1 change: 1 addition & 0 deletions packages/libsql-client/src/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export class WsClient implements Client {
});
}

/** @deprecated sync() is deprecated and will be removed in a future release. Use `@tursodatabase/sync` instead. Learn more: https://tur.so/newsync */
sync(): Promise<Replicated> {
throw new LibsqlError(
"sync not supported in ws mode",
Expand Down
1 change: 1 addition & 0 deletions packages/libsql-core/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export interface Client {
*/
executeMultiple(sql: string): Promise<void>;

/** @deprecated sync() is deprecated and will be removed in a future release. Use `@tursodatabase/sync` instead. Learn more: https://tur.so/newsync */
sync(): Promise<Replicated>;

/** Close the client and release resources.
Expand Down
Loading