Skip to content

Commit

Permalink
refactor: optimize version reading code
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Dec 10, 2024
1 parent ebbeb4f commit 270562d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/bin/env node
import { release, publish, changelog, commitLint } from '../dist/index.js'
import { Command } from 'commander'
import { fileURLToPath } from 'url'
import fse from 'fs-extra'

const program = new Command()

const packageJson = fse.readJSONSync(fileURLToPath(new URL('../package.json', import.meta.url)))
const packageJson = fse.readJSONSync(new URL('../package.json', import.meta.url))

program.version(packageJson.version)

Expand Down

0 comments on commit 270562d

Please sign in to comment.