@automattic/jetpack-shared-extension-utils 2.0.21 → 2.0.23

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
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.0.23] - 2026-09-18
9
+ ### Changed
10
+ - Update package dependencies. [#52187]
11
+
12
+ ### Fixed
13
+ - WpcomSupportLink: Mark the `supportPostId` prop as optional in the type definition. [#52436]
14
+
15
+ ## [2.0.22] - 2026-09-15
16
+ ### Changed
17
+ - Update package dependencies. [#52297]
18
+
8
19
  ## [2.0.21] - 2026-09-14
9
20
  ### Changed
10
21
  - Update dependencies. [#51015]
@@ -1064,6 +1075,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1064
1075
  ### Changed
1065
1076
  - Core: prepare utility for release
1066
1077
 
1078
+ [2.0.23]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.22...2.0.23
1079
+ [2.0.22]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.21...2.0.22
1067
1080
  [2.0.21]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.20...2.0.21
1068
1081
  [2.0.20]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.19...2.0.20
1069
1082
  [2.0.19]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.18...2.0.19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "2.0.21",
3
+ "version": "2.0.23",
4
4
  "description": "Utility functions used by the block editor extensions",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/shared-extension-utils/#readme",
6
6
  "bugs": {
@@ -28,26 +28,26 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@automattic/color-studio": "4.1.0",
31
- "@automattic/jetpack-analytics": "^1.0.15",
32
- "@automattic/jetpack-base-styles": "^1.2.12",
33
- "@automattic/jetpack-components": "^3.0.2",
34
- "@automattic/jetpack-connection": "^2.5.0",
35
- "@automattic/jetpack-script-data": "^0.6.6",
36
- "@automattic/jetpack-shared-stores": "^0.2.7",
31
+ "@automattic/jetpack-analytics": "^1.0.16",
32
+ "@automattic/jetpack-base-styles": "^1.2.13",
33
+ "@automattic/jetpack-components": "^3.1.0",
34
+ "@automattic/jetpack-connection": "^2.5.2",
35
+ "@automattic/jetpack-script-data": "^0.6.7",
36
+ "@automattic/jetpack-shared-stores": "^0.2.9",
37
37
  "@types/jest": "30.0.0",
38
- "@wordpress/api-fetch": "7.54.0",
39
- "@wordpress/block-editor": "17.0.0",
40
- "@wordpress/components": "40.0.0",
41
- "@wordpress/compose": "8.7.0",
42
- "@wordpress/data": "10.54.0",
43
- "@wordpress/dom-ready": "4.54.0",
44
- "@wordpress/element": "8.6.0",
45
- "@wordpress/hooks": "4.54.0",
46
- "@wordpress/i18n": "6.27.0",
47
- "@wordpress/plugins": "7.54.0",
48
- "@wordpress/primitives": "4.54.0",
49
- "@wordpress/ui": "0.21.0",
50
- "@wordpress/url": "4.54.0",
38
+ "@wordpress/api-fetch": "7.55.0",
39
+ "@wordpress/block-editor": "17.1.0",
40
+ "@wordpress/components": "40.1.0",
41
+ "@wordpress/compose": "8.8.0",
42
+ "@wordpress/data": "10.55.0",
43
+ "@wordpress/dom-ready": "4.55.0",
44
+ "@wordpress/element": "8.7.0",
45
+ "@wordpress/hooks": "4.55.0",
46
+ "@wordpress/i18n": "6.28.0",
47
+ "@wordpress/plugins": "7.55.0",
48
+ "@wordpress/primitives": "4.55.0",
49
+ "@wordpress/ui": "0.22.0",
50
+ "@wordpress/url": "4.55.0",
51
51
  "clsx": "2.1.1",
52
52
  "debug": "4.4.3",
53
53
  "social-logos": "^3.3.19"
@@ -56,13 +56,13 @@
56
56
  "@automattic/jetpack-webpack-config": "workspace:*",
57
57
  "@babel/core": "7.29.7",
58
58
  "@babel/runtime": "7.29.7",
59
- "@testing-library/dom": "10.4.1",
60
- "@testing-library/react": "16.3.2",
61
- "@testing-library/user-event": "14.6.1",
59
+ "@testing-library/dom": "10.4.2",
60
+ "@testing-library/react": "16.3.3",
61
+ "@testing-library/user-event": "14.6.7",
62
62
  "@types/react": "18.3.31",
63
63
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
64
- "babel-jest": "30.4.1",
65
- "jest": "30.4.2",
64
+ "babel-jest": "30.5.1",
65
+ "jest": "30.5.1",
66
66
  "jetpack-js-tools": "workspace:*",
67
67
  "react": "18.3.1",
68
68
  "react-dom": "18.3.1"
@@ -4,11 +4,11 @@ import { forwardRef } from 'react';
4
4
 
5
5
  /**
6
6
  * @typedef {object} WpcomSupportLinkProps
7
- * @property {string} supportLink - Support link URL.
8
- * @property {number} supportPostId - Support post ID.
9
- * @property {import('react').ReactNode} [children] - Support link content.
10
- * @property {Function} [onClick] - Callback function to be called when the link is clicked.
11
- * @property {object} [style] - CSS properties to be applied to the link.
7
+ * @property {string} supportLink - Support link URL.
8
+ * @property {number} [supportPostId] - Support post ID.
9
+ * @property {import('react').ReactNode} [children] - Support link content.
10
+ * @property {Function} [onClick] - Callback function to be called when the link is clicked.
11
+ * @property {object} [style] - CSS properties to be applied to the link.
12
12
  */
13
13
 
14
14
  export const WpcomSupportLink = forwardRef(
@@ -8,5 +8,5 @@ export const JETPACK_DATA_PATH = 'Jetpack_Editor_Initial_State';
8
8
  * @return {object|null} The Jetpack Editor State.
9
9
  */
10
10
  export default function getJetpackData() {
11
- return 'object' === typeof window ? window?.[ JETPACK_DATA_PATH ] ?? null : null;
11
+ return 'object' === typeof window ? ( window?.[ JETPACK_DATA_PATH ] ?? null ) : null;
12
12
  }
package/src/plan-utils.js CHANGED
@@ -35,7 +35,7 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
35
35
  plan_upgraded: 1,
36
36
  }
37
37
  );
38
- }
38
+ }
39
39
  : () => {
40
40
  // The editor for CPTs has an `edit/` route fragment prefixed.
41
41
  const postTypeEditorRoutePrefix = [ 'page', 'post' ].includes( postType ) ? '' : 'edit';
@@ -50,7 +50,7 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
50
50
  {
51
51
  plan_upgraded: 1,
52
52
  }
53
- )
53
+ )
54
54
  : addQueryArgs(
55
55
  window.location.protocol +
56
56
  `//${ getSiteFragment().replace( '::', '/' ) }/wp-admin/post.php`,
@@ -59,8 +59,8 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
59
59
  post: postId,
60
60
  plan_upgraded: 1,
61
61
  }
62
- );
63
- }
62
+ );
63
+ }
64
64
  )();
65
65
 
66
66
  // Redirect to calypso plans page for WoC sites.