Skip to content

Commit

Permalink
Squashed commit of v11 branch
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit a3747c1
Author: Andrew Meyer <[email protected]>
Date:   Wed Aug 31 14:19:18 2022 +0200

    Fix TypeScript errors in @realm/react (#4847)

    Changes to class based models caused @realm/react to break.
    This addresses these changes.

commit f75302f
Author: Andrew Meyer <[email protected]>
Date:   Wed Aug 31 11:54:08 2022 +0200

    Quick lint fix (#4845)

commit dcabed2
Author: Andrew Meyer <[email protected]>
Date:   Tue Aug 30 14:35:11 2022 +0200

    Prepare CHANGELOG

commit 0a366fb
Author: Kræn Hansen <[email protected]>
Date:   Sat Jul 16 08:58:05 2022 +0200

    Small fix for RN integration test app

commit 343d668
Author: Kræn Hansen <[email protected]>
Date:   Mon Jul 11 16:44:29 2022 +0200

    [11.0.0-rc.1] Bump version

commit 6d6a71a
Author: Kræn Hansen <[email protected]>
Date:   Mon Jul 11 16:39:09 2022 +0200

    Upgraded JSI header to React Native 0.69.1

commit cd813a4
Author: Kræn Hansen <[email protected]>
Date:   Thu Jul 7 12:16:52 2022 +0200

    Adding changelog template

commit 10682c2
Author: Kræn Hansen <[email protected]>
Date:   Thu Jul 7 11:51:25 2022 +0200

    Removing realm-core and src sourcecode from the NPM bundle

commit 399b5a1
Author: Kræn Hansen <[email protected]>
Date:   Thu Jul 7 09:32:14 2022 +0200

    [11.0.0-rc.0] Bump version

commit c984d1f
Author: Kræn Hansen <[email protected]>
Date:   Thu Jul 7 11:01:52 2022 +0200

    Attempt fixing CI issue

commit 8daa0b9
Author: Kræn Hansen <[email protected]>
Date:   Mon Jul 4 12:06:05 2022 +0200

    Update README.md (#4645)

commit f46c812
Author: Kræn Hansen <[email protected]>
Date:   Wed Jun 8 16:30:35 2022 +0200

    Fixed CPP lint issues

commit 0788430
Author: Kræn Hansen <[email protected]>
Date:   Wed Jun 8 16:12:11 2022 +0200

    Fixed failing a test

commit 5250743
Author: Kræn Hansen <[email protected]>
Date:   Tue May 17 12:19:46 2022 +0200

    Add calls to flush_ui_queue for Hermes (#4579)

    Rearranged jsi_init

    Refactored flush of UI queue for JSI

commit 2b9c8b4
Author: Kræn Hansen <[email protected]>
Date:   Wed Jun 8 16:08:55 2022 +0200

    Avoid copying args (#4629)

commit e1adfc7
Author: Kræn Hansen <[email protected]>
Date:   Tue Jun 7 16:52:03 2022 +0200

    Rebuild package-lock.json

    Updating package-lock

    Rebuild package-lock.json

commit 2251bd8
Author: Kræn Hansen <[email protected]>
Date:   Tue May 17 12:19:46 2022 +0200

    Rearranged jsi_init

commit d3cdd3c
Author: Kræn Hansen <[email protected]>
Date:   Fri Apr 29 12:45:26 2022 +0200

    Class-based Models types (#4537)

    * Improving ClassModel type

    * Fixed changelog

commit f02ad56
Author: Kræn Hansen <[email protected]>
Date:   Thu Apr 28 17:18:52 2022 +0200

    Support the Hermes JS engine through JSI (#4536)

    * [10.20.0-alpha.0] PRE-RELEASE - DO NOT USE IN PRODUCTION

    * [10.20.0-alpha.1] Bump version

    * [10.20.0-alpha.2] Bump version

    Rename namespaces in the JSI codebase to reflect that it doesn't just support Hermes (#4079)

    Rework the namespace names in our Hermes/JSI layer to more accurately reflect that we support JSI, and to remove ambiguities and namespace clashes.

    This closes RJS-1337.

    Fixing C++ lint error

    * [10.20.0-beta.0] Bump version

    Hermes: Fixing a couple of breaking tests (#4120)

    * Relaxing error message asserting tests

    * Fixing testListSubscriptSetters

    Catching missing libjsi.so as librealm.so loads (#4123)

    Updated RN peer dependency version (#4124)

    Fix classes not extending `Realm.Object` (#4125)

    * Fixing custom classes not extending Realm.Object

    * Adding a note to the changelog

    * Update CHANGELOG.md

    Co-authored-by: FFranck <[email protected]>

    Co-authored-by: FFranck <[email protected]>

    Fixed throwing "Illegal constructor" (#4128)

    Clarifying the get_internal early return

    Refixed throwing "Illegal constructor"

    Various JSI fixes to greenlight more tests (#4129)

    Flipper doesnt support inlined sourcemaps

    Return an existing s_ctor

    Testing with Hermes on CI (#4106)

    * Adding hermes as target branch for the integration tests workflow

    * Reading environment variable when enabling Hermes

    * Adding test app to watchable directories

    * Adding a hermes variant when testing React Native

    * Making the ccache engine specific

    * Moved react-native entry point to fix lint error

    * Attempt at fixing ReactTestAppTests

    * Update Podfile to work around the Catalyst issue

    Fixes for type conversions and minor cleanups (#4137)

    * [10.20.0-beta.1] Bump version

    Clean up JavaScriptCore & legacy Chrome debugger RPC layer (#4203)

    * Removed 0xd3adc0d3

    * Providing a "soft" landing for users running in legacy debugging mode

    * Simplified index.js as we have react-native/index.js

    * Removed some logging

    * Adding a note to the CHANGELOG

    * Stop integration testing in legacy debug mode

    * Incorporated feedback

    * Fixed the environment check 🤦‍♂️

    * Removed all mentions of GCDWebServer

    Prevent dangling objects on JSCRuntime destruction (#4228)

    * WIP

    * Refactored to a separate js_notifications.hpp

    * Using the NotificationBucket throughout the codebase

    * Adding a note to the changelog

    * Fixed compiling on GCC

    * Trigger garbage collection after every test

    * Ensure s_tokens static gets initialized before use

    Removed a bash only prepare command

    * [10.20.0-beta.2] Bump version

    Adding changelog template

    Updated package-locks

    Copied up the change log

    * [10.20.0-beta.3] Bump version

    * [10.20.0-beta.4] Bump version

    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

    * Adding changelog template

    * [10.20.0-beta.5] Bump version

    * Adding changelog template

    * Rolling up relevant notes in changelog

    * Class models: `Realm.Object#constructor` for JSI / Hermes (#4435)

    * Create prototyped object instead of constructor call

    Recreated package-lock

    * Ran lint fix

    Co-authored-by: Mathias Stearn <[email protected]>

    Updated the merge

commit 02d1149
Author: Kræn Hansen <[email protected]>
Date:   Wed Mar 30 16:28:08 2022 +0200

    Class models: `Realm.Object#constructor` (#4427)

    * Adding a cast to Value operator on ReturnType

    * Adding integration tests of class constructors

    * Made the test reporter print stack

    * Implemented Realm.Object constructor

    * Added node implementation and fixed legacy tests

    * Read from this.constructor instead of new.target

    * Fixing JSC implementation

    * Updating types and tests

    * Fixed Person and Dog constructors

    * Updated @realm/react useObject + useQuery

    * Updated types to fix an issue

    * Dead code removal

    * Updated tests to use default values

    * Making the insertion types a bit more loose

    * Adding documentation

    * Renamed realm_object_object

    * Made the constructor "values" required

    * Renamed "RealmInsertionModel" to "Unmanged"

    * Adding a note to the changelog

    * Apply suggestions to docstrings

    Co-authored-by: Kenneth Geisshirt <[email protected]>

    * Add docstring of set_internal and get_internal

    * Expect 2 arguments on the C++ code as well

    Co-authored-by: Kenneth Geisshirt <[email protected]>

commit 18146be
Author: Kræn Hansen <[email protected]>
Date:   Wed Mar 16 12:03:46 2022 +0100

    Class models: Enforce `extends Realm.Object` (#4417)

    * Throw if constructors doesn't extend Realm.Object

    * Updating existing tests to the breaking change.

    * Adding a note to the changelog

Attempt at fixing Android build

Fixed broken Android merge
  • Loading branch information
kraenhansen committed Sep 9, 2022
1 parent 429d2d3 commit 903f119
Show file tree
Hide file tree
Showing 129 changed files with 3,305 additions and 8,977 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ yarn.lock
# Android/IJ
/android
/react-native/android/src/main/jni/core
/react-native/android/.cxx/
/build-android/
.idea
.gradle
local.properties
Expand Down Expand Up @@ -90,7 +92,6 @@ integration-tests/**/.lock
/react-native/android/src/main/jni/src/
/build-tmp*/
/cmakebuild/
/build-realm-android/
/react-native/android/src/main/java/io/realm/react/Version.java
/react-native/android/src/main/jniLibs/
/realm*.tgz
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "vendor/GCDWebServer"]
path = vendor/GCDWebServer
url = https://github.com/swisspol/GCDWebServer.git
[submodule "docs/jsdoc-template"]
path = docs/jsdoc-template
url = https://github.com/realm/realm-jsdoc.git
Expand Down
169 changes: 164 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,78 @@
* Migrated to `std::optional` and `std::nullopt`.
* Disabled testing on iOS and Catalyst on legacy CI system.

## 10.19.5 (2022-7-6)
## 11.0.0-rc.1 (2022-7-11)

### Notes
This is primarily a re-release of `11.0.0-rc.0`, which is compatible with React Native v0.69.0 or above.
The release is based on Realm JS v10.19.5.

### Enhancements
* None.

### Fixed
* None.

### Compatibility
* React Native equal to or above `v0.69.0` and above, since we're shipping binaries pre-compiled against the JSI ABI.
* Atlas App Services.
* Realm Studio v12.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).

## 11.0.0-rc.0 (2022-7-7)

### Notes
Based on Realm JS v10.19.5: See changelog below for details on enhancements and fixes introduced between this and the previous pre release (which was based on Realm JS v10.17.0).

### Breaking change
* Removed all code related to the legacy Chrome Debugger. Please use [Flipper](https://fbflipper.com/) as debugger.
* Model classes passed as schema to the `Realm` constructor must now extend `Realm.Object` and will no longer have their constructors called when pulling an object of that type from the database. Existing classes already extending `Realm.Object` now need to call the `super` constructor passing two arguments:
- `realm`: The Realm to create the object in.
- `values`: Values to pass to the `realm.create` call when creating the object in the database.
* Renamed the `RealmInsertionModel<T>` type to `Unmanaged<T>` to simplify and highlight its usage.
* Installing via NPM from a `git://` URL is no longer supported, since we removed `src` and `vendor` from the NPM bundle, to reduce size blow-up caused by files recently added to the sub-module. This will force end-users to checkout the Git repository from GitHub when building from source. ([#4060](https://github.com/realm/realm-js/issues/4060))

### Enhancements
* Adding support for Hermes on iOS & Android.
* Class-based models (i.e. user defined classes extending `Realm.Object` and passed through the `schema` when opening a Realm), will now create object when their constructor is called:

```ts
class Person extends Realm.Object<Person> {
name!: string;

static schema = {
name: "Person",
properties: { name: "string" },
};
}

const realm = new Realm({ schema: [Person] });
realm.write(() => {
const alice = new Person(realm, { name: "Alice" });
// A Person { name: "Alice" } is now persisted in the database
console.log("Hello " + alice.name);
});
```

### Fixed
* Fixed build error (call to implicitly-deleted copy constructor of 'realm::js::RealmClass<realm::js::realmjsi::Types>::Arguments') (follow up to [#4568](https://github.com/realm/realm-js/pull/4568))

### Compatibility
* React Native equal to or above `v0.66.0` and below `v0.69.0` (not included), since we're shipping binaries pre-compiled against the JSI ABI.
* Atlas App Services.
* Realm Studio v12.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
* Remove the previous implementation to the JavaScriptCore engine (in `src/jsc`).
* Upgrade Example to RN v0.68.2
* Upgrade dependencies of the Realm Web integration tests
* Throw instances of `Error` instead of plain objects on app errors.
* Make integration tests on React Native Android connect to host machine by default

## 10.19.5 (2022-7-6)
### Enhancements
* None.

Expand All @@ -79,7 +149,7 @@
### Internal
* Using Realm Core v12.3.0.

10.19.4 (2022-7-5)
## 10.19.4 (2022-7-5)

### Enhancements
* Allow flexible sync with discard local client resets. ([realm/realm-core#5404](https://github.com/realm/realm-core/pull/5404))
Expand Down Expand Up @@ -279,6 +349,11 @@ const Person = {
* Fixed a typo in the `testRealmConversions` test which prevented some test scenarios from executing.
* Upgraded Realm Core from v11.14.0 to v11.15.0.

## 10.20.0-beta.5 (2022-4-13)

### Notes
Based on Realm JS v10.16.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.15.0).

## 10.16.0 (2022-4-12)

### Enhancements
Expand All @@ -296,8 +371,16 @@ const Person = {
### Internal
* Upgraded Realm Core from v11.13.0 to v11.14.0.

## 10.15.0 (2022-4-11)
## 10.20.0-beta.4 (2022-4-11)

### 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
* 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.15.0 (2022-4-11)
### Enhancements
* None.

Expand All @@ -318,6 +401,11 @@ const Person = {
* Upgraded Realm Core from v11.12.0 to v11.13.0.
* Added a failing test case for Node.js scripts failing to exit cleanly ([#4556](https://github.com/realm/realm-js/pull/4556))

## 10.20.0-beta.3 (2022-3-24)

### Notes
Based on Realm JS v10.14.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.13.0).

## 10.14.0 (2022-3-24)

### Enhancements
Expand Down Expand Up @@ -350,6 +438,11 @@ const Person = {
* Fixed React Native Android integration test harness to read only one pid when starting logcat.
* Added a script to generate JS template apps from TS, and updated JS templates. ([4374](https://github.com/realm/realm-js/pull/4374))

## 10.20.0-beta.2 Release notes (2022-2-14)

### Notes
Based on Realm JS v10.13.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.12.0).

## 10.13.0 (2022-2-11)

### Enhancements
Expand All @@ -375,6 +468,23 @@ const Person = {
* Fixed an issue where some references were not updated from `Subscriptions` to `SubscriptionSet`. ([#4298](https://github.com/realm/realm-js/pull/4298))
* Submitting [analytics](https://github.com/realm/realm-js/blob/master/README.md#analytics) as a postinstall script.

## 10.20.0-beta.1 (2022-1-27)

### Notes
Based on Realm JS v10.12.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.11.0).

### Breaking change
* Removed all code related to the legacy Chrome Debugger. Please use [Flipper](https://fbflipper.com/) as debugger.

### Enhancements
* None.

### Fixed
* Fixed "JSCRuntime destroyed with a dangling API object" assertion when reloading an app in debug mode while running with Hermes engine disabled. ([#4115](https://github.com/realm/realm-js/issues/4115), since 10.20.0-alpha.0)

### Internal
* Remove the previous implementation to the JavaScriptCore engine (in `src/jsc`).

## 10.12.0 (2022-1-24)

### Notes
Expand Down Expand Up @@ -414,8 +524,19 @@ Please note the following API changes from the `10.12.0-beta.1` release of Flexi
* Enabled `strictNullChecks` for integration tests
* Updated release instructions

## 10.11.0 (2021-12-21)
## 10.20.0-beta.0 (2021-12-21)

### Notes
Based on Realm JS v10.11.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.10.1).

### Enhancements
* Catching missing libjsi.so when loading the librealm.so and rethrowing a more meaningful error, instructing users to upgrade their version of React Native.

### Fixed
* Fixed support of user defined classes that don't extend `Realm.Object`.
* Fixed throwing "Illegal constructor" when `new` constructing anything other than `Realm` and `Realm.Object`.

## 10.11.0 (2021-12-21)
### Enhancements
* Added templates for Expo (https://www.npmjs.com/package/@realm/expo-template-js and https://www.npmjs.com/package/@realm/expo-template-ts).
* A new mode `discardLocal` for client reset has been introduced. The old behavior is supported (but deprecated) through the `manual` mode. The new mode will discard any local changes, and a fresh copy of the Realm will be downloaded. An example of the configuration:
Expand Down Expand Up @@ -466,6 +587,23 @@ const config = {
* Added a performance test suite to the integration test.
* Upgraded Realm Core from v11.6.1 to v11.7.0.

## 10.20.0-alpha.2 (2021-11-25)

### Notes
NOTE: DO NOT USE THIS RELEASE IN PRODUCTION!
NOTE: This is an early (alpha) release with Hermes/JSI support: We expect crashes and bugs.

Based on Realm JS v10.10.1: See changelog below for details on enhancements and fixes introduced between this and the previous pre release (which was based on Realm JS v10.8.0).

### Enhancements
* None.

### Fixed
* Hot reloading on Android no longer crash the app.

### Internal
* Restructured C++ namespaces and files to reflect that we support JSI, not just Hermes.

## 10.10.1 (2021-11-18)

### Enhancements
Expand Down Expand Up @@ -578,8 +716,18 @@ const config = {
* Using Realm Core v11.4.1.
* Small fix to Jenkins to publish Docker image for Raspberry Pi.

## 10.8.0 (2021-9-14)
## 10.20.0-alpha.1 (2021-9-1)

### Notes
NOTE: DO NOT USE THIS RELEASE IN PRODUCTION!
NOTE: This is an early (alpha) release with Hermes/JSI support. Only iOS is supported and we expect crashes and bugs.

Based on Realm JS v10.8.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.7.0).

### Enhancements
* Adding support for Hermes on Android.

## 10.8.0 (2021-9-14)
### Enhancements
* Synchronized Realms are no longer opened twice, cutting the address space and file descriptors used in half. ([realm/realm-core#4839](https://github.com/realm/realm-core/pull/4839))
* `Realm.write()` now returns callback return value. ([#2237](https://github.com/realm/realm-js/issues/2237))
Expand All @@ -603,6 +751,17 @@ const config = {
* Extend Jest test runner to cover opening and closing of a Realm.
* Disable analytics if the `CI` environment variable is set to some value.

## 10.20.0-alpha.0 (2021-9-1)

### Notes
NOTE: DO NOT USE THIS RELEASE IN PRODUCTION!
NOTE: This is an early (alpha) release with Hermes/JSI support. Only iOS is supported and we expect crashes and bugs.

Based on Realm JS v10.7.0: See changelog below for details on enhancements and fixes introduced by that version.

### Enhancements
- Adding support for Hermes (iOS only).

## 10.7.0 (2021-8-30)

### Enhancements
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

set(PACKAGE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED CMAKE_JS_VERSION)
include(NodeJSTargets)
endif()
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ENV LD_LIBRARY_PATH /opt/rh/httpd24/root/usr/lib64:/opt/rh/python27/root/usr/lib

# Ensure a new enough version of CMake is available.
RUN cd /opt \
&& curl -O -J https://cmake.org/files/v3.15/cmake-3.15.2-Linux-x86_64.tar.gz \
&& tar zxf cmake-3.15.2-Linux-x86_64.tar.gz
ENV PATH "/opt/cmake-3.15.2-Linux-x86_64/bin:$PATH"
&& curl -O -J https://cmake.org/files/v3.21/cmake-3.21.3-linux-x86_64.tar.gz \
&& tar zxf cmake-3.21.3-linux-x86_64.tar.gz
ENV PATH "/opt/cmake-3.21.3-linux-x86_64/bin/:$PATH"
12 changes: 6 additions & 6 deletions Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ RUN echo 'Installing Android SDK' && \
"platform-tools" \
"build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
"platforms;android-26" \
"cmake;3.10.2.4988404"\
"cmake;3.18.1"\
"system-images;android-29;default;x86" && \
\
echo 'Installing Android NDK' && \
Expand All @@ -75,8 +75,8 @@ RUN mkdir -p $NVM_DIR \
&& chmod a+rwX -R $NVM_DIR

# Ensure a new enough version of CMake is available.
RUN mkdir -p /home/jenkins/cmake && \
cd /home/jenkins/cmake && \
curl -O -J https://cmake.org/files/v3.17/cmake-3.17.5-Linux-x86_64.tar.gz &&\
tar zxf cmake-3.17.5-Linux-x86_64.tar.gz
ENV PATH "/home/jenkins/cmake/cmake-3.17.5-Linux-x86_64/bin:$PATH"
RUN mkdir -p /home/jenkins/cmake \
&& cd /home/jenkins/cmake \
&& curl -O -J https://cmake.org/files/v3.21/cmake-3.21.3-linux-x86_64.tar.gz \
&& tar zxf cmake-3.21.3-linux-x86_64.tar.gz
ENV PATH "/home/jenkins/cmake/cmake-3.21.3-linux-x86_64/bin/:$PATH"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ See [CONTRIBUTING.md](https://github.com/realm/realm-js/blob/master/CONTRIBUTING

## Known issues

* Realm is not compatible with the Chrome Debugger. The following debugging methods are supported.
* [Flipper](https://fbflipper.com/) has many similar features in relation to the Chrome Debugger. Please consider trying out our [Hermes release](https://github.com/realm/realm-js/issues/3940) to use the Hermes Debugger in Flipper and set breakpoints in your code.
* Realm is not compatible with the legacy Chrome Debugger. The following debugging methods are supported:
* [Flipper](https://fbflipper.com/) has many similar features in relation to the Chrome Debugger.
* [Safari](https://reactnative.dev/docs/debugging#safari-developer-tools) also has a similar feature set, but requires [some setup](https://blog.nparashuram.com/2019/10/debugging-react-native-ios-apps-with.html) and only supports debugging in iOS.
* **NOTE:** For the above methods, it is not neccessary to enable `Debug with Chrome` in the Debug Menu.
* [What to expect in Realm JavaScript v11.0.0](https://github.com/realm/realm-js/discussions/4839)
Expand Down
6 changes: 0 additions & 6 deletions Realm.xcworkspace/xcshareddata/Realm.xcscmblueprint
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "5EE721F9-041C-4877-9E73-A925C9DB080A",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"40F53A12E4AE40C654358321B91166ABD3E910A6" : "realm-js\/",
"F6F96CA34C5878B0A9123C7C37855491A5E599DA" : "realm-js\/vendor\/GCDWebServer\/",
"8F3C415DA79CDA7D23734F285B95F9F9A3C0CB81" : "realm-js\/src\/object-store\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "Realm",
Expand All @@ -27,11 +26,6 @@
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/realm\/realm-object-store.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8F3C415DA79CDA7D23734F285B95F9F9A3C0CB81"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/swisspol\/GCDWebServer.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "F6F96CA34C5878B0A9123C7C37855491A5E599DA"
}
]
}
5 changes: 2 additions & 3 deletions RealmJS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ Pod::Spec.new do |s|
s.source = { :http => 'https://github.com/realm/realm-js/blob/master/CONTRIBUTING.md#how-to-debug-react-native-podspec' }

s.source_files = 'react-native/ios/RealmReact/*.mm'
s.public_header_files = 'react-native/ios/RealmReact/*.h'

s.frameworks = uses_frameworks ? ['JavaScriptCore', 'React'] : ['JavaScriptCore']
s.frameworks = uses_frameworks ? ['React'] : []

s.library = 'c++', 'z', 'compression'

Expand All @@ -66,6 +67,4 @@ Pod::Spec.new do |s|
s.vendored_frameworks = 'react-native/ios/realm-js-ios.xcframework'

s.dependency 'React'
# TODO: Ensure the same version of GCDWebServer is used for Android
s.dependency 'GCDWebServer'
end
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.21.0
VERSION=11.0.0-rc.1
REALM_CORE_VERSION=12.6.0
NAPI_VERSION=5
OPENSSL_VERSION=1.1.1g
Expand Down
7 changes: 6 additions & 1 deletion integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ In order to debug the tests with `lldb` attached to debug C++, you can use the V

This bypasses the usual startup script (as this spawns a child process for the tests, which stops `lldb` working), so you need to have the app importer running separately when doing this: `npm run app-importer` from the `integration-tests/tests` directory.

### Environment variables

// TODO: Provide an explanation of the environment variables.
// In particular `MOCHA_REMOTE_CONTEXT=missingServer` to run tests without a test server.

---

## Maintaining the tests
Expand All @@ -120,7 +125,7 @@ Tests will have access to the following globals:
- [the Mocha hook globals](https://mochajs.org/#hooks) (describe, it, after, before, etc.).
- `fs` the lowest common denominator of the [`fs-extra`](https://www.npmjs.com/package/fs-extra) and [`react-native-fs`](https://www.npmjs.com/package/react-native-fs) APIs.
- `path` the lowest common denominator of the Node.js path interface and a [node-independent implementation of Node's path](https://www.npmjs.com/package/path-browserify) module.
- `it.skipIf` and `describe.skipIf` skips tests based on the environment, see `tests/src/utils/skip-if.js` for a detailed explanation.
- `it.skipIf` and `describe.skipIf` skips tests based on the environment, see `tests/src/utils/skip-if.ts` for a detailed explanation.

Remember to close or clean up Realms accessed during tests.
The `Realm.clearTestState` can be called after each test, which closes and removes all Realm files in the default directory.
Expand Down
Loading

0 comments on commit 903f119

Please sign in to comment.