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) => {
135
135
packagesWithScripts
136
136
. forEach ( ( entry ) => {
137
137
138
- const path = entry . path ;
139
- const childPkg = entry . childPkg ;
138
+ const { path, childPkg } = entry ;
140
139
const name = entry . childPkg . name ;
141
140
142
141
if ( allowScripts [ name ] === undefined ) {
@@ -155,7 +154,7 @@ exports.run = async (options) => {
155
154
}
156
155
157
156
if ( ! Semver . validRange ( allowScripts [ name ] ) ) {
158
- errors . push ( `${ name } (invalid semver range)` ) ;
157
+ errors . push ( `${ name } (invalid semver range: ${ allowScripts [ name ] } )` ) ;
159
158
return ;
160
159
}
161
160
Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ describe('allow-scripts', () => {
190
190
'without-scripts'
191
191
] ) ;
192
192
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 )' ) ;
194
194
195
195
expect ( fixture . getActualResult ( ) ) . to . equal ( '' ) ;
196
196
expect ( fixture . getLog ( ) ) . to . equal ( '' ) ;
You can’t perform that action at this time.
0 commit comments