Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Separateweak-node-api package#308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kraenhansen merged 14 commits intomainfromkh/weak-node-api-package
Nov 6, 2025
Merged

Conversation

@kraenhansen
Copy link
Collaborator

@kraenhansenkraenhansen commentedNov 3, 2025
edited
Loading

Thisfixes#260 by moving the weak-node-api specifics from the host package into a separate package of the mono-repo.

Merging this PR will:

  • Move theweak-node-api and its related package scripts frompackages/host intopackages/weak-node-api and update the host to link against it.
  • Embrace thefind_package function as the recommended way of importing theweak-node-api target, over theinclude(...) pattern introduced inExplicitweak-node-api linkage #249.
  • Add theweak-node-api package to the test app. This is the biggest drawback of a separate package in my opinion - and the decision is driven by a few limiting factors:
    • An Xcframework must be co-located with the podspec adding it viavendored_frameworks (it's located using a glob expression relative to the pod root).
    • Podspecs cannot specify the source of dependencies. I.e. the:path can be used in the app's Podfile but not in a podspec, so we cannot simply locate and reference theweak-node-api pod "manually".
    • The React Native Community CLIdoesn't (yet) consider transitive dependencies when auto-linking.

TODO

  • Add a README.md to theweak-node-api package.
  • Experiment with referencing theweak-node-api podspec by path instead of relying on React Native autolinking to find it. This will mean we can get rid of the test app's dependency onweak-node-api and rely on a direct dependency from the host package - which Ithink is desirable?

RobinWuu reacted with hooray emojiRobinWuu reacted with rocket emoji
@kraenhansenkraenhansen self-assigned thisNov 3, 2025
@kraenhansenkraenhansenforce-pushed thekh/weak-node-api-package branch 2 times, most recently from5b1fb6e to7ccdc2dCompareNovember 3, 2025 16:51
@kraenhansenkraenhansen added Apple 🍎Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) Android 🤖Anything related to the Android platform (Gradle, NDK, Android SDK) Host 🏡Our `react-native-node-api-modules` package weak-node-api labelsNov 3, 2025
@kraenhansenkraenhansenforce-pushed thekh/weak-node-api-package branch 3 times, most recently from46488d6 tob07067eCompareNovember 4, 2025 12:48
@kraenhansenkraenhansen marked this pull request as ready for reviewNovember 4, 2025 19:21
@kraenhansen
Copy link
CollaboratorAuthor

Finally - on the 5th (!!!) attempt, this passed without the Android emulator failing to launch or Gradle crashing. I'm suspecting the runner is running out-of-memory 🙃

Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR separates theweak-node-api functionality from the host package into a dedicatedweak-node-api package, addressing issue#260. The change promotes better modularity and establishesfind_package as the recommended CMake integration pattern.

Key Changes:

  • Created newpackages/weak-node-api package with its own build configuration, scripts, and TypeScript project structure
  • Updated all CMake integrations to usefind_package(weak-node-api REQUIRED CONFIG) instead ofinclude(${WEAK_NODE_API_CONFIG})
  • Reorganized dependencies so thathost and other packages import from the newweak-node-api package

Reviewed Changes

Copilot reviewed 38 out of 43 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
packages/weak-node-api/*New package containing weak-node-api library, build scripts, CMake config, and TypeScript sources
packages/host/package.jsonRemoved weak-node-api build scripts and added dependency on new weak-node-api package
packages/host/src/node/weak-node-api.tsDeleted (functionality moved to weak-node-api package)
packages/host/android/build.gradleUpdated to reference weak-node-api from node_modules and use find_package
packages/host/android/CMakeLists.txtSimplified to use find_package instead of manual library configuration
packages/host/scripts/generate-weak-node-api-injector.mtsUpdated to import from weak-node-api package
packages/cmake-rn/src/weak-node-api.tsUpdated to import paths from weak-node-api package
packages/ferric/src/cargo.tsUpdated to import prebuild paths from weak-node-api package
packages/gyp-to-cmake/src/transformer.tsUpdated to use find_package instead of include
apps/test-app/package.jsonAdded weak-node-api as a dependency
.github/workflows/check.ymlUpdated build commands to target weak-node-api workspace

@kraenhansenkraenhansen linked an issueNov 5, 2025 that may beclosed by this pull request
@kraenhansenkraenhansen merged commit60fae96 intomainNov 6, 2025
8 checks passed
@kraenhansenkraenhansen deleted the kh/weak-node-api-package branchNovember 6, 2025 08:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

Assignees

@kraenhansenkraenhansen

Labels

Android 🤖Anything related to the Android platform (Gradle, NDK, Android SDK)Apple 🍎Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.)Host 🏡Our `react-native-node-api-modules` packageweak-node-api

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Create aREADME.md for theweak-node-api package. Moveweak-node-api into its own package

2 participants

@kraenhansen

[8]ページ先頭

©2009-2025 Movatter.jp