-
Notifications
You must be signed in to change notification settings - Fork 116
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: get commands options and description from new package #477
fix: get commands options and description from new package #477
Conversation
🦋 Changeset detectedLatest commit: c019a75 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/repack/commands.js
Outdated
try { | ||
cliPath = path.dirname( | ||
require.resolve('react-native/node_modules/@react-native-community/cli') | ||
require.resolve('@react-native/community-cli-plugin') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break Re.Pack working with 0.71 or 0.72, isn't it? Couldn't we look for "bin"
entry in react-native
package, which points to the cli?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we can't go with the easy path, because right now start
and bundle
command are added in react-native.config.js
so they won't exist under /commands
dir.
@szymonrybczak is this still compatible with previous versions? We need to ensure compatibility with at least last 3 versions of RN (0.71, 0.72, 0.73) |
With the backwards compatibility it looks great, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few details to fix, other than that GJ! 🚀
Co-authored-by: Jakub Romańczyk <[email protected]>
Co-authored-by: Jakub Romańczyk <[email protected]>
Co-authored-by: Jakub Romańczyk <[email protected]>
Suggestions applied, should be good now! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Summary
Fixes #473. With React Native 0.73, we've migrated
start
andbundle
command to Core. So right now when resolving path to CLI and trying to require these commands from CLI, script will fail. In this PR I changed therequire.resolve
to look into new package, where these commands are living right now.Test plan
npx react-native@latest init app
npx @callstack/reapck-init
npx react-native config
should be executed correctly.