#58628 closed defect (bug) (fixed)
Tools: Gutenberg package sync script fails
Reported by: | Bernhard Reiter | Owned by: | Bernhard Reiter |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
Running npm run sync-gutenberg-packages -- --dist-tag=wp-6.3
currently results in the following error:
~/src/wordpress-develop/tools/release/sync-gutenberg-packages.js:126 .map( ( [name, group] ) => [name, group.map( ( [, { required }] ) => required )] ) ^ TypeError: undefined is not a function
after which script execution resumed, thus typically hiding the error behind a lot of other output.
However, this results in package.json
not being updated with the expected version bumps.
Change History (8)
This ticket was mentioned in PR #4701 on WordPress/wordpress-develop by @Bernhard Reiter.
19 months ago
#1
19 months ago
#2
Tested with node
version v18.14.2
in trunk
Running "wp-packages:refresh-deps" task Updating versions of dependencies listed in package.json (--dist-tag=wp-6.3) /Users/dmsnell/code/WordPress-develop/tools/release/sync-gutenberg-packages.js:123 const unresolvableConflicts = Object.entries( groupBy( versionConflicts, ( [name] ) => name ) ) ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at /Users/dmsnell/code/WordPress-develop/tools/release/sync-gutenberg-packages.js:123:75
in this branch
Running "wp-packages:refresh-deps" task Updating versions of dependencies listed in package.json (--dist-tag=wp-6.3) The following dependencies are outdated: [ { name: 'uuid', required: '8.3.2', actual: '9.0.0' }, { name: 'is-plain-object', required: '5.0.0', actual: '2.0.4' }, { name: 'uuid', required: '8.3.2', actual: '9.0.0' }, { name: 'path-to-regexp', required: '6.2.1', actual: '0.1.7' }, { name: 'uuid', required: '8.3.2', actual: '9.0.0' }, { name: 'uuid', required: '8.3.2', actual: '9.0.0' }, { name: 'is-plain-object', required: '5.0.0', actual: '2.0.4' }, { name: 'is-plain-object', required: '5.0.0', actual: '2.0.4' }, { name: 'is-plain-object', required: '5.0.0', actual: '2.0.4' } ]
@Bernhard Reiter commented on PR #4701:
19 months ago
#3
Thank you @dmsnell!
Tested with
node
versionv18.14.2
in
trunk
[...] TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
Right, that's the error message with Node 16 and later; mine was with v14. I should've mentioned that.
in this branch
That message is expected ✅
#4
@
19 months ago
- Owner set to Bernhard Reiter
- Resolution set to fixed
- Status changed from new to closed
In 56035:
@Bernhard Reiter commented on PR #4701:
19 months ago
#5
Committed to wordpress-develop
in https://core.trac.wordpress.org/changeset/56035.
@Bernhard Reiter commented on PR #4701:
19 months ago
#6
Committed to wordpress-develop
in https://core.trac.wordpress.org/changeset/56035.
@ramonopoly commented on PR #4701:
19 months ago
#7
Huge thanks for stepping in @ockham and @dmsnell 🙇
Running
npm run sync-gutenberg-packages -- --dist-tag=wp-6.3
would currently result in the following error:after which script execution resumed, thus typically hiding the error behind a lot of other output.
It would, however, result in
package.json
not being updated with the expected version bumps.This PR attempts to fix that logic.
### Testing Instructions
trunk
, runnpm run sync-gutenberg-packages -- --dist-tag=wp-6.3
. Scroll up near the start of the resulting output and verify that the above warning is present. Furthermore, verify thatpackage.json
is unchanged after running the script.package.json
is indeed changed. (Note that only three or so third-party dependencies' versions are changed, whereas no@wordpress/
packages are; this is due to a separate issue.)Trac ticket: https://core.trac.wordpress.org/ticket/58628