-
Notifications
You must be signed in to change notification settings - Fork 27
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
fix: @react-native/community-cli-plugin
depends on @react-native-community/cli-server-api
#105
Draft
tido64
wants to merge
1
commit into
react-native-community:main
Choose a base branch
from
tido64:tido/depends-on-cli-server-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
fix: @react-native/community-cli-plugin
depends on @react-native-community/cli-server-api
#105
tido64
wants to merge
1
commit into
react-native-community:main
from
tido64:tido/depends-on-cli-server-api
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/cli-server-api` See facebook/react-native#47309 for context.
cortinico
approved these changes
Feb 13, 2025
szymonrybczak
approved these changes
Feb 13, 2025
As discussed with @tido64 and @cortinico offline - I don't think adding to the template dependencies is necessary to solve this problem, since we already have a cli -> cli-server-api hard dep, we can resolve through or use re-exports. PRs incoming - request we don't merge this. |
3 tasks
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Feb 19, 2025
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
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Feb 19, 2025
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
See facebook/react-native#47309 for context.
Changelog:
[GENERAL] [FIXED] -
@react-native/community-cli-plugin
requires@react-native-community/cli-server-api
to register thebundle
andstart
commands correctly.Test Plan:
n/a