@@ -23,7 +23,7 @@ export const getPackageProperty = <T = unknown>(property: string): T | undefined
23
23
}
24
24
25
25
return getByPath ( packageJson , property ) as T | undefined ;
26
- }
26
+ } ;
27
27
28
28
export const getPackageSubProperty = < T = unknown > ( packageProperty : string ) => ( property : string ) : T | undefined => getPackageProperty < T > ( `${ packageProperty } .${ property } ` ) ;
29
29
@@ -39,8 +39,10 @@ export const hasPackageProperties = (properties: string[], strict?: boolean): bo
39
39
return properties . some ( ( property : string ) => hasPackageProperty ( property ) ) ;
40
40
} ;
41
41
42
- export const hasPackageSubProperties = ( packageProperty : string ) => ( properties : string [ ] , strict ?: boolean ) : boolean => hasPackageProperties ( properties . map ( ( p ) => `${ packageProperty } .${ p } ` ) ,
43
- strict , ) ;
42
+ export const hasPackageSubProperties = ( packageProperty : string ) => ( properties : string [ ] , strict ?: boolean ) : boolean => hasPackageProperties (
43
+ properties . map ( ( p ) => `${ packageProperty } .${ p } ` ) ,
44
+ strict ,
45
+ ) ;
44
46
45
47
export const environmentIsSet = ( name : string ) : boolean => Boolean ( process . env [ name ] && process . env [ name ] !== "undefined" ) ;
46
48
@@ -80,8 +82,8 @@ export const hasDevelopmentDep = hasDevDependencies;
80
82
81
83
// eslint-disable-next-line max-len
82
84
export const hasAnyDep = ( arguments_ : string [ ] , options ?: { peerDeps ?: boolean ; strict ?: boolean } ) : boolean => [ hasDependencies , hasDevDependencies , options ?. peerDeps === false ? ( ) => false : hasPeerDependencies ] . some (
83
- ( function_ : ( arguments_ : string [ ] , strict ?: boolean ) => boolean ) => function_ ( arguments_ , options ?. strict ) ,
84
- ) ;
85
+ ( function_ : ( arguments_ : string [ ] , strict ?: boolean ) => boolean ) => function_ ( arguments_ , options ?. strict ) ,
86
+ ) ;
85
87
86
88
export const hasTypescript : boolean = ( hasDependency ( "typescript" ) || hasDevDependency ( "typescript" ) ) && hasFile ( "tsconfig.json" ) ;
87
89
@@ -129,10 +131,10 @@ export const showMissingPackages = (
129
131
packageName : string ,
130
132
packages : string [ ] ,
131
133
options : {
132
- exit ?: boolean ;
133
134
consoleType ?: "error" | "info" | "log" | "warn" ;
134
- preMessage ?: string ;
135
+ exit ?: boolean ;
135
136
postMessage ?: string ;
137
+ preMessage ?: string ;
136
138
} = { } ,
137
139
) : void => {
138
140
const s = packages . length === 1 ? "" : "s" ;
0 commit comments