@automattic/jetpack-shared-extension-utils 1.3.2 → 1.3.3

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.3] - 2025-07-10
9
+ ### Changed
10
+ - Internal updates.
11
+
8
12
  ## [1.3.2] - 2025-07-08
9
13
  ### Changed
10
14
  - Internal updates.
@@ -711,6 +715,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
711
715
  ### Changed
712
716
  - Core: prepare utility for release
713
717
 
718
+ [1.3.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.2...1.3.3
714
719
  [1.3.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.1...1.3.2
715
720
  [1.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.3.0...1.3.1
716
721
  [1.3.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.4...1.3.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-shared-extension-utils",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
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": {
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@automattic/color-studio": "4.1.0",
22
22
  "@automattic/jetpack-analytics": "^1.0.3",
23
- "@automattic/jetpack-base-styles": "^1.0.3",
24
- "@automattic/jetpack-components": "^1.1.12",
25
- "@automattic/jetpack-connection": "^1.2.12",
23
+ "@automattic/jetpack-base-styles": "^1.0.4",
24
+ "@automattic/jetpack-components": "^1.1.13",
25
+ "@automattic/jetpack-connection": "^1.2.13",
26
26
  "@automattic/jetpack-script-data": "^0.5.0",
27
27
  "@wordpress/api-fetch": "7.26.0",
28
28
  "@wordpress/block-editor": "14.21.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, map, filter } from 'lodash';
4
+ import { get } 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';
@@ -45,12 +45,9 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
45
45
  return isSimpleSite()
46
46
  ? addQueryArgs(
47
47
  '/' +
48
- compact( [
49
- postTypeEditorRoutePrefix,
50
- postType,
51
- getSiteFragment(),
52
- postId,
53
- ] ).join( '/' ),
48
+ [ postTypeEditorRoutePrefix, postType, getSiteFragment(), postId ]
49
+ .filter( Boolean )
50
+ .join( '/' ),
54
51
  {
55
52
  plan_upgraded: 1,
56
53
  }
@@ -174,7 +171,7 @@ export function isUpgradeNudgeEnabled() {
174
171
  * @returns {boolean} True is the block is usable with a Free plan. Otherwise, False.
175
172
  */
176
173
  export const isStillUsableWithFreePlan = name =>
177
- map( usableBlockWithFreePlan, 'name' ).includes( name );
174
+ usableBlockWithFreePlan.some( v => v.name === name );
178
175
 
179
176
  export const getUsableBlockProps = blockName =>
180
- filter( usableBlockWithFreePlan, ( { name } ) => name === blockName )[ 0 ];
177
+ usableBlockWithFreePlan.filter( ( { name } ) => name === blockName )[ 0 ];