Skip to content

Releases: mrousavy/nitro

Release 0.24.1

24 Feb 16:05
Compare
Choose a tag to compare

0.24.1 (2025-02-24)

⚠️ BREAKING CHANGES

  • All HybridView classes now need to take in a single parameter for their constructor: context: ThemedReactContext 98a7855
- class HybridCameraView : HybridCameraViewSpec() {
+ class HybridCameraView(val context: ThemedReactContext) : HybridCameraViewSpec() {

✨ Features

  • Add context as a parameter to HybridViews (#583) (98a7855)

💨 Performance Improvements

  • Replace getClass() with javaClassStatic() (#582) (6e2dbea)

🐛 Bug Fixes

  • Generate separate function for invoke_cxx (#581) (12d10c8)

📚 Documentation

  • Add Ko-Fi to sponsor/funding page (757c670)

Release 0.24.0

24 Feb 14:42
Compare
Choose a tag to compare

0.24.0 (2025-02-24)

✨ Features

  • Create Sync<T> to pass fully synchronous JS callbacks (#564) (4d07b2a)

💨 Performance Improvements

🐛 Bug Fixes

  • Fix a case where a nullptr BorrowingReference<T> could be accessed (#568) (0c5e716)
  • Fix implicit size_t conversion (#572) (2e57992)
  • Log proper generic T types when throwing exceptions (#566) (4d7cf32)

📚 Documentation

  • Add docs for Sync<T> functions and getHybridObjectConstructor<T>(..) usage (#571) (e10192b)
  • Add example to README (#569) (55f654b)
  • Add explicitly call to HybridObject constructor (#366) (753f939)
  • fix typo (#570) (5e4f44b)
  • Fix typo in nitro views documentation (#562) (a5e06a9)
  • Rename onBeforeUpdate and onAfterUpdate (#563) (34d14e9)
  • Update examples to show correct props & methods types (#559) (1f38da5)

Release 0.23.0

21 Feb 15:32
Compare
Choose a tag to compare

0.23.0 (2025-02-21)

Nitro Views!!!! 🥳

This release includes first-class support for creating React Native views with Nitro. See the View components docs for more information.

export interface CameraProps {
  enableFlash: boolean
}
export interface CameraMethods {
  takePhoto(): Promise<Image>
}

export type CameraView = HybridView<CameraProps, CameraMethods>

..each HybridView is also a HybridObject, so you can access props and methods on it and pass it around like any other HybridObject - you can even pass Swift/Kotlin views to C++ and use them without bridging between languages yourself!!
Also, they're faster.

Note: Nitro Views require react-native 0.78.0+, and only work on the new architecture.

✨ Features

  • Nitro Views!!!!!!!!! 🥳 (#512) (28f9c4a)
  • Add example to pass a HybridView to a normal HybridObject (#556) (a556b5b)
  • Add extra path for cloneProps to make sure we dont ever use folly (#551) (29068e4)
  • Set up hybridRef (#553) (4111c67)
  • Treat HybridViews differently now - they're type aliases (#552) (fa8ede8)

🐛 Bug Fixes

  • [HybridViews] Automatically wrap all function props as objects (#550) (5e6b589)
  • Append .gitattributes file as well (#532) (ff9d709)
  • Fix f.path sometimes being undefined (#533) (4907639)
  • Fix crash when no modules are registered (#536) (bff32c0)
  • Generate @JvmName prop for Kotlin methods (#534) (897b5c6)
  • HybridView is now a union type.. (#557) (834f493)

📚 Documentation

Release 0.22.1

06 Feb 23:25
Compare
Choose a tag to compare

0.22.1 (2025-02-06)

💨 Performance Improvements

  • Make OwningReference/BorrowingReference lock-free, and only allocate memory block once (#522)
  • Make JSIConverter<T> final (#521)
  • Mark all properties and methods in Cxx helper as final (#520)

🐛 Bug Fixes

  • Fix cxxreact module import (#525)

Release 0.22.0

03 Feb 13:54
Compare
Choose a tag to compare

0.22.0 (2025-02-03)

✨ Features

  • Add a .gitattributes file into nitrogen/generated (#473) (f527c84)
  • Create HybridView code generator base (#494) (3387184)
  • Create React Native ViewManager (+ Props + State) for HybridViews (#500) (baed798)
  • Make memorySize optional in Kotlin as well (default = 0) (#472) (0d6b836)
  • Specify RN version as compiler flag (#490) (bbbeeaf)
  • Update memorySize when a HybridObject makes a round-trip (#510) (d62dbfb)

💨 Performance Improvements

  • Move updateNative(...) into a protected override to seal it (#499) (d4cfc2b)

🐛 Bug Fixes

  • Default-implement memorySize via Swift extension (#497) (3f04c15)
  • Fix Record<string, number | boolean> (map of variants) breaking on Swift and Kotlin (#517) (2618246)
  • Fix unordered_map subscript operator causing ldc++ duplicate symbols (#519) (7a288e4)
  • Log all hybrid object names as joined string to help user (#508) (98575fd)
  • Mark Java HybridObjectRegistry as deprecated (#491) (ad29b24)
  • Move ExtendableHybridClass to it's own file with explanation (#493) (d5dd70c)
  • Pin to react-native 0.76.6 (646a346)
  • Rename HybridObjectSpec -> HybridObject protocol (#492) (4b513bf)
  • Rename TypeInfo.hpp to NitroTypeInfo.hpp (#498) (b387586)
  • Return JMap instead of JHashMap in typed map converter (Record<string, T>) (#518) (e5925a3)

📚 Documentation

Release 0.21.0

09 Jan 18:44
Compare
Choose a tag to compare

0.21.0 (2025-01-09)

✨ Features

  • Add new ArrayBuffer APIs (copy(), wrap(), allocate(), toData()) (#463) (a06c7d4)
  • New Callback implementation that extends () -> T in Kotlin (faster!) (#470) (07d96a0)
  • Throw a better error message when using wrong imports (#467) (96e7716)
  • Add definition to check if generated CMake is building the code (#466) (bf19f7d)

🐛 Bug Fixes

  • Fix passing function inside object on Android (toCpp()) (#453) (57336f4)
  • Use UNIX paths for CMake file, even on Windows (\ -> /) (#451) (3a6d46d)
  • Filter out duplicates for CMake extension (#462) (d5b9341)
  • Remove unused Kotlin OnLoad (#460) (3795f5a)
  • Update specs for new copyright year (#461) (e641d55)

📚 Documentation

Release 0.20.1

22 Dec 13:00
Compare
Choose a tag to compare

0.20.1 (2024-12-22)

💨 Performance Improvements

🐛 Bug Fixes

  • Add test with complex callback that returns complex return type (ArrayBuffer) (#441) (7c0807d)
  • Reject Promise with timeout if it gets destroyed (#444) (2ebff1b)

Release 0.20.0

20 Dec 11:56
Compare
Choose a tag to compare

0.20.0 (2024-12-20)

✨ Features

  • Create statically compiled Swift closure wrapper to avoid C-style function pointers (#440) (699e138)

💨 Performance Improvements

  • Create PromiseHolder<T> (#439) (00e9db4)
  • Mark all types that are used only in std::shared_ptr<T> as SWIFT_NONCOPYABLE (#435) (196fc9d)
  • Move more stuff into closures (#434) (745e57e)

🐛 Bug Fixes

Release 0.19.0

18 Dec 15:59
Compare
Choose a tag to compare

0.19.0 (2024-12-18)

✨ Features

  • Allow std::future to go bi-directional (using new Promise impl) (#411) (283f1f5)
  • Default-calculate getSizeOf(...) so the user doesn't have to (#429) (5b510b8)
  • Implement callbacks that return a value in Swift/Kotlin 🥳 (#417) (4b54687)
  • Implement proper type-erasure inheritance in Swift (#427) (50e0de3)
  • Implement Swift errors 🥳 (#430) (5b3fa6c)
  • Remove hybridContext and memorySize from Swift HybridObjects (make them optional) (#420) (6b85f08)
  • Remove HybridContext for simpler Swift bridges (#428) (70116b5)
  • Use std::shared_ptr<Promise<T>> instead of std::future<T> for callbacks that return a value (#412) (ea2c070)

🐛 Bug Fixes

  • Add workaround for error messages on Android (#408) (27e8cbb)
  • Delete HybridObject copy & move ctors (#402) (5147fc7)
  • Fix catching std::runtime_error on Android (a90e3e4)
  • Fix react and react-native dependency resolutions (#419) (518f2b2)
  • Fix react being wildcarded to 19 (#416) (978c833)
  • Only generate code if platform is actually used (#395) (fe96d24)
  • Rename TCxx to T_cxx to better hide it from user (#424) (e8b01d0)
  • Use a glob for ignorePaths (#409) (94e0214)

📚 Documentation

  • Fix function types (949266f)
  • Update npm run to npx for nitrogen (f58bf84)
  • Update docs to no longer use hybridContext (#426) (7149abf)

Release 0.18.2

05 Dec 14:03
Compare
Choose a tag to compare

0.18.2 (2024-12-05)

✨ Features

  • Add nitrogen init <moduleName> to create new Nitro Modules with template (#392) (583942f)
  • Add a nitro.schema.json schema to validate nitro.json files (#390) (f7802e2)
  • Add native NITRO_VERSION to C++ codebase and warn if it's out of sync (#398) (04e73d8)

🐛 Bug Fixes

  • Check std::exception_ptr for null (#381) (b916d5f)
  • Remove packages/template from bun workspace (#396) (c423cd3)
  • Replace placeholders to make them windows compatible (<<*>> -> $$*$$) (#385) (4ffa3ae)

📚 Documentation

  • Add nitro.schema.json to docs (4e0249d)
  • Update docusaurus to 3.6.3 (#397) (62064f9)
  • Update Nitro Modules getting started docs (980427d)