Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 9 months ago

#59634 closed defect (bug) (fixed)

`grunt-contrib-qunit` update causes problems in Gutenberg build process

Reported by: desrosj's profile desrosj Owned by:
Milestone: 6.4 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description

[56647] introduced some problems for contributors who have the Gutenberg plugin checked out for contributing within a checkout of wordpress-develop.

../../../../node_modules/puppeteer/lib/types.d.ts:610:6 - error TS2748: Cannot access ambient const enums when 'isolatedModules' is enabled.

While Core itself no longer relies on Puppeteer after [56926], grunt-contrib-qunit uses it to run the JavaScript QUnit tests. For some reason, some package is detecting the presence of Puppeteer in higher directories and causing this error.

For now, the dependency can be downgraded to fix this specific issue. Longer term, this will need to be solved and better detection should be added (see #59632).

Related: #58671, #58863, #59632.

Change History (6)

#1 @desrosj
10 months ago

This was originally reported by @afercia here.

#2 @desrosj
10 months ago

In 56944:

Build/Test Tools: Downgrade grunt-contrib-qunit dependency.

grunt-contrib-qunit was upgraded from version 7.0.1 to 8.0.1 in [56647]. However, this update causes a strange failure when running the build script for the Gutenberg plugin when checked out within a wordpress-develop checkout.

This reverts the related change in [56647] and downgrades the dependency back to 7.0.1 until the exact reason for the failure is narrowed down.

Props afercia, kevin940726, antonvlasenko, desrosj.
See #59634, #58863.

#3 @desrosj
10 months ago

@afercia @antonvlasenko Could you give this a test after [56944] to confirm the issue is resolved?

#4 @antonvlasenko
10 months ago

Yes, it fixed the issue for me. Thank you, @desrosj.

Test Report

This report validates that the indicated patch addresses the issue.

Patch tested: https://core.trac.wordpress.org/changeset/56944

Environment

  • WordPress: 6.4-beta4-56923-src
  • PHP: 7.3.33
  • Server: Apache/2.4.57 (Unix) PHP/7.3.33
  • Database: mysqli (Server: 5.7.43 / Client: Unavailable)
  • Browser: Safari 17.0 (macOS)
  • Theme: Twenty Twenty-Three 1.2
  • MU-Plugins: None activated
  • Plugins:
    • Gutenberg 16.8.1
  • node: v18.13.0
  • npm: v8.19.3

Actual Results

  • ✅ Issue resolved with patch.

#5 @desrosj
10 months ago

  • Resolution set to fixed
  • Status changed from new to closed

@antonvlasenko Thanks for confirming! I'm going to close this out as fixed. Hoping to commit a form of the suggested changes in #59632 to catch this issue in the future when this update is revisited.

#6 @desrosj
9 months ago

In 56976:

Build/Test Tools: Test the Gutenberg plugin build process.

A very common contributor setup is having a copy of the gutenberg development repository within a checkout of the wordpress-develop repository. On occasion, there are some strange incompatibilities that come up when using this setup. A few examples can be seen in #58671 and #59634.

This changeset helps ensure that these edge cases are not introduced by testing the Gutenberg plugin’s build process within WordPress configured to run from both the src and build directories.

This also renames the “Test npm” workflow to a more general “Test Build Processes”, which more accurately describes what is actually being tested within it and allows these new test jobs to be grouped in.

And finally, the logic within the workflow has been split out into two callable workflows. This helps avoid code duplication within the workflow, and allows for better grouping on the workflow run screen.

Props swissspidy, aferica, SergeyBiryukov, antonvlasenko, desrosj.
Fixes #59632. See #58671, #59634.

Note: See TracTickets for help on using tickets.