File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -134,18 +134,16 @@ function npmLocator(locator: Locator): Locator | undefined {
134
134
}
135
135
136
136
function extractPatchPaths ( locator : Locator ) : string [ ] {
137
- if ( locator . reference . startsWith ( "patch:" ) ) {
138
- return patchUtils
139
- . parseLocator ( locator )
140
- . patchPaths . filter ( ( patchPath ) => ! patchPath . startsWith ( "~builtin" ) )
141
- . map ( ( patchPath ) => {
142
- // Replace final slash with a colon to make it a bazel label
143
- const parts = patchPath . split ( "/" ) ;
144
- return `//${ parts . slice ( 0 , - 1 ) . join ( "/" ) } :${ parts . slice ( - 1 ) } ` ;
145
- } ) ;
146
- } else {
147
- return [ ] ;
148
- }
137
+ return locator . reference . startsWith ( "patch:" )
138
+ ? patchUtils
139
+ . parseLocator ( locator )
140
+ . patchPaths . filter ( ( patchPath ) => ! patchPath . startsWith ( "~builtin" ) )
141
+ . map ( ( patchPath ) => {
142
+ // Replace final slash with a colon to make it a bazel label
143
+ const parts = patchPath . split ( "/" ) ;
144
+ return `//${ parts . slice ( 0 , - 1 ) . join ( "/" ) } :${ parts . slice ( - 1 ) } ` ;
145
+ } )
146
+ : [ ] ;
149
147
}
150
148
151
149
function bzlId ( locator : Locator ) : string | undefined {
You can’t perform that action at this time.
0 commit comments