@automattic/jetpack-shared-extension-utils 0.13.10 → 0.14.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 +5 -0
- package/index.js +1 -1
- package/package.json +3 -3
- package/src/get-jetpack-blocks-variation.js +10 -0
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.14.0] - 2024-01-29
|
|
9
|
+
### Added
|
|
10
|
+
- Adds new getJetpackBlocksVariation function [#34179]
|
|
11
|
+
|
|
8
12
|
## [0.13.10] - 2024-01-18
|
|
9
13
|
### Changed
|
|
10
14
|
- Minor internal updates.
|
|
@@ -328,6 +332,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
328
332
|
### Changed
|
|
329
333
|
- Core: prepare utility for release
|
|
330
334
|
|
|
335
|
+
[0.14.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.10...0.14.0
|
|
331
336
|
[0.13.10]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.9...0.13.10
|
|
332
337
|
[0.13.9]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.8...0.13.9
|
|
333
338
|
[0.13.8]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.7...0.13.8
|
package/index.js
CHANGED
|
@@ -18,5 +18,5 @@ export { default as useAnalytics } from './src/hooks/use-analytics';
|
|
|
18
18
|
export { default as useModuleStatus } from './src/hooks/use-module-status';
|
|
19
19
|
export { default as JetpackEditorPanelLogo } from './src/components/jetpack-editor-panel-logo';
|
|
20
20
|
export { getBlockIconComponent, getBlockIconProp } from './src/get-block-icon-from-metadata';
|
|
21
|
-
|
|
21
|
+
export { default as getJetpackBlocksVariation } from './src/get-jetpack-blocks-variation';
|
|
22
22
|
export * from './src/modules-state';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
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": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@automattic/jetpack-analytics": "^0.1.29",
|
|
21
|
-
"@automattic/jetpack-components": "^0.
|
|
22
|
-
"@automattic/jetpack-connection": "^0.31.
|
|
21
|
+
"@automattic/jetpack-components": "^0.48.0",
|
|
22
|
+
"@automattic/jetpack-connection": "^0.31.2",
|
|
23
23
|
"@wordpress/api-fetch": "6.45.0",
|
|
24
24
|
"@wordpress/compose": "6.25.0",
|
|
25
25
|
"@wordpress/data": "9.18.0",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import getJetpackData from './get-jetpack-data';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the jetpack block variation that is defined on the backend.
|
|
4
|
+
*
|
|
5
|
+
* @returns {?string} options are ['production', 'beta', 'experimental']
|
|
6
|
+
*/
|
|
7
|
+
export default function getJetpackBlocksVariation() {
|
|
8
|
+
const data = getJetpackData();
|
|
9
|
+
return data?.blocks_variation ?? 'production';
|
|
10
|
+
}
|