File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @codrjs/config" ,
3- "version" : " 1.0.3-patch1 " ,
3+ "version" : " 1.0.3-patch2 " ,
44 "description" : " Codr configuration, unified" ,
55 "main" : " ./cjs/index.js" ,
66 "module" : " ./esm/index.js" ,
Original file line number Diff line number Diff line change @@ -9,22 +9,27 @@ export const NodeConfig: {
99 modules : Object . keys ( process . env )
1010 . filter ( m => / n p m _ p a c k a g e _ d e p e n d e n c i e s _ / g. test ( m ) )
1111 . map ( m => [ m , process . env [ m ] ] as [ string , string ] )
12- . map ( m => m [ 0 ] . replace ( / n p m _ p a c k a g e _ d e p e n d e n c i e s _ / g, "" ) )
13- . map ( m => [
14- m [ 0 ]
15- . split ( "_" )
16- . map ( ( p , idx ) =>
17- p === ""
18- ? "@"
19- : idx === m [ 0 ] . split ( "_" ) . length - 1 && m [ 0 ] . split ( "_" ) . length !== 1
20- ? `/${ p } `
21- : p ,
22- )
23- . join ( "" ) ,
24- m [ 1 ] ,
25- ] )
26- . reduce ( ( acc , curr ) => {
27- return ( acc [ curr [ 0 ] ] = curr [ 1 ] ) ;
28- } , { } ) ,
12+ . map ( m => [ m [ 0 ] . replace ( / n p m _ p a c k a g e _ d e p e n d e n c i e s _ / g, "" ) , m [ 1 ] ] )
13+ . map (
14+ m =>
15+ [
16+ m [ 0 ]
17+ . split ( "_" )
18+ . map ( ( p , idx ) =>
19+ p === ""
20+ ? "@"
21+ : idx === m [ 0 ] . split ( "_" ) . length - 1 &&
22+ m [ 0 ] . split ( "_" ) . length !== 1
23+ ? `/${ p } `
24+ : p ,
25+ )
26+ . join ( "" ) ,
27+ m [ 1 ] ,
28+ ] as string [ ] ,
29+ )
30+ . reduce ( ( acc , [ key , value ] ) => {
31+ acc [ key ] = value ;
32+ return acc ;
33+ } , { } as Record < string , string > ) ,
2934 yarnVersion : process . env . YARN_VERSION as string ,
3035} ;
You can’t perform that action at this time.
0 commit comments