This repository was archived by the owner on Aug 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,7 @@ exports.run = async (options) => {
135135 packagesWithScripts
136136 . forEach ( ( entry ) => {
137137
138- const path = entry . path ;
139- const childPkg = entry . childPkg ;
138+ const { path, childPkg } = entry ;
140139 const name = entry . childPkg . name ;
141140
142141 if ( allowScripts [ name ] === undefined ) {
@@ -155,7 +154,7 @@ exports.run = async (options) => {
155154 }
156155
157156 if ( ! Semver . validRange ( allowScripts [ name ] ) ) {
158- errors . push ( `${ name } (invalid semver range)` ) ;
157+ errors . push ( `${ name } (invalid semver range: ${ allowScripts [ name ] } )` ) ;
159158 return ;
160159 }
161160
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ describe('allow-scripts', () => {
190190 'without-scripts'
191191 ] ) ;
192192
193- await expect ( Allow . run ( { } ) ) . to . reject ( 'Mis-configured allowedScripts: @example/with-install-script (invalid semver range)' ) ;
193+ await expect ( Allow . run ( { } ) ) . to . reject ( 'Mis-configured allowedScripts: @example/with-install-script (invalid semver range: not-a-semver-range )' ) ;
194194
195195 expect ( fixture . getActualResult ( ) ) . to . equal ( '' ) ;
196196 expect ( fixture . getLog ( ) ) . to . equal ( '' ) ;
You can’t perform that action at this time.
0 commit comments