@automattic/jetpack-shared-extension-utils 1.3.3 → 1.3.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 +5 -0
- package/package.json +2 -3
- package/src/plan-utils.js +2 -3
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.4] - 2025-07-14
|
|
9
|
+
### Removed
|
|
10
|
+
- Remove no-longer-needed dependency on `lodash`. [#44269]
|
|
11
|
+
|
|
8
12
|
## [1.3.3] - 2025-07-10
|
|
9
13
|
### Changed
|
|
10
14
|
- Internal updates.
|
|
@@ -715,6 +719,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
715
719
|
### Changed
|
|
716
720
|
- Core: prepare utility for release
|
|
717
721
|
|
|
722
|
+
[1.3.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.3...1.3.4
|
|
718
723
|
[1.3.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.2...1.3.3
|
|
719
724
|
[1.3.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.1...1.3.2
|
|
720
725
|
[1.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.0...1.3.1
|
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.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": {
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"@wordpress/primitives": "4.26.0",
|
|
38
38
|
"@wordpress/url": "4.26.0",
|
|
39
39
|
"clsx": "2.1.1",
|
|
40
|
-
"debug": "4.4.1"
|
|
41
|
-
"lodash": "4.17.21"
|
|
40
|
+
"debug": "4.4.1"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
43
|
"@automattic/jetpack-webpack-config": "workspace:*",
|
package/src/plan-utils.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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 { get } from 'lodash';
|
|
5
4
|
import getJetpackData from './get-jetpack-data';
|
|
6
5
|
import getJetpackExtensionAvailability from './get-jetpack-extension-availability';
|
|
7
6
|
import getSiteFragment from './get-site-fragment';
|
|
@@ -19,7 +18,7 @@ import getSiteFragment from './get-site-fragment';
|
|
|
19
18
|
*/
|
|
20
19
|
export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
|
|
21
20
|
// WP.com plan objects have a dedicated `path_slug` field, Jetpack plan objects don't.
|
|
22
|
-
const planPathSlug = planSlug.startsWith( 'jetpack_' ) ? planSlug :
|
|
21
|
+
const planPathSlug = planSlug.startsWith( 'jetpack_' ) ? planSlug : plan?.path_slug;
|
|
23
22
|
|
|
24
23
|
// The full site editor has no set post type.
|
|
25
24
|
const redirect_to = (
|
|
@@ -158,7 +157,7 @@ const usableBlockWithFreePlan = [
|
|
|
158
157
|
* @return {boolean} True if the Upgrade Nudge is enable. Otherwise, False.
|
|
159
158
|
*/
|
|
160
159
|
export function isUpgradeNudgeEnabled() {
|
|
161
|
-
return
|
|
160
|
+
return getJetpackData()?.jetpack?.enable_upgrade_nudge ?? false;
|
|
162
161
|
}
|
|
163
162
|
|
|
164
163
|
/*
|