Releases: sosuisen/git-documentdb
Releases · sosuisen/git-documentdb
[v0.3.0] Automated synchronization and conflict resolution with GitHub
Features
-
Added sync methods to GitDocumentDB
- sync(remoteURL, options) Synchronize with a remote repository
- getSynchronizer(remoteURL)
- getRemoteURLs()
- unregisterRemote(remoteURL)
-
Added Sync Class
- on(event, callback) Add SyncEvent handler
- off(event, callback) Remove SyncEvent handler
- pause() Pause synchronization
- resume(options) Resume synchronization
- tryPush(options) Try to push with retries
- trySync() Try to sync with retries
-
You can find examples in examples/src/sync.ts
-
Added revisions (Get back number of documents)
- get(docId, backNumber)
- getByRevision(fileSHA) Get a specific revision of a document
- getDocHistory(docID) Get revision history of a file from new to old
- getDocWithMetaData(docId, backNumber) Get a document with metadata(file_sha)
-
Added operational transformation for merging documents
-
Added insert() method to create a document if not exists.
-
Added update() method to update a document if exists.
Breaking changes
- get() and getByRevision() return undefined instead of throwing error.
- Renamed create() to createDB()
- Renamed statistics() to currentStatistics()
[v0.2.9] Add prefix search
Features
- Added prefix search (since 0.2.8)
- See README.md and examples/
Breaking changes
- collection_path option for allDocs() is removed. Use prefix instead.
- default of recursive options for allDocs() is changed from false to true.
[v0.2.6] Passed tests on Windows10, macOS Catalina and Ubuntu18
build: v0.2.6, pass tests on Windows10, macOS Catalina and Ubuntu18
[v0.2.5] Add overload method to put() to allow _id for the first argument
Features
- Added overload method to put() to allow _id for the first argument
Breaking changes
- sub_directory option of allDoc() has been removed. Use collection_path option instead.
- collection_path options of put(), get(), remove() have been removed. Just use Collection Class.
[v0.2.3] Use human-readable JSON
Breaking changes
For Git users
- feat!: save JSON document by using human-readable format
[v0.2.2] Fix a bug
Fix
- Allowed ¥ character in local_dir
[v0.2.1] Add Collection API
Features
- Added Collection API. Documents are gathered together in collections.
- More compatible APIs with PouchDB
- Changed local_dir (former localDir) to be optional.
- Allow more kinds of characters for db_name, local_dir and _id.
- Added remove() method. delete() method is now just an alias of remove().
- Added options for using Collection in put(), get(), remove() and allDocs().
For Git users
- Added commit message option to change commit message.
Breaking changes
- Renamed properties of options and results from camelCase to snake_case (to align with PouchDB).
For Git users
- Added .json extension to repository files.
- Added _id property in a repository document.
- Remove filepath from _id of a JSON document. _id is just a filename now.
[v0.1.15] Compatible with macOS
[update] v0.1.15