You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Implements the RFC which progressively provides warnings to users of the `npx react-native init` command as we gradually deprecate.
Changelog:
[General][Deprecated] - init cli deprecation logging
Reviewed By: cortinico
Differential Revision: D54423109
fbshipit-source-id: 679b6672bdbfc42a9b82a2aad38fd3253c6ea6a2
${chalk.yellow('⚠️')} The \`init\` command is deprecated.
101
+
The behavior will be changed on ${chalk.white.bold(CLI_DEPRECATION_DATE.toLocaleDateString())}${emphasis(`(${daysRemaining} day${daysRemaining>1 ? 's' : ''})`)}.
102
+
103
+
- Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
104
+
- Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
105
+
}
106
+
107
+
functionwarnWithDeprecated(){
108
+
if(process.argv[2]!=='init'){
109
+
return;
110
+
}
111
+
112
+
console.warn(`
113
+
${chalk.yellow('⚠')}️ The \`init\` command is deprecated.
114
+
115
+
- Switch to ${chalk.dim('npx @react-native-community/cli init')} for the identical behavior.
116
+
- Refer to the documentation for information about alternative tools: ${chalk.dim('https://reactnative.dev/docs/getting-started')}`);
0 commit comments