mrousavy / nitro

🔥 Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI
https://nitro.margelo.com
MIT License
642 stars 22 forks source link

Add react-native-nitro-modules to peerDependencies in packages/template/package.json #359

Closed jobpaardekooper closed 2 days ago

jobpaardekooper commented 2 days ago

What's happening?

I am wondering if there is a reason why in the example/package.json file the react-native-nitro-modules is not added as a peer dependency. To me it seems from the nitro docs that library users will always need to install this package so might as well add it as a peer dependency. Or am I missing something?

I know it's a small thing, just curious if there is a reason not to do it.

Reproduceable Code

-

Relevant log output

-

Device

-

Nitro Modules Version

0.17.0

Nitrogen Version

0.17.0

Can you reproduce this issue in the Nitro Example app here?

Yes, I can reproduce the same issue in the Example app here

Additional information

mrousavy commented 2 days ago
  1. The example/ is not an example library - it is an example app. The example librars is in packages/react-native-nitro-image.
  2. The deps in the example app should be in dependencies, not devDependencies. Thanks for reminding me - I just fixed that.
jobpaardekooper commented 2 days ago

Sorry, I was looking at the wrong directory when writing the issue. I ment to refer to packages/template/package.json. There react-native-nitro-modules is not in the peerDependencies. And this is the template library that the documentations also suggests to copy to get started. For packages/react-native-nitro-image it is correctly listed in the peerDependencies but not for packages/template.

mrousavy commented 2 days ago

Ah you are correct!!