@automattic/jetpack-shared-extension-utils 1.2.3 → 1.3.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 +13 -0
- package/package.json +22 -18
- package/src/site-type-utils.js +0 -39
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ 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.0] - 2025-07-07
|
|
9
|
+
### Changed
|
|
10
|
+
- Scripts: Ensure host-related checks and functionality are only added via Assets. [#44133]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Handle 'react-native' as an export condition. [#44095]
|
|
14
|
+
|
|
15
|
+
## [1.2.4] - 2025-07-03
|
|
16
|
+
### Changed
|
|
17
|
+
- Update package dependencies. [#44151]
|
|
18
|
+
|
|
8
19
|
## [1.2.3] - 2025-07-01
|
|
9
20
|
### Changed
|
|
10
21
|
- Internal updates.
|
|
@@ -692,6 +703,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
692
703
|
### Changed
|
|
693
704
|
- Core: prepare utility for release
|
|
694
705
|
|
|
706
|
+
[1.3.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.4...1.3.0
|
|
707
|
+
[1.2.4]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.3...1.2.4
|
|
695
708
|
[1.2.3]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.2...1.2.3
|
|
696
709
|
[1.2.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.1...1.2.2
|
|
697
710
|
[1.2.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/1.2.0...1.2.1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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": {
|
|
@@ -20,31 +20,32 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@automattic/color-studio": "4.1.0",
|
|
22
22
|
"@automattic/jetpack-analytics": "^1.0.2",
|
|
23
|
-
"@automattic/jetpack-base-styles": "^1.0.
|
|
24
|
-
"@automattic/jetpack-components": "^1.1.
|
|
25
|
-
"@automattic/jetpack-connection": "^1.2.
|
|
23
|
+
"@automattic/jetpack-base-styles": "^1.0.3",
|
|
24
|
+
"@automattic/jetpack-components": "^1.1.10",
|
|
25
|
+
"@automattic/jetpack-connection": "^1.2.10",
|
|
26
26
|
"@automattic/jetpack-script-data": "^0.4.4",
|
|
27
|
-
"@wordpress/api-fetch": "7.
|
|
28
|
-
"@wordpress/block-editor": "14.
|
|
29
|
-
"@wordpress/components": "29.
|
|
30
|
-
"@wordpress/compose": "7.
|
|
31
|
-
"@wordpress/data": "10.
|
|
32
|
-
"@wordpress/dom-ready": "4.
|
|
33
|
-
"@wordpress/element": "6.
|
|
34
|
-
"@wordpress/hooks": "4.
|
|
35
|
-
"@wordpress/i18n": "5.
|
|
36
|
-
"@wordpress/plugins": "7.
|
|
37
|
-
"@wordpress/
|
|
27
|
+
"@wordpress/api-fetch": "7.26.0",
|
|
28
|
+
"@wordpress/block-editor": "14.21.0",
|
|
29
|
+
"@wordpress/components": "29.12.0",
|
|
30
|
+
"@wordpress/compose": "7.26.0",
|
|
31
|
+
"@wordpress/data": "10.26.0",
|
|
32
|
+
"@wordpress/dom-ready": "4.26.0",
|
|
33
|
+
"@wordpress/element": "6.26.0",
|
|
34
|
+
"@wordpress/hooks": "4.26.0",
|
|
35
|
+
"@wordpress/i18n": "5.26.0",
|
|
36
|
+
"@wordpress/plugins": "7.26.0",
|
|
37
|
+
"@wordpress/primitives": "4.26.0",
|
|
38
|
+
"@wordpress/url": "4.26.0",
|
|
38
39
|
"clsx": "2.1.1",
|
|
39
40
|
"debug": "4.4.1",
|
|
40
41
|
"lodash": "4.17.21"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@automattic/jetpack-webpack-config": "workspace:*",
|
|
44
|
-
"@babel/core": "7.27.
|
|
45
|
+
"@babel/core": "7.27.7",
|
|
45
46
|
"@babel/plugin-transform-react-jsx": "7.27.1",
|
|
46
47
|
"@babel/preset-react": "7.27.1",
|
|
47
|
-
"@babel/runtime": "7.27.
|
|
48
|
+
"@babel/runtime": "7.27.6",
|
|
48
49
|
"@testing-library/dom": "10.4.0",
|
|
49
50
|
"@testing-library/react": "16.2.0",
|
|
50
51
|
"@testing-library/user-event": "14.6.1",
|
|
@@ -56,7 +57,10 @@
|
|
|
56
57
|
"react-dom": "18.3.1"
|
|
57
58
|
},
|
|
58
59
|
"exports": {
|
|
59
|
-
".":
|
|
60
|
+
".": {
|
|
61
|
+
"react-native": "./index.native.js",
|
|
62
|
+
"default": "./index.js"
|
|
63
|
+
},
|
|
60
64
|
"./components": "./src/components/index.js",
|
|
61
65
|
"./icons": "./src/icons.js",
|
|
62
66
|
"./store/wordpress-com": "./src/store/wordpress-com/index.ts",
|
package/src/site-type-utils.js
CHANGED
|
@@ -1,44 +1,5 @@
|
|
|
1
1
|
import getJetpackData from './get-jetpack-data';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Get the site type from environment
|
|
5
|
-
*
|
|
6
|
-
* @return {(string|null)} Site type
|
|
7
|
-
*/
|
|
8
|
-
function getSiteType() {
|
|
9
|
-
return 'object' === typeof window && typeof window._currentSiteType === 'string'
|
|
10
|
-
? window._currentSiteType
|
|
11
|
-
: null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Check if environment is Simple site.
|
|
16
|
-
*
|
|
17
|
-
* @return {boolean} True for Simple sites.
|
|
18
|
-
*/
|
|
19
|
-
export function isSimpleSite() {
|
|
20
|
-
return getSiteType() === 'simple';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Check if environment is Atomic site.
|
|
25
|
-
*
|
|
26
|
-
* @return {boolean} True for Atomic sites.
|
|
27
|
-
*/
|
|
28
|
-
export function isAtomicSite() {
|
|
29
|
-
return getSiteType() === 'atomic';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Check if environment is a WoA site.
|
|
34
|
-
* Replacement function for isAtomicSite.
|
|
35
|
-
*
|
|
36
|
-
* @return {boolean} True for WoA sites.
|
|
37
|
-
*/
|
|
38
|
-
export function isWoASite() {
|
|
39
|
-
return getSiteType() === 'atomic';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
3
|
/**
|
|
43
4
|
* Return whether the current blog is set to private. (if blog_public option is -1)
|
|
44
5
|
*
|