Make WordPress Core

Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#61171 closed enhancement (fixed)

Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled

Reported by: darerodz's profile darerodz Owned by: gziolo's profile gziolo
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.6
Component: Interactivity API Keywords: has-patch
Focuses: javascript Cc:

Description

This ticket tracks the backporting of PHP files for the following Gutenberg changes:

Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled

It makes WordPress enqueue a different Interactivity API runtime version depending on the value of the SCRIPT_DEBUG constant.

Change History (5)

This ticket was mentioned in PR #6527 on WordPress/wordpress-develop by @darerodz.


3 months ago
#1

  • Keywords has-patch added

Syncs the changes from the following PR:

Enqueues a different Interactivity API runtime version with preact/debug when SCRIPT_DEBUG is enabled.

Trac ticket: https://core.trac.wordpress.org/ticket/61171

#2 @gziolo
3 months ago

  • Focuses javascript added
  • Milestone changed from Awaiting Review to 6.6

@darerodz commented on PR #6527:


3 months ago
#3

The @wordpress/interactivity version has not been updated yet in WordPress::trunk so it is expected to see errors in the tests like the following one:

Module not found: Error: Can't resolve '/home/runner/work/wordpress-develop/wordpress-develop/node_modules/@wordpress/interactivity/build-module/debug' in '/home/runner/work/wordpress-develop/wordpress-develop'

I tried this patch, and the changes work as expected:

  • package.json

    diff --git a/package.json b/package.json
    index 0d2549d42c..ed3cae92ff 100644
    a b  
    112112                "@wordpress/html-entities": "3.51.1",
    113113                "@wordpress/i18n": "4.51.1",
    114114                "@wordpress/icons": "9.42.4",
    115                 "@wordpress/interactivity": "5.0.5",
     115                "@wordpress/interactivity": "5.",
    116116                "@wordpress/interactivity-router": "1.1.5",
    117117                "@wordpress/interface": "5.28.6",
    118118                "@wordpress/is-shallow-equal": "4.51.1",

#4 @gziolo
2 months ago

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

In 58195:

Interactivity API: Include preact/debug when SCRIPT_DEBUG is enabled

Syncs the changes from Gutenberg: https://github.com/WordPress/gutenberg/pull/60514. Enqueues a different Interactivity API runtime version with preact/debug when SCRIPT_DEBUG is enabled.

Props darerodz, jonsurrell, gziolo.
Fixes #61171.

Note: See TracTickets for help on using tickets.