Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit 4c918fc

Browse files
authored
fix: update interface-store to 5.x.x (#100)
1 parent 49aa042 commit 4c918fc

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@
145145
},
146146
"dependencies": {
147147
"idb": "^7.1.1",
148-
"interface-datastore": "^8.0.0",
148+
"interface-datastore": "^8.1.2",
149149
"it-filter": "^2.0.1",
150150
"it-sort": "^2.0.1"
151151
},
152152
"devDependencies": {
153153
"aegir": "^38.1.7",
154-
"datastore-core": "^9.0.2",
155-
"interface-datastore-tests": "^4.0.0"
154+
"datastore-core": "^9.0.4",
155+
"interface-datastore-tests": "^5.0.0"
156156
}
157157
}

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ export class IDBDatastore extends BaseDatastore {
4646
this.db?.close()
4747
}
4848

49-
async put (key: Key, val: Uint8Array): Promise<void> {
49+
async put (key: Key, val: Uint8Array): Promise<Key> {
5050
if (this.db == null) {
5151
throw new Error('Datastore needs to be opened.')
5252
}
5353

5454
try {
5555
await this.db.put(this.location, val, key.toString())
56+
57+
return key
5658
} catch (err: any) {
5759
throw Errors.dbWriteFailedError(err)
5860
}

test/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('IndexedDB Datastore', function () {
4646
datastore: three
4747
}
4848
])
49-
await d.open()
49+
5050
return d
5151
},
5252
teardown () {

0 commit comments

Comments
 (0)