@wordpress/compose 8.8.2-next.v.202609171837.0 → 8.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 8.8.1-next.0 (2026-09-17)
5
+ ## 8.9.0 (2026-09-23)
6
6
 
7
7
  ### Bug Fixes
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/compose",
3
- "version": "8.8.2-next.v.202609171837.0",
3
+ "version": "8.9.0",
4
4
  "description": "WordPress higher-order components (HOCs).",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -21,8 +21,7 @@
21
21
  "url": "https://github.com/WordPress/gutenberg/issues"
22
22
  },
23
23
  "engines": {
24
- "node": ">=18.12.0",
25
- "npm": ">=8.19.2"
24
+ "node": ">=18.12.0"
26
25
  },
27
26
  "files": [
28
27
  "src",
@@ -46,20 +45,20 @@
46
45
  "sideEffects": false,
47
46
  "dependencies": {
48
47
  "@types/mousetrap": "^1.6.8",
49
- "@wordpress/deprecated": "^4.55.1-next.v.202609171837.0",
50
- "@wordpress/dom": "^4.55.2-next.v.202609171837.0",
51
- "@wordpress/element": "^8.7.1-next.v.202609171837.0",
52
- "@wordpress/is-shallow-equal": "^5.55.1-next.v.202609171837.0",
53
- "@wordpress/keycodes": "^4.56.1-next.v.202609171837.0",
54
- "@wordpress/priority-queue": "^3.55.1-next.v.202609171837.0",
55
- "@wordpress/private-apis": "^1.55.1-next.v.202609171837.0",
56
- "@wordpress/undo-manager": "^1.55.1-next.v.202609171837.0",
48
+ "@wordpress/deprecated": "^4.56.0",
49
+ "@wordpress/dom": "^4.56.0",
50
+ "@wordpress/element": "^8.8.0",
51
+ "@wordpress/is-shallow-equal": "^5.56.0",
52
+ "@wordpress/keycodes": "^4.56.0",
53
+ "@wordpress/priority-queue": "^3.56.0",
54
+ "@wordpress/private-apis": "^1.56.0",
55
+ "@wordpress/undo-manager": "^1.56.0",
57
56
  "change-case": "^4.1.2",
58
57
  "mousetrap": "^1.6.5",
59
58
  "use-memo-one": "^1.1.1"
60
59
  },
61
60
  "devDependencies": {
62
- "@testing-library/dom": "^10.4.1",
61
+ "@testing-library/dom": "^10.4.2",
63
62
  "@testing-library/react": "^16.3.3",
64
63
  "@testing-library/user-event": "^14.6.1",
65
64
  "mock-match-media": "^0.4.2",
@@ -79,5 +78,5 @@
79
78
  "publishConfig": {
80
79
  "access": "public"
81
80
  },
82
- "gitHead": "7fc9f6676debc888d2f071d17cb71837040d4b48"
81
+ "gitHead": "56d8058eda6e30c4cc8bfc37818fa6ed972f7dc2"
83
82
  }
@@ -1,6 +1,7 @@
1
- import { beforeEach, describe, expect, it, vi } from 'vitest';
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import { Component } from '@wordpress/element';
4
+ import { logged } from '@wordpress/deprecated';
4
5
  import withGlobalEvents from '../';
5
6
  import Listener from '../listener';
6
7
 
@@ -22,6 +23,9 @@ vi.mock( import( '../listener' ), async ( importOriginal ) => {
22
23
  } );
23
24
 
24
25
  describe( 'withGlobalEvents', () => {
26
+ const DEPRECATION_MESSAGE =
27
+ 'wp.compose.withGlobalEvents is deprecated since version 5.7. Please use useEffect instead.';
28
+
25
29
  class OriginalComponent extends Component {
26
30
  handleResize( event ) {
27
31
  this.props.onResize( event );
@@ -41,6 +45,10 @@ describe( 'withGlobalEvents', () => {
41
45
  }
42
46
  } );
43
47
 
48
+ afterEach( () => {
49
+ delete logged[ DEPRECATION_MESSAGE ];
50
+ } );
51
+
44
52
  it( 'renders with original component', () => {
45
53
  const EnhancedComponent = withGlobalEvents( {
46
54
  resize: 'handleResize',
@@ -59,6 +67,7 @@ describe( 'withGlobalEvents', () => {
59
67
 
60
68
  render( <EnhancedComponent ref={ () => {} }>Hello</EnhancedComponent> );
61
69
 
70
+ expect( console ).toHaveWarnedWith( DEPRECATION_MESSAGE );
62
71
  expect( Listener._instance.add ).toHaveBeenCalledWith(
63
72
  'resize',
64
73
  // If not `undefined`, then we consider handlers were properly bound to the wrapper component.
@@ -77,6 +86,7 @@ describe( 'withGlobalEvents', () => {
77
86
  Hello
78
87
  </EnhancedComponent>
79
88
  );
89
+ expect( console ).toHaveWarnedWith( DEPRECATION_MESSAGE );
80
90
 
81
91
  const event = { type: 'resize' };
82
92