#58628 closed defect (bug) (fixed)
Tools: Gutenberg package sync script fails
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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.
3 years ago
#1
3 years 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:
3 years ago
#3
Thank you @dmsnell!
Tested with
nodeversionv18.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
@
3 years ago
- Owner set to Bernhard Reiter
- Resolution set to fixed
- Status changed from new to closed
In 56035:
@Bernhard Reiter commented on PR #4701:
3 years ago
#5
Committed to wordpress-develop in https://core.trac.wordpress.org/changeset/56035.
@Bernhard Reiter commented on PR #4701:
3 years ago
#6
Committed to wordpress-develop in https://core.trac.wordpress.org/changeset/56035.
@ramonopoly commented on PR #4701:
3 years ago
#7
Huge thanks for stepping in @ockham and @dmsnell 🙇
Running
npm run sync-gutenberg-packages -- --dist-tag=wp-6.3would currently result 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 functionafter which script execution resumed, thus typically hiding the error behind a lot of other output.
It would, however, result in
package.jsonnot 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.jsonis unchanged after running the script.package.jsonis 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