Skip to content

Commit

Permalink
fix: use fs.readJson to get the version
Browse files Browse the repository at this point in the history
  • Loading branch information
atlj committed Apr 26, 2024
1 parent b6a47dc commit e027f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-react-native-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import githubUsername from 'github-username';
import prompts, { type PromptObject } from './utils/prompts';
import generateExampleApp from './utils/generateExampleApp';
import { spawn } from './utils/spawn';
import { version as crnlVersion } from '../package.json';

const FALLBACK_BOB_VERSION = '0.20.0';

Expand Down Expand Up @@ -794,6 +793,7 @@ async function create(argv: yargs.Arguments<any>) {
}
}

const crnlVersion = fs.readJsonSync('../package.json').version;
const metadata: Metadata = {
crnlVersion,
languages,
Expand Down

0 comments on commit e027f65

Please sign in to comment.