Make WordPress Core

Changeset 56035


Ignore:
Timestamp:
06/26/2023 03:41:25 PM (17 months ago)
Author:
Bernhard Reiter
Message:

Tools: Fix unresolvable conflicts computation in package sync script.

Computation of unresolvable version conflicts in the Gutenberg package
sync script had a few issues that were causing it to fail, among them
two type errors in the destructuring of function arguments.
Furthermore, de-duplication of required package versions was missing,
leading to false positives being reported, when multiple instances of
the same package all required the same version.

Props dmsnell.
Fixes #58628.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/release/sync-gutenberg-packages.js

    r53311 r56035  
    121121
    122122    // Ensure that all the conflicts can be resolved with the same version
    123     const unresolvableConflicts = Object.entries( groupBy( versionConflicts, ( [name] ) => name ) )
    124         .map( ( [name, group] ) => [name, group.map( ( [, { required }] ) => required )] )
     123    const unresolvableConflicts = Object.entries( groupBy( versionConflicts, ( {name} ) => name ) )
     124        .map( ( [name, group] ) => [name, uniq( group.map( ( { required } ) => required ) )] )
    125125        .filter( ( [, group] ) => group.length > 1 );
    126126    if ( unresolvableConflicts.length > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.