* feat: Create `ObjectUtils` for `Object.freeze`, `Object.defineProperty`, ...
* Use Object.create
* Fix missing obj
* fix: Better error
* Cache
* fix: Actually cache by preventing copy
* Object.create is part of RN 78
* Use `defineProperty(...)` for `Dispatcher` too
* Optimize Dispatcher install
* Create `getGlobalFunction`
* feat: Use `defineGlobal(...)` to define our global props
* fix: Move the globals
* fix: Don't protect/freeze the globals in JS
we already do it in native.
* chore: Add `NON_NULL` and `NULLABLE` annotations on all pointers
* feat: Add `CONTIGUOUS_MEMORY` and `NON_NULL`
* Create `InstanceMethod<...>`
* chore: Use `InstanceMethod<...>`
* feat: Add `dispose()` to Kotlin & Swift
* Mark as `noexcept`
* No return
* Test `dispose()`
* fix assignments
* fix: Test `dispose()` over `optionalCallback()`
* fix: Add additional nullptr check to `make_shared_from_jni` function
* fix: Allow move `&&` and forward
* Update JNISharedPtr.hpp
* fix: Add copy ctor
* fix: Avoid `emplace` if there can be duplicates
* Update JNISharedPtr.hpp
* fix: Don't call `release()` on global_ref!
* fix: Use `const &` to keep it lvalue
* Also check `cthis()`
* fix: Fix a case where a `nullptr` `BorrowingReference<T>` could be accessed
* Update HybridObjectPrototype.cpp
* chore: Replace `jsi::Runtime*` with `jsi::Runtime&` in `JSArrayBuffer`
* Update ArrayBuffer.cpp
* feat: Update `memorySize` when a HybridObject makes a round-trip
* feat: Add `NitroModules.updateMemorySize(..)` to imperatively update mem size
* feat: Add test for `NitroModules.updateMemorySize`
* feat: Add some more tests for `NitroModules.*`
* feat: Add even more tests
* fix: Use `jsi::Object`
* fix: use `getObject`
* fix: Register `updateMemorySize()`
* Update HybridNitroModulesProxy.cpp
* feat: Specify RN version in iOS
* Set RN version
* docs
* fix: Adjust scripts and add bootstrap
* fix: Fix react-native path again
* feat: Add `REACT_NATIVE_VERSION` flag to gradle
* fix: Use `tasks.register` to avoid reconfiguration
* fix: Use `project.layout.buildDirectory` instead of `project.buildDir`
* fix: arguments with comma
* fix: Use `buildDir` again
* fix: Pass `YES`
* feat: Add CMake C++ flags now
* fix: Indicate default overridden `HybridObject` constructor
* perf: Make `equals()` a bit faster
* feat: Add `ArrayBuffer::copyBuffer(..)` API
* feat: Add `wrap` API for Kotlin
* feat: Add `ArrayBuffer.copy(data:)`
* perf: Copy Data a bit more effectively
* fix: Rename a bunch of things
* docs: Add creating docs
* feat: Add `ArrayBufferHolder.toData()`
* feat: Add `ArrayBuffer::copy(std::vector&)`
* perf: Change type of `.data` to `uint8_t*` to avoid upcast
* feat: Add `copyIfNeeded` flag
* Update array-buffers.md
* fix: Reject Promise with timeout if it gets destroyed
If a Promise gets destroyed without ever being resolved or rejected, it goes stale.
This PR fixes this and rejects a Promise with a timeout error if it gets destructed and is still pending
* Add promise typename
* Reject swift promise as well
* Update Promise.hpp
* fix: Build
* Update Dispatcher.cpp
* fix: Also reject `JPromise` if it gets destroyed
* feat: Create `PromiseHolder<T>`
* fix: Fix PromiseHolder
* partial fix
* It works now
* fix: Make `_mutex` a value
* Move ctor
* perf: Move functions
* Add back deprecated func
* more explicit
* fix: Mark all types that are used only in `std::shared_ptr<T>` as `SWIFT_UNSAFE_REFERENCE`
* Update AnyMap.hpp
* fix: Add `SWIFT_PRIVATE`
* fix: Use `SWIFT_NONCOPYABLE` instead!! THAT WORKS
* feat: Allow using `Error` as type
* feat: Add `throwError(error)` func to test object
* feat: Test `throwError(error)`
* Update getTests.ts
* fix: Fix bridging `std::exception_ptr` to Swift `Error`
* fix: Fix `__rejecter` still using `std.exception_ptr`
* fix: Fix Java `JThrowable` conversion
* fix: Update error message
* fix: Fix `__ndk1` prefix on Android
* fix: Make `reject` just forward to `exception_ptr`
* fix: Use `std::exception_ptr` to preserve message
* fix: Catch exception
* fix: Fix `JSIConverter`
* Update AssertPromiseState.hpp
* Ok kinda fix?
* ugh
* fix again
* Update JSIConverter+Promise.hpp
* chore: Rename `_result` to `_state`
* feat: Allow comparing message
* fix: Fix `RuntimeError.description`
* feat: Test all of those error messages as well
* feat: Support passing `Promise` to Kotlin
* feat: Add `onResolvedListener`
* feat: Add `.then`, `.catch` and `.await` to Promise!
* feat: Use `await`
* feat: Use `Throwable` instead of `String` for error on Android
* Update Promise.kt
* chore: Remove unused `reject(string)` function now
* Update Promise.hpp
* Update Promise.hpp
* feat: Implement `awaitPromise(..)` on iOS
* feat: Add `RuntimeError` and `.toCpp` to Swift
* fix: Fix duplicate symbol in `RuntimeError`
* feat: Add `ErrorType`
* feat: Add `const&` funcs to `Promise` for Swift
* feat: Add `dependencies` to SwiftCxxBridge
* fix: `error` type
* feat: Add `RuntimeError.from(std.exception)`
* feat: Add `getFunctionCopy()` to `SwiftClosure`
* fix: Account for `Promise<void>` resolver
* fix: Fix `UnsafeMutableRawPointer` being nullable (wrong type)
* nitrogen
* clean
* Update HybridTestObjectSwiftKotlinSpecCxx.swift
* feat: Add actual Promise listeners!!
* fix: Add `addOnResolvedListenerCopy` func for some cases
* chore: Format
* fix: Make `getFunctionCopy()` const
* feat: Support `Promise<void>` from JS!
* feat: Add `awaitAndGet` and `awaitAndGetComplex` promise tests
* feat: Test both new functions
* Slap a good ol' `mutex` on `Promise`
* fix: Fix `Promise<void>` never resolving because args count was `1` (`undefined`)
* fix: Fix Android wrong return type
* Update HybridTestObjectCpp.cpp
* feat: Allow converting `Promise` from JS to C++
* feat: Only expose `create()` in Promise
* fix: Use new `create()` fn
* feat: Add test for `awaitPromise(...)`
* fix: Call `.then` / `.catch`
* Delete `JSPromise`
* fix: Don't swallow errors in timeouted promise
* chore: Add `exception` include
* fix: Fix promise test
* fix: Properly chain .then and .catch functions
* Update getTests.ts
* chore: Format
* fix: Implement `canConvert` for Promise
* fix: Add `Promise.hpp` to podspec
* feat: Use new `Promise<T>` type for C++ and Swift
just a minor bug left
* chore: Format
* fix: Fix nitrogen to use old `future` for function return types FOR NOW
* feat: Use new `Promise<T>` on Kotlin!
* chore: Remove unused `PromiseHolder` now
* chore: Format