@instantdb/core 1.0.63-branch-codex-indexeddb-explicit-commit.31419272329.1 → 1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instantdb/core",
3
- "version": "1.0.63-branch-codex-indexeddb-explicit-commit.31419272329.1",
3
+ "version": "1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1",
4
4
  "description": "Instant's core local abstraction",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/instantdb/instant/tree/main/client/packages/core",
@@ -57,7 +57,7 @@
57
57
  "dependencies": {
58
58
  "mutative": "^1.0.10",
59
59
  "uuid": "^11.1.0",
60
- "@instantdb/version": "1.0.63-branch-codex-indexeddb-explicit-commit.31419272329.1"
60
+ "@instantdb/version": "1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1"
61
61
  },
62
62
  "msw": {
63
63
  "workerDirectory": [
@@ -144,11 +144,6 @@ async function upgrade5To6(appId: string, v6Db: IDBDatabase): Promise<void> {
144
144
 
145
145
  const kvStore = v6Tx.objectStore('kv');
146
146
  const querySubStore = v6Tx.objectStore('querySubs');
147
- const transactionDone = new Promise((resolve, reject) => {
148
- v6Tx.oncomplete = (e) => resolve(e);
149
- v6Tx.onerror = (e) => reject(e);
150
- v6Tx.onabort = (e) => reject(e);
151
- });
152
147
 
153
148
  const promises: Promise<any>[] = [];
154
149
  const kvMeta: Meta<string> = { objects: {} };
@@ -174,8 +169,12 @@ async function upgrade5To6(appId: string, v6Db: IDBDatabase): Promise<void> {
174
169
  }
175
170
  const p = moveKvEntry5To6(META_KEY, kvMeta, kvStore);
176
171
  promises.push(p);
177
- v6Tx.commit?.();
178
- await Promise.all([Promise.all(promises), transactionDone]);
172
+ await Promise.all(promises);
173
+ await new Promise((resolve, reject) => {
174
+ v6Tx.oncomplete = (e) => resolve(e);
175
+ v6Tx.onerror = (e) => reject(e);
176
+ v6Tx.onabort = (e) => reject(e);
177
+ });
179
178
  }
180
179
 
181
180
  // We create many IndexedDBStorage instances that talk to the same