File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,21 +140,20 @@ const getDevDependencyLines = (
140140 }
141141 }
142142
143- if (
144- devDependencySectionStart === undefined ||
145- devDependencySectionEnd === undefined
146- ) {
143+ if ( devDependencySectionStart === undefined ) {
147144 return [ ] ;
148145 }
149146
150147 // Check which nonVersionLines fall within devDependencies sections
151148 for ( const changeLine of nonVersionLines ) {
152149 const lineIndex = allLines . findIndex ( ( line ) => line === changeLine ) ;
153150 if ( lineIndex !== - 1 ) {
154- // Check if this line falls within any devDependencies section
151+ // Check if this line falls within the devDependencies section
152+ // If we don't have an end, assume everything after start is in devDependencies
155153 const isInDevDeps =
156154 lineIndex >= devDependencySectionStart &&
157- lineIndex <= devDependencySectionEnd ;
155+ ( devDependencySectionEnd === undefined ||
156+ lineIndex <= devDependencySectionEnd ) ;
158157
159158 if ( isInDevDeps ) {
160159 devDependencyLines . push ( changeLine ) ;
You can’t perform that action at this time.
0 commit comments