Skip to content

Commit

Permalink
[10.20.0-beta.4] Bump version
Browse files Browse the repository at this point in the history
Hermes: Adding an index.native.js (#4461)

* Ading an index.native.js to help bundlers

* Adding a note to the changelog

Update CMakeLists.txt to resolve "react-native" (#4466)

* Update CMakeLists.txt to resolve "react-native"

This enables end-users to build the iOS XCFramework locally from our npm package, if they need it built with the same version of Xcode as they're using to build their app.

* Update CHANGELOG.md

* Updating package-lock.json
  • Loading branch information
kraenhansen committed Apr 13, 2022
1 parent 0a1a6bb commit 5deb4d9
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 271 deletions.
23 changes: 6 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
x.x.x Release notes (yyyy-MM-dd)
10.20.0-beta.4 Release notes (2022-4-11)
=============================================================
### Enhancements
* None.
### Notes
Based on Realm JS v10.15.0: See changelog below for details on enhancements and fixes introduced between this and the previous pre release (which was based on Realm JS v10.14.0).

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-js/issues/????), since v?.?.?)
* None.

### Compatibility
* MongoDB Realm Cloud.
* Realm Studio v11.0.0.
* APIs are backwards compatible with all previous releases of Realm JavaScript in the 10.5.x series.
* File format: generates Realms with format v22 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 or later for synced Realms).

### Internal
* <Either mention core version or upgrade>
* <Using Realm Core vX.Y.Z>
* <Upgraded Realm Core from vX.Y.Z to vA.B.C>
* Changed "react-native" main field to point to a `lib/index.native.js` file to help bundlers pick the right file when loading our library on React Native. ([#4459](https://github.com/realm/realm-js/issues/4459))
* Fixed resolving the "react-native" package when building from source, enabling developers to run the `./scripts/build-ios.sh` script themselves to build our iOS artifacts with the same version of Xcode / LLVM as they're building their app.

10.16.0 Release notes (2022-4-12)
=============================================================
Expand Down Expand Up @@ -4441,4 +4430,4 @@ Old files can still be opened and files open in read-only mode will not be modif
0.10.0 Release notes (2016-2-22)
=============================================================
### Enhancements
* Initial Release
* Initial Release
2 changes: 1 addition & 1 deletion dependencies.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME=realm-js
VERSION=10.20.0-beta.3
VERSION=10.20.0-beta.4
REALM_CORE_VERSION=11.14.0
NAPI_VERSION=4
OPENSSL_VERSION=1.1.1g
Expand Down
20 changes: 20 additions & 0 deletions lib/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2022 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////

const { Realm } = require("./react-native");
module.exports = Realm;
10 changes: 5 additions & 5 deletions lib/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import { Platform, NativeModules } from "react-native";

import utils from "../utils";
import extend from "../extensions";

//switch how babel transpiled code creates children objects.
//Inheriting from Realm.Object with class syntax does not support using Reflect.construct the way babel transpiles it.
//Defining Reflect.construct.sham makes the transpiled code use different standard mechanism for inheriting. (Function.apply with setPrototypeOf)
Expand All @@ -39,7 +42,7 @@ if (Platform.OS === "android") {

// TODO: Remove the need to store Realm as a global
// @see https://github.com/realm/realm-js/issues/2126
const Realm = globalThis.Realm;
export const Realm = globalThis.Realm;

// Otherwise, we must be in a "normal" react native situation.
// In that case, the Realm type should have been injected by the native code.
Expand All @@ -50,10 +53,7 @@ if (typeof Realm === "undefined") {
);
}

require("../extensions")(Realm);
extend(Realm);

const utils = require("../utils");
const versions = utils.getVersions();
Realm.App._setVersions(versions);

module.exports = Realm;
Loading

0 comments on commit 5deb4d9

Please sign in to comment.