Skip to content

Commit

Permalink
Correctly declare runtime dependencies (#41398)
Browse files Browse the repository at this point in the history
Summary:
In pnpm setups, codegen will fail during build because it cannot find its dependencies. Some of the dependencies it relies on at runtime are currently declared under `devDependencies`. This change moves them to `dependencies`.

## Changelog:

[GENERAL] [FIXED] - Fix `react-native/codegen` not being able to resolve dependencies in pnpm setups

Pull Request resolved: #41398

Test Plan: We are currently trying to [enable pnpm mode](microsoft/rnx-kit#2811) in rnx-kit and hit this issue. We've patched this package locally and it works.

Reviewed By: christophpurrer

Differential Revision: D51169116

Pulled By: NickGerleman

fbshipit-source-id: 28906a0de412c660d2fc42f62deaf77240d27a58
  • Loading branch information
tido64 authored and facebook-github-bot committed Nov 9, 2023
1 parent 9320174 commit c58e19e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
],
"dependencies": {
"@babel/parser": "^7.20.0",
"glob": "^7.1.1",
"hermes-parser": "0.17.1",
"invariant": "^2.2.4",
"jscodeshift": "^0.14.0",
"mkdirp": "^0.5.1",
"nullthrows": "^1.1.1"
},
"devDependencies": {
Expand All @@ -46,11 +49,8 @@
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"chalk": "^4.0.0",
"glob": "^7.1.1",
"hermes-estree": "0.17.1",
"invariant": "^2.2.4",
"micromatch": "^4.0.4",
"mkdirp": "^0.5.1",
"prettier": "2.8.8",
"rimraf": "^3.0.2"
},
Expand Down

0 comments on commit c58e19e

Please sign in to comment.