File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export default async function main(
43
43
? ModuleLoader ( {
44
44
authToken : flags . registryToken ,
45
45
npmRegistryUrl : flags . registry ,
46
+ verbose : Boolean ( flags . verbose ) ,
46
47
} )
47
48
: ( new PluginManager ( pluginManagerConfig ) as unknown as MdlLoader ) ;
48
49
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { ModuleLoader } from '@hypermod/fetcher';
7
7
const ModuleLoader = ( config : {
8
8
npmRegistryUrl ?: string ;
9
9
authToken ?: string ;
10
+ verbose ?: boolean ;
10
11
} ) : ModuleLoader => {
11
12
const getInfo = ( packageName : string ) => {
12
13
const entryPath = require . resolve ( packageName ) ;
@@ -26,6 +27,7 @@ const ModuleLoader = (config: {
26
27
27
28
const install = async ( packageName : string ) => {
28
29
await installPackage ( packageName , {
30
+ silent : ! config . verbose ,
29
31
cwd : __dirname ,
30
32
packageManager : 'npm' ,
31
33
additionalArgs : [
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ function prepareJscodeshift(options) {
48
48
49
49
function retrieveTransformId ( str ) {
50
50
if ( str . includes ( '#' ) ) return false ;
51
- return ( str . match ( / [ ^ @ ] * (?: [ @ ] (? ! .* [ @ ] ) ) ( .* ) $ / ) || [ , '' ] ) [ 1 ] ;
51
+ const match = str . match ( / (?< ! \/ ) @ ( [ ^ \/ ] + ) $ / ) ;
52
+ return match ? match [ 1 ] : '' ;
52
53
}
53
54
function retrievePresetId ( str ) {
54
55
return ( str . match ( / [ ^ # ] * (?: [ # ] (? ! .* [ # ] ) ) ( .* ) $ / ) || [ , '' ] ) [ 1 ] ;
You can’t perform that action at this time.
0 commit comments