docs: update indexeddb document (#4084)

This commit is contained in:
Alex Yang
2023-08-31 17:16:27 -05:00
committed by GitHub
parent b18596fc57
commit 06d5ecd597
5 changed files with 10 additions and 6 deletions

View File

@@ -32,3 +32,7 @@ downloadBinary(yDoc.guid).then(blob => {
} }
}); });
``` ```
## LICENSE
[MPL-2.0](https://github.com/toeverything/AFFiNE/blob/master/LICENSE-MPL2.0)

View File

@@ -5,6 +5,7 @@
"description": "IndexedDB database adapter for Yjs", "description": "IndexedDB database adapter for Yjs",
"repository": "toeverything/AFFiNE", "repository": "toeverything/AFFiNE",
"author": "toeverything", "author": "toeverything",
"license": "MPL-2.0",
"keywords": [ "keywords": [
"indexeddb", "indexeddb",
"yjs", "yjs",
@@ -44,6 +45,6 @@
"y-indexeddb": "^9.0.11" "y-indexeddb": "^9.0.11"
}, },
"peerDependencies": { "peerDependencies": {
"yjs": "^13.5.51" "yjs": "^13"
} }
} }

View File

@@ -129,10 +129,6 @@ export const getMilestones = async (
return milestone.milestone; return milestone.milestone;
}; };
/**
* We use `doc.guid` as the unique key, please make sure it not changes.
*/
export * from './provider'; export * from './provider';
export * from './shared'; export * from './shared';
export * from './utils'; export * from './utils';

View File

@@ -105,6 +105,9 @@ export const createIndexedDBDatasource = ({
}; };
}; };
/**
* We use `doc.guid` as the unique key, please make sure it not changes.
*/
export const createIndexedDBProvider = ( export const createIndexedDBProvider = (
doc: Doc, doc: Doc,
dbName: string = DEFAULT_DB_NAME dbName: string = DEFAULT_DB_NAME

View File

@@ -12769,7 +12769,7 @@ __metadata:
vite-plugin-dts: 3.5.2 vite-plugin-dts: 3.5.2
y-indexeddb: ^9.0.11 y-indexeddb: ^9.0.11
peerDependencies: peerDependencies:
yjs: ^13.5.51 yjs: ^13
languageName: unknown languageName: unknown
linkType: soft linkType: soft