@automattic/jetpack-shared-extension-utils 0.13.10 → 0.14.1

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,14 @@ 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.1] - 2024-02-05
9
+ ### Changed
10
+ - Updated package dependencies.
11
+
12
+ ## [0.14.0] - 2024-01-29
13
+ ### Added
14
+ - Adds new getJetpackBlocksVariation function [#34179]
15
+
8
16
  ## [0.13.10] - 2024-01-18
9
17
  ### Changed
10
18
  - Minor internal updates.
@@ -328,6 +336,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
328
336
  ### Changed
329
337
  - Core: prepare utility for release
330
338
 
339
+ [0.14.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.14.0...0.14.1
340
+ [0.14.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.10...0.14.0
331
341
  [0.13.10]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.9...0.13.10
332
342
  [0.13.9]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.13.8...0.13.9
333
343
  [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.13.10",
3
+ "version": "0.14.1",
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,15 +18,15 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@automattic/jetpack-analytics": "^0.1.29",
21
- "@automattic/jetpack-components": "^0.47.0",
22
- "@automattic/jetpack-connection": "^0.31.1",
23
- "@wordpress/api-fetch": "6.45.0",
24
- "@wordpress/compose": "6.25.0",
25
- "@wordpress/data": "9.18.0",
26
- "@wordpress/element": "5.25.0",
27
- "@wordpress/i18n": "4.48.0",
28
- "@wordpress/plugins": "6.16.0",
29
- "@wordpress/url": "3.49.0",
21
+ "@automattic/jetpack-components": "^0.48.1",
22
+ "@automattic/jetpack-connection": "^0.32.0",
23
+ "@wordpress/api-fetch": "6.47.0",
24
+ "@wordpress/compose": "6.27.0",
25
+ "@wordpress/data": "9.20.0",
26
+ "@wordpress/element": "5.27.0",
27
+ "@wordpress/i18n": "4.50.0",
28
+ "@wordpress/plugins": "6.18.0",
29
+ "@wordpress/url": "3.51.0",
30
30
  "lodash": "4.17.21"
31
31
  },
32
32
  "devDependencies": {
@@ -39,11 +39,11 @@
39
39
  "react-dom": "18.2.0",
40
40
  "jetpack-js-tools": "workspace:*",
41
41
  "@automattic/jetpack-webpack-config": "workspace:*",
42
- "@testing-library/dom": "9.3.3",
43
- "@testing-library/react": "14.1.2",
42
+ "@testing-library/dom": "9.3.4",
43
+ "@testing-library/react": "14.2.0",
44
44
  "@testing-library/user-event": "14.5.2",
45
45
  "@babel/plugin-transform-react-jsx": "7.23.4",
46
- "@wordpress/babel-plugin-import-jsx-pragma": "4.31.0"
46
+ "@wordpress/babel-plugin-import-jsx-pragma": "4.33.0"
47
47
  },
48
48
  "exports": {
49
49
  ".": "./index.js"
@@ -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
+ }