File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,17 +167,14 @@ async function run() {
167167 /** Uses packages and changedFiles to determine which packages have changed */
168168 const changedPackages = RELEASE_ALL
169169 ? packages
170- : changedFiles . reduce ( ( acc , file ) => {
171- const pkg = packages . find (
172- ( p ) =>
173- file . startsWith ( path . join ( p . packageDir , 'src' ) ) ||
174- file . startsWith ( path . join ( p . packageDir , 'package.json' ) ) ,
170+ : packages . filter ( ( pkg ) => {
171+ const changed = changedFiles . some (
172+ ( file ) =>
173+ file . startsWith ( path . join ( pkg . packageDir , 'src' ) ) ||
174+ file . startsWith ( path . join ( pkg . packageDir , 'package.json' ) ) ,
175175 )
176- if ( pkg && ! acc . find ( ( d ) => d . name === pkg . name ) ) {
177- acc . push ( pkg )
178- }
179- return acc
180- } , /** @type {import('./types').Package[] } */ ( [ ] ) )
176+ return changed
177+ } )
181178
182179 // If a package has a dependency that has been updated, we need to update the
183180 // package that depends on it as well.
You can’t perform that action at this time.
0 commit comments