@automattic/jetpack-shared-extension-utils 0.17.3 → 0.17.4
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,10 @@ 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
|
+
## [0.17.4] - 2025-03-03
|
|
9
|
+
### Changed
|
|
10
|
+
- Update package dependencies. [#42163]
|
|
11
|
+
|
|
8
12
|
## [0.17.3] - 2025-02-24
|
|
9
13
|
### Changed
|
|
10
14
|
- Update dependencies. [#40231]
|
|
@@ -540,6 +544,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
540
544
|
### Changed
|
|
541
545
|
- Core: prepare utility for release
|
|
542
546
|
|
|
547
|
+
[0.17.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.17.3...0.17.4
|
|
543
548
|
[0.17.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.17.2...0.17.3
|
|
544
549
|
[0.17.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.17.1...0.17.2
|
|
545
550
|
[0.17.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.17.0...0.17.1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.4",
|
|
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": {
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@automattic/color-studio": "4.0.0",
|
|
22
22
|
"@automattic/jetpack-analytics": "^0.1.36",
|
|
23
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
24
|
-
"@automattic/jetpack-components": "^0.
|
|
25
|
-
"@automattic/jetpack-connection": "^0.
|
|
26
|
-
"@wordpress/api-fetch": "7.
|
|
27
|
-
"@wordpress/block-editor": "14.
|
|
28
|
-
"@wordpress/components": "29.
|
|
29
|
-
"@wordpress/compose": "7.
|
|
30
|
-
"@wordpress/data": "10.
|
|
31
|
-
"@wordpress/element": "6.
|
|
32
|
-
"@wordpress/i18n": "5.
|
|
33
|
-
"@wordpress/plugins": "7.
|
|
34
|
-
"@wordpress/url": "4.
|
|
23
|
+
"@automattic/jetpack-base-styles": "^0.6.44",
|
|
24
|
+
"@automattic/jetpack-components": "^0.68.0",
|
|
25
|
+
"@automattic/jetpack-connection": "^0.38.0",
|
|
26
|
+
"@wordpress/api-fetch": "7.19.0",
|
|
27
|
+
"@wordpress/block-editor": "14.14.0",
|
|
28
|
+
"@wordpress/components": "29.5.0",
|
|
29
|
+
"@wordpress/compose": "7.19.0",
|
|
30
|
+
"@wordpress/data": "10.19.0",
|
|
31
|
+
"@wordpress/element": "6.19.0",
|
|
32
|
+
"@wordpress/i18n": "5.19.0",
|
|
33
|
+
"@wordpress/plugins": "7.19.0",
|
|
34
|
+
"@wordpress/url": "4.19.0",
|
|
35
35
|
"clsx": "2.1.1",
|
|
36
36
|
"debug": "4.4.0",
|
|
37
37
|
"lodash": "4.17.21"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@testing-library/dom": "10.4.0",
|
|
46
46
|
"@testing-library/react": "16.2.0",
|
|
47
47
|
"@testing-library/user-event": "14.6.1",
|
|
48
|
-
"@wordpress/babel-plugin-import-jsx-pragma": "5.
|
|
48
|
+
"@wordpress/babel-plugin-import-jsx-pragma": "5.19.0",
|
|
49
49
|
"babel-jest": "29.3.1",
|
|
50
50
|
"jest": "29.7.0",
|
|
51
51
|
"jest-environment-jsdom": "29.7.0",
|
|
@@ -24,7 +24,7 @@ function redirect( url, callback, shouldOpenNewWindow = false ) {
|
|
|
24
24
|
* @param {Function} onRedirect - To handle the redirection.
|
|
25
25
|
* @return {object} - Object containing properties to handle autosave and redirect.
|
|
26
26
|
*/
|
|
27
|
-
export default function useAutosaveAndRedirect( redirectUrl, onRedirect = noop ) {
|
|
27
|
+
export default function useAutosaveAndRedirect( redirectUrl = null, onRedirect = noop ) {
|
|
28
28
|
const [ isRedirecting, setIsRedirecting ] = useState( false );
|
|
29
29
|
|
|
30
30
|
const { isAutosaveablePost, isDirtyPost, currentPost } = useSelect( select => {
|
|
@@ -95,7 +95,9 @@ export default function useAutosaveAndRedirect( redirectUrl, onRedirect = noop )
|
|
|
95
95
|
setIsRedirecting( true );
|
|
96
96
|
|
|
97
97
|
autosave( event ).then( () => {
|
|
98
|
-
|
|
98
|
+
if ( redirectUrl ) {
|
|
99
|
+
redirect( redirectUrl, onRedirect, isWidgetEditor );
|
|
100
|
+
}
|
|
99
101
|
} );
|
|
100
102
|
};
|
|
101
103
|
|