Skip to content

Commit

Permalink
feat: deps, replace yargs with native parseArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Nov 2, 2024
1 parent 1d81f7d commit 0e43dae
Show file tree
Hide file tree
Showing 3 changed files with 890 additions and 1,233 deletions.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
"dependencies": {
"@semantic-release/changelog": "^6.0.0",
"@semantic-release/git": "^10.0.0",
"semantic-release": "^24.0.0",
"yargs": "^17.1.1"
"semantic-release": "^24.0.0"
},
"devDependencies": {
"@types/node": "^20.6.2",
"@types/yargs": "^17.0.2"
"@types/node": "^22.8.6"
},
"bin": {
"release": "src/bin/release.js"
Expand All @@ -33,7 +31,7 @@
"url": "https://github.com/NaturalCycles/semantic-release"
},
"engines": {
"node": ">=20.11"
"node": ">=20.13.0"
},
"description": "semantic-release with some tweaks and default config",
"author": "Natural Cycles Team",
Expand Down
17 changes: 10 additions & 7 deletions src/bin/release.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
#!/usr/bin/env node

const yargs = require('yargs')
const path = require('node:path')
const fs = require('node:fs')
const { parseArgs } = require('node:util')

main().catch(err => {
console.error(err)
process.exit(1)
})

async function main() {
const {config: configPath} = yargs.options({
config: {
type: 'string',
descr: 'Path to config file',
}
}).argv
const { config: configPath } = parseArgs({
options: {
config: {
type: 'string',
descr: 'Path to config file',
},
},
}).values
// console.log({configPath})

const cwd = process.cwd()

Expand Down
Loading

0 comments on commit 0e43dae

Please sign in to comment.