@automattic/jetpack-shared-extension-utils 1.2.1 → 1.2.2
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
|
+
## [1.2.2] - 2025-06-30
|
|
9
|
+
### Changed
|
|
10
|
+
- Data store: Expose the store object for better auto completion. [#43870]
|
|
11
|
+
|
|
8
12
|
## [1.2.1] - 2025-06-24
|
|
9
13
|
### Changed
|
|
10
14
|
- Update dependencies. [#43796]
|
|
@@ -684,6 +688,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
684
688
|
### Changed
|
|
685
689
|
- Core: prepare utility for release
|
|
686
690
|
|
|
691
|
+
[1.2.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.1...1.2.2
|
|
687
692
|
[1.2.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.0...1.2.1
|
|
688
693
|
[1.2.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.1.3...1.2.0
|
|
689
694
|
[1.1.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.1.2...1.1.3
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@automattic/color-studio": "4.1.0",
|
|
22
22
|
"@automattic/jetpack-analytics": "^1.0.1",
|
|
23
23
|
"@automattic/jetpack-base-styles": "^1.0.1",
|
|
24
|
-
"@automattic/jetpack-components": "^1.1.
|
|
25
|
-
"@automattic/jetpack-connection": "^1.2.
|
|
24
|
+
"@automattic/jetpack-components": "^1.1.7",
|
|
25
|
+
"@automattic/jetpack-connection": "^1.2.7",
|
|
26
26
|
"@automattic/jetpack-script-data": "^0.4.4",
|
|
27
27
|
"@wordpress/api-fetch": "7.25.0",
|
|
28
28
|
"@wordpress/block-editor": "14.20.0",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"@testing-library/dom": "10.4.0",
|
|
49
49
|
"@testing-library/react": "16.2.0",
|
|
50
50
|
"@testing-library/user-event": "14.6.1",
|
|
51
|
-
"@wordpress/babel-plugin-import-jsx-pragma": "5.25.0",
|
|
52
51
|
"babel-jest": "30.0.0",
|
|
53
52
|
"jest": "30.0.0",
|
|
54
53
|
"jest-environment-jsdom": "30.0.0",
|
|
@@ -64,7 +64,7 @@ export function* fetchModules() {
|
|
|
64
64
|
* @param {boolean} isLoading - If the modules are loading or not.
|
|
65
65
|
* @return {object} - an action object.
|
|
66
66
|
*/
|
|
67
|
-
function setIsLoading( isLoading ) {
|
|
67
|
+
export function setIsLoading( isLoading ) {
|
|
68
68
|
return setJetpackModules( { isLoading } );
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -6,7 +6,7 @@ import resolvers from './resolvers';
|
|
|
6
6
|
import selectors from './selectors';
|
|
7
7
|
|
|
8
8
|
export const JETPACK_MODULES_STORE_ID = 'jetpack-modules';
|
|
9
|
-
const store = createReduxStore( JETPACK_MODULES_STORE_ID, {
|
|
9
|
+
export const store = createReduxStore( JETPACK_MODULES_STORE_ID, {
|
|
10
10
|
reducer,
|
|
11
11
|
actions,
|
|
12
12
|
controls,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setJetpackModules } from './actions';
|
|
1
|
+
import { setIsLoading, setJetpackModules } from './actions';
|
|
2
2
|
import { fetchJetpackModules } from './controls';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -9,12 +9,15 @@ import { fetchJetpackModules } from './controls';
|
|
|
9
9
|
*/
|
|
10
10
|
export function* getJetpackModules() {
|
|
11
11
|
try {
|
|
12
|
+
yield setIsLoading( true );
|
|
12
13
|
const data = yield fetchJetpackModules();
|
|
13
14
|
if ( data ) {
|
|
14
15
|
return setJetpackModules( { data } );
|
|
15
16
|
}
|
|
16
17
|
} catch ( e ) {
|
|
17
18
|
console.error( e ); // eslint-disable-line no-console
|
|
19
|
+
} finally {
|
|
20
|
+
yield setIsLoading( false );
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
|