-
Notifications
You must be signed in to change notification settings - Fork 24.7k
community-cli-plugin: resolve cli-server-api via peer dependency on cli #49518
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
Summary: `react-native/community-cli-plugin` depends on `createDevServerMiddleware` from `react-native-community/cli-server-api`. `react-native/community-cli-plugin` currently [declares an optional peer dependency](https://github.com/facebook/react-native/blob/bae895500052bda2f55e1832b0c8a63a1b449de3/packages/community-cli-plugin/package.json#L39-L45) on `react-native-community/cli-server-api`, however because the latter isn't a dependency of `react-native` or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see #47309. Rather than add an unnecessary dependency to the template (like [this](react-native-community/template#105)), my proposal is to switch to a peer dependency on only `react-native-community/cli`, because that *is* a dependency of the community template and therefore will be resolvable. Because `react-native-community/cli` doesn't re-export `createDevServerMiddleware` from its dependency on `cli-server-api`, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - react-native-community/cli#2605. Changelog: [GENERAL][FIXED] Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. Differential Revision: D69848688
This pull request was exported from Phabricator. Differential Revision: D69848688 |
This pull request has been merged in cdaa1aa. |
This pull request was successfully merged by @robhogan in cdaa1aa When will my fix make it into a release? | How to file a pick request? |
…li (#49518) Summary: Pull Request resolved: #49518 `react-native/community-cli-plugin` depends on `createDevServerMiddleware` from `react-native-community/cli-server-api`. `react-native/community-cli-plugin` currently [declares an optional peer dependency](https://github.com/facebook/react-native/blob/bae895500052bda2f55e1832b0c8a63a1b449de3/packages/community-cli-plugin/package.json#L39-L45) on `react-native-community/cli-server-api`, however because the latter isn't a dependency of `react-native` or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see #47309. Rather than add an unnecessary dependency to the template (like [this](react-native-community/template#105)), my proposal is to switch to a peer dependency on only `react-native-community/cli`, because that *is* a dependency of the community template and therefore will be resolvable. Because `react-native-community/cli` doesn't re-export `createDevServerMiddleware` from its dependency on `cli-server-api`, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - react-native-community/cli#2605. Changelog: [GENERAL][FIXED] Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. Reviewed By: huntie Differential Revision: D69848688 fbshipit-source-id: 009b8ffd43b2ab2d84fcc71e9e48382eb8950bb1
This pull request was successfully merged by @robhogan in f5989cc When will my fix make it into a release? | How to file a pick request? |
…li (#49518) (#50098) Summary: Pull Request resolved: #49518 `react-native/community-cli-plugin` depends on `createDevServerMiddleware` from `react-native-community/cli-server-api`. `react-native/community-cli-plugin` currently [declares an optional peer dependency](https://github.com/facebook/react-native/blob/bae895500052bda2f55e1832b0c8a63a1b449de3/packages/community-cli-plugin/package.json#L39-L45) on `react-native-community/cli-server-api`, however because the latter isn't a dependency of `react-native` or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see #47309. Rather than add an unnecessary dependency to the template (like [this](react-native-community/template#105)), my proposal is to switch to a peer dependency on only `react-native-community/cli`, because that *is* a dependency of the community template and therefore will be resolvable. Because `react-native-community/cli` doesn't re-export `createDevServerMiddleware` from its dependency on `cli-server-api`, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - react-native-community/cli#2605. Changelog: [GENERAL][FIXED] Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. Reviewed By: huntie Differential Revision: D69848688 fbshipit-source-id: 009b8ffd43b2ab2d84fcc71e9e48382eb8950bb1
This pull request was successfully merged by @robhogan in 9ffbead When will my fix make it into a release? | How to file a pick request? |
Summary:
react-native/community-cli-plugin
depends oncreateDevServerMiddleware
fromreact-native-community/cli-server-api
.react-native/community-cli-plugin
currently declares an optional peer dependency onreact-native-community/cli-server-api
, however because the latter isn't a dependency ofreact-native
or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see #47309.Rather than add an unnecessary dependency to the template (like this), my proposal is to switch to a peer dependency on only
react-native-community/cli
, because that is a dependency of the community template and therefore will be resolvable.Because
react-native-community/cli
doesn't re-exportcreateDevServerMiddleware
from its dependency oncli-server-api
, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - react-native-community/cli#2605.Changelog:
[GENERAL][FIXED] Fix registering of
start
andbundle
commands with community CLI and isolated node_modules.Differential Revision: D69848688