Skip to content

Commit 12556b9

Browse files
committed
fix: use current version of bob in generated project
1 parent a6d677a commit 12556b9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/create.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import inquirer from 'inquirer';
88
import yargs from 'yargs';
99
import validateNpmPackage from 'validate-npm-package-name';
1010
import githubUsername from 'github-username';
11+
import pack from '../package.json';
1112

1213
const TEMPLATE = path.resolve(__dirname, '../templates/library');
1314
const BINARIES = /(gradlew|\.(jar|xib|keystore|png|jpg|gif))$/;
@@ -120,6 +121,9 @@ export default async function create(argv: yargs.Arguments<any>) {
120121
const project = slug.replace(/^(react-native-|@[^/]+\/)/, '');
121122

122123
const options = {
124+
bob: {
125+
version: pack.version,
126+
},
123127
project: {
124128
slug,
125129
description,

templates/library/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"homepage": "<%= repo %>#readme",
3333
"devDependencies": {
3434
"@commitlint/config-conventional": "^8.3.4",
35-
"@react-native-community/bob": "^0.9.0",
35+
"@react-native-community/bob": "^<%= bob.version %>",
3636
"@react-native-community/eslint-config": "^0.0.7",
3737
"@types/jest": "^25.1.2",
3838
"@types/react": "^16.9.19",

0 commit comments

Comments
 (0)