Skip to content

Commit 66dcc21

Browse files
committed
fix: restrict react-native version to 0.78.2
1 parent 2d7e794 commit 66dcc21

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/create-react-native-library/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ import { createInitialGitCommit } from './utils/initialCommit';
2020
import { prompt } from './utils/prompt';
2121
import { resolveNpmPackageVersion } from './utils/resolveNpmPackageVersion';
2222

23-
const FALLBACK_BOB_VERSION = '0.38.3';
23+
const FALLBACK_BOB_VERSION = '0.40.4';
2424
const FALLBACK_NITRO_MODULES_VERSION = '0.22.1';
25+
const SUPPORTED_REACT_NATIVE_VERSION = '0.78.2';
2526

2627
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
2728
yargs
@@ -69,6 +70,8 @@ async function create(_argv: yargs.Arguments<Args>) {
6970
const promptAnswers = await prompt(questions, argv);
7071
const answers: Answers = {
7172
...promptAnswers,
73+
reactNativeVersion:
74+
promptAnswers.reactNativeVersion ?? SUPPORTED_REACT_NATIVE_VERSION,
7275
local,
7376
};
7477

@@ -94,7 +97,7 @@ async function create(_argv: yargs.Arguments<Args>) {
9497

9598
await fs.mkdirp(folder);
9699

97-
if (answers.reactNativeVersion != null) {
100+
if (answers.reactNativeVersion !== SUPPORTED_REACT_NATIVE_VERSION) {
98101
printUsedRNVersion(answers.reactNativeVersion, config);
99102
}
100103

packages/create-react-native-library/src/inform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export function printUsedRNVersion(
129129
) {
130130
if (config.example === 'vanilla') {
131131
console.log(
132-
`${kleur.blue('ℹ')} Using ${kleur.cyan(
132+
`${kleur.blue('ℹ')} Using untested ${kleur.cyan(
133133
`react-native@${version}`
134134
)} for the example`
135135
);

packages/create-react-native-library/src/input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export type Answers = {
181181
languages: ProjectLanguages;
182182
type: ProjectType;
183183
example: ExampleApp;
184-
reactNativeVersion?: string;
184+
reactNativeVersion: string;
185185
local?: boolean;
186186
};
187187

0 commit comments

Comments
 (0)