Skip to content
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

always proxy to @react-native-community/cli #45464

Closed
wants to merge 1 commit into from

Conversation

blakef
Copy link
Contributor

@blakef blakef commented Jul 16, 2024

Summary:
Previous work would cause versions >= react-native 0.76 to exit if called through npx react-native <cmd>. This was intended to be full deprecated and removed. The intention was to shift users to calling react-native-community/cli directly.

This change allows commands to be proxied to react-native-community/cli but with no guarantees of success. It's up to each framework / project to explicitly create that dependency.

This also provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.

The outcome is that we're not going to break existing workflows.

closes: #45461

Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning

Differential Revision: D59805357

Output:

Dependency ccli missing from project:

CleanShot 2024-07-16 at 14 49 30@2x

Dependency ccli included in project & command proxies successfully:

CleanShot 2024-07-16 at 14 52 05@2x
oject

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 16, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59805357

Summary:
Pull Request resolved: facebook#45464

Previous work would cause versions >= react-native 0.76 to exit if called through `npx react-native <cmd>`. This was intended to be full deprecated and removed.  The intention was to shift users to calling react-native-community/cli directly.

This change allows commands to be proxied to react-native-community/cli but with no guarantees of success.  It's up to each framework / project to explicitly create that dependency.

This also  provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.

The outcome is that we're not going to break existing workflows.

closes: facebook#45461

Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning

Differential Revision: D59805357
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D59805357

return;
}

console.warn(`
${chalk.yellow('')}️ The \`init\` command is deprecated.
${chalk.yellow('🚨')}️ The \`init\` command is deprecated.
Copy link
Collaborator

@tido64 tido64 Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I don't think you can color 🚨:

Suggested change
${chalk.yellow('🚨')} The \`init\` command is deprecated.
🚨 The \`init\` command is deprecated.

Or you can, but it won't actually do anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this. You're right it's a total noop.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 18, 2024
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @blakef in 9aed45a

When will my fix make it into a release? | How to file a pick request?

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 9aed45a.

cipolleschi pushed a commit that referenced this pull request Jul 22, 2024
Summary:
Pull Request resolved: #45464

Previous work would cause versions >= react-native 0.76 to exit if called through `npx react-native <cmd>`. This was intended to be full deprecated and removed.  The intention was to shift users to calling react-native-community/cli directly.

This change allows commands to be proxied to react-native-community/cli but with no guarantees of success.  It's up to each framework / project to explicitly create that dependency.

This also  provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.

The outcome is that we're not going to break existing workflows.

closes: #45461

Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning

Reviewed By: cortinico

Differential Revision: D59805357

fbshipit-source-id: 21e23b082a9c709effa050d8e7dd04a40f5ab0e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[0.76.0 (nightly)] react-native command fails silently
4 participants