File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -167,17 +167,14 @@ async function run() {
167
167
/** Uses packages and changedFiles to determine which packages have changed */
168
168
const changedPackages = RELEASE_ALL
169
169
? 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' ) ) ,
175
175
)
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
+ } )
181
178
182
179
// If a package has a dependency that has been updated, we need to update the
183
180
// package that depends on it as well.
You can’t perform that action at this time.
0 commit comments