Skip to content

Commit 4fe7282

Browse files
fix: nitrogen script missing during release-it (#895)
<!-- Please provide enough information so that others can review your pull request. --> <!-- Keep pull requests small and focused on a single change. --> ### Summary I did a mistake here #891. I shouldn't have removed `"nitrogen":"nitrogen" `. During Release `npm run nitrogen` is called i think. This is breaking release it in case of nitro modules. This also fixes one more thing I noticed during nitro views the nitrogen wont be created in files in package.json (verified with `npm pack --dry-run`). <img width="307" height="349" alt="Screenshot 2025-10-15 at 1 15 41 PM" src="https://github.com/user-attachments/assets/21cd0ecf-7b4d-4a2a-b666-6b5f0cc97925" /> Nitro modules require nitrogen to be present in packaged. This would fix below issue <img width="400" height="600" alt="image" src="https://github.com/user-attachments/assets/82098fd8-05b6-4849-8868-0f657e3c7e23" /> <!-- What existing problem does the pull request solve? Can you solve the issue with a different approach? --> ### Test plan <!-- List the steps with which we can test this change. Provide screenshots if this changes anything visual. --> N/A
1 parent b5217c0 commit 4fe7282

File tree

1 file changed

+4
-1
lines changed
  • packages/create-react-native-library/templates/common

1 file changed

+4
-1
lines changed

packages/create-react-native-library/templates/common/$package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"android",
1919
"ios",
2020
"cpp",
21-
<% if (project.moduleConfig === "nitro-modules") { -%>
21+
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
2222
"nitrogen",
2323
"nitro.json",
2424
<% } -%>
@@ -48,6 +48,9 @@
4848
"clean": "del-cli lib",
4949
<% } -%>
5050
"prepare": "bob build",
51+
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
52+
"nitrogen": "nitrogen",
53+
<% } -%>
5154
"release": "release-it --only-version"
5255
},
5356
"keywords": [

0 commit comments

Comments
 (0)