Skip to content

Commit

Permalink
3.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBrahma committed Dec 17, 2023
1 parent 9606e83 commit 3347721
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gev",
"type": "module",
"version": "3.0.9",
"version": "3.0.10",
"description": "Sets up templates",
"keywords": [
"generator",
Expand Down
12 changes: 3 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@ import { execa } from 'execa';
import inquirer from 'inquirer';
import latestVersion from 'latest-version';
import compareSemver from 'semver-compare';
import {
configData,
getAvailableFlavors,
loadConfigs,
pathFromRoot,
setConfigs,
version,
} from './utils.js';
import { version } from '../package.json' assert { type: 'json' };
import { configData, getAvailableFlavors, loadConfigs, pathFromRoot, setConfigs } from './utils.js';

const program = new Command();

Expand Down Expand Up @@ -55,7 +49,7 @@ program
)}]. Recalling gev with @latest.\n`,
);

await execa('bunx', ['gev@latest', '--no-check-latest', ...process.argv.slice(2)], {
await execa('bunx', [`gev@${latestVer}`, '--no-check-latest', ...process.argv.slice(2)], {
stdio: 'inherit',
}).catch(null); // ignore throw here. It will already be treated in the @latest.

Expand Down
2 changes: 0 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { readdirSync } from 'fs';
import path from 'path';
import { execaCommand, execaSync } from 'execa';

export const { version } = require('../package.json') as { version: string };

export const pathFromRoot = (...p: Array<string>) => path.resolve(import.meta.dir, '..', ...p);
// const require = createRequire(import.meta.url);
// export const { version } = JSON.parse(readFileSync(pathFromRoot('package.json'), 'utf-8')) as { version: string };
Expand Down

0 comments on commit 3347721

Please sign in to comment.