mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-09 21:24:11 +00:00
Merge branch 'master' into cm/template-method
# Conflicts: # CHANGELOG.md
This commit is contained in:
commit
2db3ea5853
35
CHANGELOG.md
35
CHANGELOG.md
@ -1,4 +1,4 @@
|
|||||||
2.9.0 Release notes (YYYY-MM-DD)
|
X.Y.Z Release notes
|
||||||
=============================================================
|
=============================================================
|
||||||
### Compatibility
|
### Compatibility
|
||||||
* Sync protocol: 24
|
* Sync protocol: 24
|
||||||
@ -6,9 +6,42 @@
|
|||||||
* File format: 7
|
* File format: 7
|
||||||
* Realm Object Server: 3.0.0 or later
|
* Realm Object Server: 3.0.0 or later
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
* None.
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
* Added support for compacting synchronized Realms and allowed setting the
|
||||||
|
`shouldCompactOnLaunch` config property for them.
|
||||||
* Added `Realm.createTemplateObject(objectSchema)' (#1870).
|
* Added `Realm.createTemplateObject(objectSchema)' (#1870).
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
* Fix incorrect documentation of the `shouldCompactOnLaunch` parameters.
|
||||||
|
|
||||||
|
### Internals
|
||||||
|
* None.
|
||||||
|
|
||||||
|
|
||||||
|
2.8.5 Release notes (2018-6-18)
|
||||||
|
=============================================================
|
||||||
|
### Compatibility
|
||||||
|
* Sync protocol: 24
|
||||||
|
* Server-side history format: 4
|
||||||
|
* File format: 7
|
||||||
|
* Realm Object Server: 3.0.0 or later
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
* None.
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
* None.
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
* [Sync] Fixed a bug that could result in a crash with the message "bad changeset error".
|
||||||
|
|
||||||
|
### Internals
|
||||||
|
* Upgraded to Realm Sync v3.5.5.
|
||||||
|
* Realm Core v5.6.2.
|
||||||
|
|
||||||
|
|
||||||
2.8.4 Release notes (2018-6-15)
|
2.8.4 Release notes (2018-6-15)
|
||||||
=============================================================
|
=============================================================
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
PACKAGE_NAME=realm-js
|
PACKAGE_NAME=realm-js
|
||||||
VERSION=2.8.4
|
VERSION=2.8.5
|
||||||
REALM_CORE_VERSION=5.6.2
|
REALM_CORE_VERSION=5.6.2
|
||||||
REALM_SYNC_VERSION=3.5.4
|
REALM_SYNC_VERSION=3.5.5
|
||||||
REALM_OBJECT_SERVER_VERSION=3.0.0
|
REALM_OBJECT_SERVER_VERSION=3.0.0
|
||||||
|
@ -332,7 +332,7 @@ class Realm {
|
|||||||
* a Realm for the first time during the life of a process to determine if it should be compacted
|
* a Realm for the first time during the life of a process to determine if it should be compacted
|
||||||
* before being returned to the user. The function takes two arguments:
|
* before being returned to the user. The function takes two arguments:
|
||||||
* - `totalSize` - The total file size (data + free space)
|
* - `totalSize` - The total file size (data + free space)
|
||||||
* - `unusedSize` - The total bytes used by data in the file.
|
* - `usedSize` - The total bytes used by data in the file.
|
||||||
* It returns `true` to indicate that an attempt to compact the file should be made. The compaction
|
* It returns `true` to indicate that an attempt to compact the file should be made. The compaction
|
||||||
* will be skipped if another process is accessing it.
|
* will be skipped if another process is accessing it.
|
||||||
* @property {string} [path={@link Realm.defaultPath}] - The path to the file where the
|
* @property {string} [path={@link Realm.defaultPath}] - The path to the file where the
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "realm",
|
"name": "realm",
|
||||||
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
|
"description": "Realm is a mobile database: an alternative to SQLite and key-value stores",
|
||||||
"version": "2.8.4",
|
"version": "2.8.5",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"homepage": "https://realm.io",
|
"homepage": "https://realm.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -969,7 +969,7 @@
|
|||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 2.8.4;
|
CURRENT_PROJECT_VERSION = 2.8.5;
|
||||||
CXX = "$(SRCROOT)/../scripts/ccache-clang++.sh";
|
CXX = "$(SRCROOT)/../scripts/ccache-clang++.sh";
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
@ -1033,7 +1033,7 @@
|
|||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 2.8.4;
|
CURRENT_PROJECT_VERSION = 2.8.5;
|
||||||
CXX = "$(SRCROOT)/../scripts/ccache-clang++.sh";
|
CXX = "$(SRCROOT)/../scripts/ccache-clang++.sh";
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
@ -516,15 +516,12 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
|
|||||||
if (config.schema_mode == SchemaMode::Immutable) {
|
if (config.schema_mode == SchemaMode::Immutable) {
|
||||||
throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'readOnly' is set.");
|
throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'readOnly' is set.");
|
||||||
}
|
}
|
||||||
if (config.sync_config) {
|
|
||||||
throw std::invalid_argument("Cannot set 'shouldCompactOnLaunch' when 'sync' is set.");
|
|
||||||
}
|
|
||||||
|
|
||||||
FunctionType should_compact_on_launch_function = Value::validated_to_function(ctx, compact_value, "shouldCompactOnLaunch");
|
FunctionType should_compact_on_launch_function = Value::validated_to_function(ctx, compact_value, "shouldCompactOnLaunch");
|
||||||
config.should_compact_on_launch_function = [=](uint64_t total_bytes, uint64_t unused_bytes) {
|
config.should_compact_on_launch_function = [=](uint64_t total_bytes, uint64_t used_bytes) {
|
||||||
ValueType arguments[2] = {
|
ValueType arguments[2] = {
|
||||||
Value::from_number(ctx, total_bytes),
|
Value::from_number(ctx, total_bytes),
|
||||||
Value::from_number(ctx, unused_bytes)
|
Value::from_number(ctx, used_bytes)
|
||||||
};
|
};
|
||||||
|
|
||||||
ValueType should_compact = Function<T>::callback(ctx, should_compact_on_launch_function, this_object, 2, arguments);
|
ValueType should_compact = Function<T>::callback(ctx, should_compact_on_launch_function, this_object, 2, arguments);
|
||||||
@ -571,6 +568,12 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
|
|||||||
config.cache = Value::validated_to_boolean(ctx, cache_value, "_cache");
|
config.cache = Value::validated_to_boolean(ctx, cache_value, "_cache");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const String automatic_change_notifications_string = "_automaticChangeNotifications";
|
||||||
|
ValueType automatic_change_notifications_value = Object::get_property(ctx, object, automatic_change_notifications_string);
|
||||||
|
if (!Value::is_undefined(ctx, automatic_change_notifications_value)) {
|
||||||
|
config.automatic_change_notifications = Value::validated_to_boolean(ctx, automatic_change_notifications_value, "_automaticChangeNotifications");
|
||||||
|
}
|
||||||
|
|
||||||
static const String disable_format_upgrade_string = "disableFormatUpgrade";
|
static const String disable_format_upgrade_string = "disableFormatUpgrade";
|
||||||
ValueType disable_format_upgrade_value = Object::get_property(ctx, object, disable_format_upgrade_string);
|
ValueType disable_format_upgrade_value = Object::get_property(ctx, object, disable_format_upgrade_string);
|
||||||
if (!Value::is_undefined(ctx, disable_format_upgrade_value)) {
|
if (!Value::is_undefined(ctx, disable_format_upgrade_value)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user