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(
4343 ? ModuleLoader ( {
4444 authToken : flags . registryToken ,
4545 npmRegistryUrl : flags . registry ,
46+ verbose : Boolean ( flags . verbose ) ,
4647 } )
4748 : ( new PluginManager ( pluginManagerConfig ) as unknown as MdlLoader ) ;
4849
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { ModuleLoader } from '@hypermod/fetcher';
77const ModuleLoader = ( config : {
88 npmRegistryUrl ?: string ;
99 authToken ?: string ;
10+ verbose ?: boolean ;
1011} ) : ModuleLoader => {
1112 const getInfo = ( packageName : string ) => {
1213 const entryPath = require . resolve ( packageName ) ;
@@ -26,6 +27,7 @@ const ModuleLoader = (config: {
2627
2728 const install = async ( packageName : string ) => {
2829 await installPackage ( packageName , {
30+ silent : ! config . verbose ,
2931 cwd : __dirname ,
3032 packageManager : 'npm' ,
3133 additionalArgs : [
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ function prepareJscodeshift(options) {
4848
4949function retrieveTransformId ( str ) {
5050 if ( str . includes ( '#' ) ) return false ;
51- return ( str . match ( / [ ^ @ ] * (?: [ @ ] (? ! .* [ @ ] ) ) ( .* ) $ / ) || [ , '' ] ) [ 1 ] ;
51+ const match = str . match ( / (?< ! \/ ) @ ( [ ^ \/ ] + ) $ / ) ;
52+ return match ? match [ 1 ] : '' ;
5253}
5354function retrievePresetId ( str ) {
5455 return ( str . match ( / [ ^ # ] * (?: [ # ] (? ! .* [ # ] ) ) ( .* ) $ / ) || [ , '' ] ) [ 1 ] ;
You can’t perform that action at this time.
0 commit comments