You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: integration of js-ipfs-repo-migrations
Integration of js-ipfs-repo-migrations brings automatic repo migrations
to ipfs-repo (both in-browser and fs). It is possible to control the
automatic migration using either config's setting
'repoDisableAutoMigration' or IPFSRepo's option 'disableAutoMigration'.
License: MIT
Signed-off-by: Adam Uhlir <[email protected]>
* Throw error when repo's version is higher then expected
License: MIT
Signed-off-by: Adam Uhlir <[email protected]>
* Tweaks
License: MIT
Signed-off-by: Adam Uhlir <[email protected]>
* fix: readme changes
* fix: tests setup
* style: lint
* fix: tweaks
* feat: automatic reversion of repo
* fix: pr feedback
* chore: update dev-dependencies
* chore: add released js-ipfs-repo-migrations
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ This is the implementation of the [IPFS repo spec](https://github.com/ipfs/specs
28
28
-[Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag)
29
29
-[Usage](#usage)
30
30
-[API](#api)
31
+
-[Notes](#notes)
31
32
-[Contribute](#contribute)
32
33
-[License](#license)
33
34
@@ -136,6 +137,7 @@ Arguments:
136
137
137
138
*`path` (string, mandatory): the path for this repo
138
139
*`options` (object, optional): may contain the following values
140
+
*`autoMigrate` (bool, defaults to `true`): controls automatic migrations of repository.
139
141
*`lock` ([Lock](#lock) or string *Deprecated*): what type of lock to use. Lock has to be acquired when opening. string can be `"fs"` or `"memory"`.
140
142
*`storageBackends` (object, optional): may contain the following values, which should each be a class implementing the [datastore interface](https://github.com/ipfs/interface-datastore#readme):
141
143
*`root` (defaults to [`datastore-fs`](https://github.com/ipfs/js-datastore-fs#readme) in Node.js and [`datastore-level`](https://github.com/ipfs/js-datastore-level#readme) in the browser). Defines the back-end type used for gets and puts of values at the root (`repo.set()`, `repo.get()`)
@@ -318,6 +320,15 @@ Returned promise resolves to a `boolean` indicating the existence of the lock.
318
320
319
321
-[Explanation of how repo is structured](https://github.com/ipfs/js-ipfs-repo/pull/111#issuecomment-279948247)
320
322
323
+
### Migrations
324
+
325
+
When there is a new repo migration and the version of repo is increased, don't
326
+
forget to propagate the changes into the test repo (`test/test-repo`).
327
+
328
+
**For tools that run mainly in the browser environment, be aware that disabling automatic
329
+
migrations leaves the user with no way to run the migrations because there is no CLI in the browser. In such
330
+
a case, you should provide a way to trigger migrations manually.**
331
+
321
332
## Contribute
322
333
323
334
There are some ways you can make this module better:
0 commit comments