@@ -5,8 +5,6 @@ import spawn from '@npmcli/promise-spawn'
55import chalk from 'chalk'
66import yargsParse from 'yargs-parser'
77
8- import { objectEntries } from '@socketsecurity/registry/lib/objects'
9-
108import type { CliSubcommand } from '../utils/meow-with-subcommands'
119
1210const distPath = __dirname
@@ -131,18 +129,18 @@ function argvToArray(argv: {
131129} ) : string [ ] {
132130 if ( argv [ 'help' ] ) return [ '--help' ]
133131 const result = [ ]
134- for ( const { 0 : key , 1 : value } of objectEntries ( argv ) ) {
132+ for ( const { 0 : key , 1 : value } of Object . entries ( argv ) ) {
135133 if ( key === '_' || key === '--' ) continue
136134 if ( key === 'babel' || key === 'install-deps' || key === 'validate' ) {
137135 // cdxgen documents no-babel, no-install-deps, and no-validate flags so
138136 // use them when relevant.
139137 result . push ( `--${ value ? key : `no-${ key } ` } ` )
140138 } else if ( value === true ) {
141- result . push ( `--${ String ( key ) } ` )
139+ result . push ( `--${ key } ` )
142140 } else if ( typeof value === 'string' ) {
143- result . push ( `--${ String ( key ) } ` , String ( value ) )
141+ result . push ( `--${ key } ` , String ( value ) )
144142 } else if ( Array . isArray ( value ) ) {
145- result . push ( `--${ String ( key ) } ` , ...value . map ( String ) )
143+ result . push ( `--${ key } ` , ...value . map ( String ) )
146144 }
147145 }
148146 if ( argv [ '--' ] ) {
0 commit comments