Nitro now lives at github.com/margelo/nitro. This updates every
reference to the old `mrousavy/nitro` location:
- `package.json` `repository`/`bugs` for all 5 packages + root
- All 4 podspecs (`s.source`)
- Issue templates ("search similar issues" links)
- Docusaurus `organizationName` + navbar/footer/JSON-LD `codeRepository`
- Docs prose links
- nitrogen CLI banner and the generated-file header comment
(`helpers.ts`), plus all 275 regenerated files
- `nitrogen init` clones the template from `margelo/nitro`
Also updates links to sibling repos that moved to `margelo` too
(`react-native-vision-camera`, `react-native-mmkv`,
`react-native-fast-tflite`), and aligns the iOS example bundle ID
with Android's (`com.mrousavy.nitro.example` ->
`com.margelo.nitro.example`).
Intentionally unchanged: `author` fields, personal links
(mrousavy.com/Twitter/YouTube/Sponsors, `FUNDING.yml`), and links to
repos still under `mrousavy` (`NitroBenchmarks`,
`react-native-nitro-image`, `react-native-data-scanner`).
The v0.37.0 View props rewrite changed `CachedProp<T>`'s API (immutable
shared entry, `get()`/`isProvided()`/`hasSameValue()`), which broke
modules whose specs were generated by nitrogen <= 0.36.x - their generated
code uses the old mutable API (`.value`, `.isDirty`, 3-arg
`fromRawValue(runtime, value, oldProp)`) and no longer compiled against
the new core.
- Rename the new implementation to `ReactProp<T>` (cpp/views/ReactProp.hpp),
and fold its now-single-use private helpers into `fromRawValue`
- Re-add `CachedProp<T>` exactly as it shipped in v0.36.5, marked
[[deprecated]], so old generated specs compile again (with a warning)
- Update nitrogen to emit `ReactProp` and re-generate nitro-test specs
* feat: Move `Props` into Nitro Modules core via C++ template
* Update Podfile.lock
* Generate props in user code again
* Use CachedProp constructor
* include properly
* Update IsFunctionProp.hpp
* refactor
* simplify
* feat: Create `PropNameID` Cache
* Impl PropNameID
* fix: Use `const jsi::PropNameID&` instead of `BorrowingReference`
* perf: Use `PropNameIDCache` everywhere internally
* fix: Make use of `PropNameIDCache` in custom user defined structs
* fix: Use `PropNameIDCache` for Hybrid Views too
* fix: `jsi::Runtime` deref
* fix: Allow `JSICache` to use itself by caching itself first
* fix: Remove `allowCache` flag
* perf: Avoid `BorrowingReference<T>` copy and use `const T&`
* perf: Use `PropNameIDCache` inside `defineProperty(...)`
* docs: Add docs
* fix: Fix all-empty/optional plain objects being wrongfully detected in Variant
* fix: Only use `toString()` if it is actually implemented as it's own property
* feat: Add test for this variant issue
* perf: Allow fast path for primitively copyable arrays
* feat: Better fast copy to Swift
* idk if this makes a difference tbh
* More readable
* fix: Use `std::span` to make it safer
* fix: Allow fast path for simple `memcpy`
* Update NitroTest-Swift-Cxx-Bridge.hpp
* feat: Move to `FastVectorCopy`
* fix: Just check if `needsSpecialHandling`
* chore: Lint C++
* fix: Name prefixes
* fix: Replace `reserve` with alloc
* fix: Rename `ArrayBufferHolder` -> `ArrayBuffer` and `AnyMapHolder` -> `AnyMap`
* pods
* rename move
* perf: Make final
* fix: Replace usage in Nitrogen & make backwards compatible
* Update AnyMapUtils.hpp
* fix: Fix minor c++ usage
* fix: Format
* fix: Make it backwards compatible.
* feat: Add support for `Date` types
* feat: Add Swift example
* Update Podfile.lock
* Use java.time.Instant
* fix: Fix bugs
* fix: Now it builds
* Update getTests.ts
* fix: Fix `Date.valueOf(..)` not using `this`
* Lint
* Simplify
* fix: Use Double
* Parse Swift Date
* fix: Use `double` now
* Use `margelo.nitro.chrono_time`
* feat: Add `Date` to docs
* ci: Remove pods cache
* Revert "ci: Remove pods cache"
This reverts commit b1c47f4fe0.
* Update Podfile.lock
* Update Podfile.lock
* fix: Fix JInstant methods on Kotlin
They're called differently.
* feat: Improve the tests a bit
* valueOf -> getTime
* feat: Create `Sync<T>`
* Return
* Make it return number
* feat: Add `isSync` check...
* check
* Impl
* feat: Add `JSCallback`
* perf: Store `Dispatcher` in cache if really missed
* I think it builds now
* fix memory
* fix: Use `isAsync`
* Rename
* fix: Impl `callHybridFunction` again
* fix: Avoid forward decl
* Docs
* feat: Cache `regex` in `NitroTypeInfo`
* Update NitroTypeInfo.cpp
* perf: Make `Dispatcher` a `weak_ptr`
* Some formating
* fix: Fix styling in Benchmarks
* feat: Test if callbackSync returns same number
* fix: Fix warning in `toString()`
* Update Sync.ts
* perf: Allow `std::forward<...>`
* 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: 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
* chore: Use C++ 23
* feat: Add `ResultWrappingType`
* feat: Add C++ `ResultWrappingType` bridge
* feat: Use C++ result wrapper
* feat: Use `std::expected` for Swift return types
* Bump to 23
* Downgrade to C++ 20 again
* fix: Use `Result<T>` instead of expected
* fix: Return even if void
* fix: Explicitly say type
* extra line for debugging
* fix: Fix double args
* fix: Bridge directly to C++ target for return values
* feat: THROW SWIFT ERROR WOOHOOO
* feat: Make it work
* feat: Add test that uses `Result<complex type>` and throws before
* Update getTests.ts
* Update HybridTestObjectKotlin.kt
* extra line
* perf: Use `assert` for `value()`
* docs: Remove error swift limitation as it now works
* fix: Fix build when using `use_frameworks`
* Update Podfile.lock
* fix: Declare dependency on `React-jsi` and `React-callinvoker`
* fix: Add `folly_compiler_flags`
* fix: Add `GCC_PREPROCESSOR_DEFINITIONS` again because we need to disable folly config
* fix: Remove unused compiler_flags
* Update Podfile.lock
* 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
* 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
* feat: Safely wrap a Swift closure in a `SwiftClosure` struct callable from C++
* Unsafely unwrap (`!`)
* fix: Fix visibility modifiers
* fix: Rename `ClosureWrapper` -> `SwiftClosure`
* Update SwiftClosure.hpp
* Update SwiftClosure.hpp
* Create `SwiftFunction` base
* regen
* feat: Properly create `std::function` from Swift closure
* fix: Forward params I think
* Update SwiftCxxBridgedType.ts
* feat: Use static function pointer to allow for C++ types
* fix: Only do this for Swift
* Update SwiftCxxBridgedType.ts
* fix: Properly unwrap using `Unmanaged`
* fix: Fix Swift compiler crash by moving function to `std::shared_ptr` before capturing it
* feat: Properly share func before capturing it
* Update SwiftCxxTypeHelper.ts
* feat: Create `AnyMapHolder` for Swift
* feat: Bridge other types
* fix: Fix types
* feat: Make all public
* fix: Remove Arrays because of the Swift compiler bug
* feat: Create `AnyMapHolder`
* fix: Rename record `someMap` to `someRecord`
* feat: Use `someMap`
* fix: Fix "22 duplicate symbols" by making the funcs inline
* Update README.md
* feat: Support `ArrayBuffer` in Swift
* feat: Create `ArrayBufferHolder` that holds a `std::shared_ptr<ArrayBuffer>`
* fix: Fix `void*` cast in Swift
* feat: Create `.allocate(..)` helper init
* fix: Fix `initializeToZero`
* feat: Add `createNewBuffer`
* fix: regenerate missing specs
* fix: Move import to iOS only, on Android we dont have that
* chore: Format