Preparing v2.19.1 (#2113)
* Upgrading core + sync * Updating to an object store with a sync fix * Steeling from https://github.com/realm/realm-js/pull/2114 to match sync/object store
This commit is contained in:
parent
0b14436dc4
commit
d67cf99f33
30
CHANGELOG.md
30
CHANGELOG.md
|
@ -1,12 +1,12 @@
|
|||
x.x.x Release notes (yyyy-MM-dd)
|
||||
=============================================================
|
||||
### Enhancements
|
||||
* None.
|
||||
|
||||
### Fixed
|
||||
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?)
|
||||
* Removed calls to `new Buffer()` as this is deprecated with Node 10. ([#2107](https://github.com/realm/realm-js/issues/2107), since 2.19.0)
|
||||
* Updated the type definitions to be explicit that the return type of the generics `Realm.objects<T>`, `Realm.objectForPrimaryKey<T>`, etc. is an intersection of `T & Realm.Object`. ([#1838](https://github.com/realm/realm-js/issues/1838))
|
||||
* The Typescript definition for `Realm.Permissions.Permission` did not have the correct `role` property defined. This could result in compilation errors like this `error TS2339: Property 'role' does not exist on type 'Permission'`. ([#2106](https://github.com/realm/realm-js/pull/2106), since v2.3.0.)
|
||||
* Removes calls to `new Buffer()` as this is deprecated with Node 10. ([#2107](https://github.com/realm/realm-js/issues/2107), since v2.19.0)
|
||||
* Updates the type definitions to be explicit that the return type of the generics `Realm.objects<T>`, `Realm.objectForPrimaryKey<T>`, etc. is an intersection of `T & Realm.Object`. ([#1838](https://github.com/realm/realm-js/issues/1838))
|
||||
* A set of bugs that could lead to bad changesets have been fixed. An example of error message is `Failed to parse, or apply received changeset: ndx out of range`. (Fixed by Realm Sync v3.13.3)
|
||||
|
||||
### Compatibility
|
||||
* Realm Object Server: 3.11.0 or later.
|
||||
|
@ -14,25 +14,11 @@ x.x.x Release notes (yyyy-MM-dd)
|
|||
* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
|
||||
|
||||
### Internal
|
||||
* Introduce 100 ms delay before submitting analytics so that an app may disable it after importing Realm. ([#2108](https://github.com/realm/realm-js/pull/2108))
|
||||
* Introduces 100 ms delay before submitting analytics so that an app may disable it after importing Realm. ([#2108](https://github.com/realm/realm-js/pull/2108))
|
||||
* Distinguish between node.js and electron in the `BindingType` field when submitting analytics. ([#2108](https://github.com/realm/realm-js/pull/2108))
|
||||
* Add a package to compute the Windows analytics identifier rather than returning `null` which likely accounts for the disproportionally large number of unique Windows users. ([#2108](https://github.com/realm/realm-js/pull/2108))
|
||||
|
||||
x.x.x Release notes (yyyy-MM-dd)
|
||||
=============================================================
|
||||
### Enhancements
|
||||
* None.
|
||||
|
||||
### Fixed
|
||||
* The Typescript definition for `Realm.Permissions.Permission` did not have the correct `role` property defined. This could result in compilation errors like this "error TS2339: Property 'role' does not exist on type 'Permission'". Since 2.3.0. ([#2106](https://github.com/realm/realm-js/pull/2106))
|
||||
|
||||
### Compatibility
|
||||
* Realm Object Server: 3.11.0 or later.
|
||||
* APIs are backwards compatible with all previous release of realm in the 2.x.y series.
|
||||
* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
|
||||
|
||||
### Internal
|
||||
* None.
|
||||
* Adds a package to compute the Windows analytics identifier rather than returning `null` which likely accounts for the disproportionally large number of unique Windows users. ([#2108](https://github.com/realm/realm-js/pull/2108))
|
||||
* Upgrades to Realm Core v5.12.1.
|
||||
* Upgrades to Realm Sync v3.13.3.
|
||||
|
||||
2.19.0 Release notes (2018-11-8)
|
||||
=============================================================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
PACKAGE_NAME=realm-js
|
||||
VERSION=2.19.0
|
||||
REALM_CORE_VERSION=5.12.0
|
||||
REALM_SYNC_VERSION=3.13.1
|
||||
REALM_CORE_VERSION=5.12.1
|
||||
REALM_SYNC_VERSION=3.13.3
|
||||
REALM_OBJECT_SERVER_VERSION=3.11.1
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
T unbox(ValueType value, bool create = false, bool update = false);
|
||||
T unbox(ValueType value, bool create = false, bool update = false, bool only_update_diff_objects = false, size_t current_row = realm::npos);
|
||||
|
||||
template<typename T>
|
||||
util::Optional<T> unbox_optional(ValueType value) {
|
||||
|
@ -171,63 +171,63 @@ private:
|
|||
namespace _impl {
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, bool> {
|
||||
static bool call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static bool call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return js::Value<JSEngine>::validated_to_boolean(ctx->m_ctx, value, "Property");
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, int64_t> {
|
||||
static int64_t call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static int64_t call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return js::Value<JSEngine>::validated_to_number(ctx->m_ctx, value, "Property");
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, float> {
|
||||
static float call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static float call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return js::Value<JSEngine>::validated_to_number(ctx->m_ctx, value, "Property");
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, double> {
|
||||
static double call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static double call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return js::Value<JSEngine>::validated_to_number(ctx->m_ctx, value, "Property");
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, util::Optional<bool>> {
|
||||
static util::Optional<bool> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static util::Optional<bool> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return ctx->template unbox_optional<bool>(value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, util::Optional<int64_t>> {
|
||||
static util::Optional<int64_t> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static util::Optional<int64_t> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return ctx->template unbox_optional<int64_t>(value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, util::Optional<float>> {
|
||||
static util::Optional<float> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static util::Optional<float> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return ctx->template unbox_optional<float>(value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, util::Optional<double>> {
|
||||
static util::Optional<double> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static util::Optional<double> call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
return ctx->template unbox_optional<double>(value);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, StringData> {
|
||||
static StringData call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static StringData call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
if (ctx->is_null(value)) {
|
||||
return StringData();
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ struct Unbox<JSEngine, StringData> {
|
|||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, BinaryData> {
|
||||
static BinaryData call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value value, bool, bool) {
|
||||
static BinaryData call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value value, bool, bool, bool, size_t) {
|
||||
if (ctx->is_null(value)) {
|
||||
return BinaryData();
|
||||
}
|
||||
|
@ -265,14 +265,14 @@ struct Unbox<JSEngine, BinaryData> {
|
|||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, Mixed> {
|
||||
static Mixed call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static Mixed call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
throw std::runtime_error("'Any' type is unsupported");
|
||||
}
|
||||
};
|
||||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, Timestamp> {
|
||||
static Timestamp call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool) {
|
||||
static Timestamp call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool, bool, bool, size_t) {
|
||||
if (ctx->is_null(value)) {
|
||||
return Timestamp();
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ struct Unbox<JSEngine, Timestamp> {
|
|||
|
||||
template<typename JSEngine>
|
||||
struct Unbox<JSEngine, RowExpr> {
|
||||
static RowExpr call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool create, bool try_update) {
|
||||
static RowExpr call(NativeAccessor<JSEngine> *ctx, typename JSEngine::Value const& value, bool create, bool try_update, bool only_update_diffed, size_t current_row) {
|
||||
using Value = js::Value<JSEngine>;
|
||||
using ValueType = typename JSEngine::Value;
|
||||
|
||||
|
@ -316,7 +316,7 @@ struct Unbox<JSEngine, RowExpr> {
|
|||
}
|
||||
|
||||
auto child = realm::Object::create<ValueType>(*ctx, ctx->m_realm, *ctx->m_object_schema,
|
||||
static_cast<ValueType>(object), try_update);
|
||||
static_cast<ValueType>(object), try_update, only_update_diffed, current_row);
|
||||
return child.row();
|
||||
}
|
||||
};
|
||||
|
@ -324,8 +324,8 @@ struct Unbox<JSEngine, RowExpr> {
|
|||
|
||||
template<typename T>
|
||||
template<typename U>
|
||||
U NativeAccessor<T>::unbox(ValueType value, bool create, bool update) {
|
||||
return _impl::Unbox<T, U>::call(this, std::move(value), create, update);
|
||||
U NativeAccessor<T>::unbox(ValueType value, bool create, bool update, bool only_update_diff_objects, size_t current_row) {
|
||||
return _impl::Unbox<T, U>::call(this, std::move(value), create, update, only_update_diff_objects, current_row);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -59,7 +59,7 @@ void clear_test_state() {
|
|||
user->log_out();
|
||||
}
|
||||
SyncManager::shared().reset_for_testing();
|
||||
SyncManager::shared().configure_file_system(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
||||
SyncManager::shared().configure(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -949,12 +949,13 @@ void RealmClass<T>::create(ContextType ctx, ObjectType this_object, Arguments &a
|
|||
}
|
||||
|
||||
bool update = false;
|
||||
bool only_update_diff_objects = false;
|
||||
if (args.count == 3) {
|
||||
update = Value::validated_to_boolean(ctx, args[2], "update");
|
||||
}
|
||||
|
||||
NativeAccessor accessor(ctx, realm, object_schema);
|
||||
auto realm_object = realm::Object::create<ValueType>(accessor, realm, object_schema, object, update);
|
||||
auto realm_object = realm::Object::create<ValueType>(accessor, realm, object_schema, object, update, only_update_diff_objects);
|
||||
return_value.set(RealmObjectClass<T>::create_instance(ctx, std::move(realm_object)));
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ inline realm::SyncManager& syncManagerShared() {
|
|||
static std::once_flag flag;
|
||||
std::call_once(flag, [] {
|
||||
ensure_directory_exists_for_file(default_realm_file_directory());
|
||||
SyncManager::shared().configure_file_system(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
||||
SyncManager::shared().configure(default_realm_file_directory(), SyncManager::MetadataMode::NoEncryption);
|
||||
});
|
||||
return SyncManager::shared();
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 362b886628b3aefc5b7a0bc32293d794dc1d4ad5
|
||||
Subproject commit 3253b5057573ee24e05d23b76505abb10e6deb32
|
Loading…
Reference in New Issue