File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -216,18 +216,22 @@ async function updatePackageJsons(
216
216
217
217
// update dep version and remove -exp in dep names
218
218
// don't care about devDependencies because they are irrelavant when using the package
219
- const dependencies = packageJson . dependencies || { } ;
220
- const newDependenciesObj : { [ key : string ] : string } = { } ;
221
- for ( const d of Object . keys ( dependencies ) ) {
222
- const dNextVersion = versions . get ( d ) ;
223
- const nameWithoutExp = removeExpInPackageName ( d ) ;
224
- if ( ! dNextVersion ) {
225
- newDependenciesObj [ nameWithoutExp ] = dependencies [ d ] ;
226
- } else {
227
- newDependenciesObj [ nameWithoutExp ] = dNextVersion ;
219
+ const depTypes = [ 'dependencies' , 'peerDependencies' ] ;
220
+
221
+ for ( const depType of depTypes ) {
222
+ const dependencies = packageJson [ depType ] || { } ;
223
+ const newDependenciesObj : { [ key : string ] : string } = { } ;
224
+ for ( const d of Object . keys ( dependencies ) ) {
225
+ const dNextVersion = versions . get ( d ) ;
226
+ const nameWithoutExp = removeExpInPackageName ( d ) ;
227
+ if ( ! dNextVersion ) {
228
+ newDependenciesObj [ nameWithoutExp ] = dependencies [ d ] ;
229
+ } else {
230
+ newDependenciesObj [ nameWithoutExp ] = dNextVersion ;
231
+ }
228
232
}
233
+ packageJson [ depType ] = newDependenciesObj ;
229
234
}
230
- packageJson . dependencies = newDependenciesObj ;
231
235
}
232
236
233
237
// set private to false
You can’t perform that action at this time.
0 commit comments