-
Notifications
You must be signed in to change notification settings - Fork 210
feat(crnl): install nitro modules dependency automatically for local modules #828
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this manually, but LGTM.
Couple of Qs:
- How can I test this locally?
- Does it install
react-native-nitro-modules
for both local modules and standalone libraries?
const appPackageJson: PackageJson = await fs.readJson(appPackageJsonPath); | ||
const dependencies = appPackageJson['dependencies'] ?? {}; | ||
|
||
dependencies['react-native-nitro-modules'] = config.versions.nitroModules; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
import fs from 'fs-extra'; | ||
import path from 'path'; | ||
|
||
export async function determinePackageManager() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is bun
supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't officially support bun
right now. That being said, there is no real reason libraries bob generates shouldn't work with bun
. It might require some changes tho.
That's a yes, |
@renanmav dependencies for local libraries have been added to the project's |
Summary
create-react-native-library
will installreact-native-nitro-modules
automatically for local libraries.Test plan
create-react-native-library
to your RN appcreate-react-native-library
in the appNitro Modules
react-native-nitro-modules
is added to your app's dependencies.