@automattic/jetpack-shared-extension-utils 1.3.1 → 1.3.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.3.2] - 2025-07-08
|
|
9
|
+
### Changed
|
|
10
|
+
- Internal updates.
|
|
11
|
+
|
|
8
12
|
## [1.3.1] - 2025-07-08
|
|
9
13
|
### Changed
|
|
10
14
|
- Update package dependencies. [#44217]
|
|
@@ -707,6 +711,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
707
711
|
### Changed
|
|
708
712
|
- Core: prepare utility for release
|
|
709
713
|
|
|
714
|
+
[1.3.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.1...1.3.2
|
|
710
715
|
[1.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.0...1.3.1
|
|
711
716
|
[1.3.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.4...1.3.0
|
|
712
717
|
[1.2.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.3...1.2.4
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.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,9 +21,9 @@
|
|
|
21
21
|
"@automattic/color-studio": "4.1.0",
|
|
22
22
|
"@automattic/jetpack-analytics": "^1.0.3",
|
|
23
23
|
"@automattic/jetpack-base-styles": "^1.0.3",
|
|
24
|
-
"@automattic/jetpack-components": "^1.1.
|
|
25
|
-
"@automattic/jetpack-connection": "^1.2.
|
|
26
|
-
"@automattic/jetpack-script-data": "^0.
|
|
24
|
+
"@automattic/jetpack-components": "^1.1.12",
|
|
25
|
+
"@automattic/jetpack-connection": "^1.2.12",
|
|
26
|
+
"@automattic/jetpack-script-data": "^0.5.0",
|
|
27
27
|
"@wordpress/api-fetch": "7.26.0",
|
|
28
28
|
"@wordpress/block-editor": "14.21.0",
|
|
29
29
|
"@wordpress/components": "29.12.0",
|
package/src/plan-utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isWoASite, isSimpleSite } from '@automattic/jetpack-script-data';
|
|
2
2
|
import { __ } from '@wordpress/i18n';
|
|
3
3
|
import { addQueryArgs } from '@wordpress/url';
|
|
4
|
-
import { compact, get,
|
|
4
|
+
import { compact, get, map, filter } from 'lodash';
|
|
5
5
|
import getJetpackData from './get-jetpack-data';
|
|
6
6
|
import getJetpackExtensionAvailability from './get-jetpack-extension-availability';
|
|
7
7
|
import getSiteFragment from './get-site-fragment';
|
|
@@ -19,7 +19,7 @@ import getSiteFragment from './get-site-fragment';
|
|
|
19
19
|
*/
|
|
20
20
|
export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
|
|
21
21
|
// WP.com plan objects have a dedicated `path_slug` field, Jetpack plan objects don't.
|
|
22
|
-
const planPathSlug = startsWith(
|
|
22
|
+
const planPathSlug = planSlug.startsWith( 'jetpack_' ) ? planSlug : get( plan, [ 'path_slug' ] );
|
|
23
23
|
|
|
24
24
|
// The full site editor has no set post type.
|
|
25
25
|
const redirect_to = (
|
|
@@ -177,4 +177,4 @@ export const isStillUsableWithFreePlan = name =>
|
|
|
177
177
|
map( usableBlockWithFreePlan, 'name' ).includes( name );
|
|
178
178
|
|
|
179
179
|
export const getUsableBlockProps = blockName =>
|
|
180
|
-
|
|
180
|
+
filter( usableBlockWithFreePlan, ( { name } ) => name === blockName )[ 0 ];
|