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 {
134134}
135135
136136function 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+ : [ ] ;
149147}
150148
151149function bzlId ( locator : Locator ) : string | undefined {
You can’t perform that action at this time.
0 commit comments