Skip to content

Commit

Permalink
Drop lodash.camelcase & minimist dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Nov 14, 2023
1 parent 35dce52 commit 10ac9c5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
37 changes: 34 additions & 3 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,42 @@

'use strict';

const minimist = require('minimist');
const camelCase = require('lodash.camelcase');
const util = require('node:util');
const checkDependencies = require('../lib/check-dependencies');

const argv = minimist(process.argv.slice(2));
const camelCase = x =>
x.replace(/-([a-z])/g, (__match, letter) => letter.toUpperCase());

const argv = util.parseArgs({
options: {
'package-manager': {
type: 'string',
},
'package-dir': {
type: 'string',
},
'only-specified': {
type: 'boolean',
},
install: {
type: 'boolean',
},
'scope-list': {
type: 'string',
multiple: true,
},
'optional-scope-list': {
type: 'string',
multiple: true,
},
'check-git-urls': {
type: 'boolean',
},
verbose: {
type: 'boolean',
},
},
}).values;

// camelCase the options
for (const key of Object.keys(argv)) {
Expand Down
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
],
"dependencies": {
"findup-sync": "^5.0.0",
"lodash.camelcase": "^4.3.0",
"minimist": "^1.2.8",
"picocolors": "^1.0.0",
"semver": "^7.5.4"
},
Expand Down

0 comments on commit 10ac9c5

Please sign in to comment.