git-documentdb

Offline-first Database that Syncs with Git

MPL-2.0 License

Downloads
59
Stars
47
Committers
1

Bot releases are hidden (Show)

git-documentdb - [v0.4.8] Bug fixes Latest Release

Published by sosuisen over 1 year ago

Fixes

  • Make YAML lineWidth to be unlimited
  • '401 Unauthorized' message can be handled
  • Bump isomorphic-git up to 1.23.0
git-documentdb - [v0.4.7] Add Front-Matter-Markdown format to serialize JSON object

Published by sosuisen over 2 years ago

Features

  • Added serialize option to DatabaseOptions: specifying front-matter will cause JSON objects to be saved in Front-Matter-Markdown format.
    • The serialize format specified at create time is stored in .gitddb/info.json.
    • Added SerializeFormatLabel.
  • Added logToTransport option to DatabaseOptions
  • Added tsLogger property to GitDocumentDB class
  • Added runBeforeLiveSync property to Sync class, which allows you to specify a function that must be executed before a sync task is queued.
  • Changed the type of a property of schema of DatabaseOptions from JsonDiffOptions to JsonDiffPatchOptions.
  • The keyOfUniqueArray property can be used to specify the key stored in the array whose elements are not allowed to be duplicated during synchronization.

Fixes

  • Enabled array synchronization.
git-documentdb - [v0.4.6] repackage for npm

Published by sosuisen about 3 years ago

The old npm package [email protected] was corrupted.
Correct and repackage it to v0.4.6.

git-documentdb - [v0.4.5] Database-side debounce (experimental)

Published by sosuisen about 3 years ago

Features

  • Database-side debounce (experimental)
    • It is possible to debounce consecutive 'put' and 'update' to the same id document.
    • Database-side debouncing is intended to make it easy to debounce persistence procedures of data stores with exclusive locks on the application side in data flows with DB synchronization processing.
    • Debouncing on the database side may seem strange, but this is an experimental implementation and may be changed in the future.

Breaking changes

  • Added TaskQueue#start(). start() must be called right after new TaskQueue().
  • TaskQueue#clear() was renamed TaskQueue#stop()
git-documentdb - [v0.4.4] Diff and patch nested JSON object

Published by sosuisen about 3 years ago

Fixed cannot diff and patch error when a JSON object is nested.

git-documentdb - [v0.4.3] Retry creating a new repository in the initialize

Published by sosuisen about 3 years ago

Fixed cannot create DB error when integrating GitDocumentDB with Electron Squirrel installer.

git-documentdb - [v0.4.1] Change the default remote engine to isomorphic-git

Published by sosuisen about 3 years ago

GitDocumentDB is now pure TypeScript module.

Major features

  • Removed native module (NodeGit) from the default install. It is now easier to integrate GitDocumentDB into your Electron app.
  • Added plugin system for remote connection (isomorphic-git or NodeGit).
  • Allow multiple Sync instances to sync with multiple remote repositories.

Breaking changes

  • Removed loadAppInfo() and saveAppInfo().
git-documentdb - [v0.4.0] API renewal to manage any data types

Published by sosuisen over 3 years ago

Major features

  • CRUD
    • Added automated generation of _id.
    • Added -FatDoc methods to manage any data types. Note that they are not fully implemented currently. The only .json can be available safely.
    • Added insert() and update() methods.
  • GitDocumentDB Class
    • Added saveAuthor() and loadAuthor() to filter revisions by author.
    • Added loadAppInfo() and saveAppInfo() to manage app specific settings.
    • Added getCommit().
  • Collection Class
    • Added CollectionOptions.namePrefix to add prefix to generated _id.
    • Added inheritance of CollectionOptions from parent collection.
    • Added onSyncEvent() and offSyncEvent() to mange sync events in each collection.

Major bug fixes

  • Sync Class
    • Fixed memory leak by replacing NodeGit with isomorphic-git.

Breaking changes

  • Renewed whole APIs
    • Removed createDB() and remove().
    • Replaced allDocs() with find().
    • Removed backNumber parameter from get().
    • Renamed getBackNumber() to getOldRevision().
    • Renamed getByRevision() to getDocByOid().
    • Renamed getDocHistory() to getHistory().
    • Many other changes..
  • Released tutorials and API documents on https://gitddb.com/
git-documentdb - [v0.3.4] Automated combining of inconsistent repositories

Published by sosuisen over 3 years ago

Features

  • Implemented 'combine-head-with-ours' strategy in combining inconsistent repositories.
  • Fixed memory leak caused by NodeGit.
  • Added SyncResultCombineDatabase type. trySync() will return it when combining inconsistent repositories.
  • Added get_sync_result option to GitDocumentDB#sync() to get the first SyncResult from Sync#init().
  • Added database ID and GitDocumentDB#dbId() method.
  • Added GitDocumentDB#setRepository() method.
  • Changed scope of Sync#remoteRepository from private to public.

Breaking changes

  • Removed remoteURL argument from GitDocumentDB#sync()
  • Changed return value of GitDocumentDB#open(), createDB() from DatabaseInfo type to DatabaseOpenResult type.
  • Changed default value of AllDocsOptions.include_docs from false to true.
  • Added .gitddb/info.json instead of .gitddb/lib_version.
  • Changed CommitInfo type to NormalizedCommit type.
  • Removed GitDocumentDB#fileExt(). Added JSON_EXT instead.
git-documentdb - [v0.3.3] Add detailed information to task and sync result

Published by sosuisen over 3 years ago

  • v0.3.3
    • Add TaskMetadata type with enqueueTime
    • Add TaskMetadata to SyncResult
    • Add enqueueCallback to PutOptions and DeleteOptions
    • Add cancel to TaskStatistics
    • Change sync task enqueuing method from unshift to push
    • Subdivide ChangedFile type into ChangedFileInsert, ChangedFileUpdate, and ChangedFileDelete
    • Add getLogger() and setLogLevel()
  • v0.3.2
    • allDocs must return rows[]
  • v0.3.1
    • Add Collection#getCollection()
git-documentdb - [v0.3.0] Automated synchronization and conflict resolution with GitHub

Published by sosuisen over 3 years ago

Features

Breaking changes

  • get() and getByRevision() return undefined instead of throwing error.
  • Renamed create() to createDB()
  • Renamed statistics() to currentStatistics()
git-documentdb - [v0.2.9] Add prefix search

Published by sosuisen over 3 years ago

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.
git-documentdb - [v0.2.6] Passed tests on Windows10, macOS Catalina and Ubuntu18

Published by sosuisen over 3 years ago

git-documentdb - [v0.2.5] Add overload method to put() to allow _id for the first argument

Published by sosuisen over 3 years ago

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.
git-documentdb - [v0.2.3] Use human-readable JSON

Published by sosuisen over 3 years ago

Breaking changes

For Git users

  • feat!: save JSON document by using human-readable format
git-documentdb - [v0.2.2] Fix a bug

Published by sosuisen over 3 years ago

Fix

  • Allowed ¥ character in local_dir
git-documentdb - [v0.2.1] Add Collection API

Published by sosuisen over 3 years ago

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.
git-documentdb - [v0.1.15] Compatible with macOS

Published by sosuisen over 3 years ago