@automattic/jetpack-shared-extension-utils 0.3.0 → 0.4.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 +15 -0
- package/index.js +1 -1
- package/package.json +7 -7
- package/src/site-type-utils.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.4.1] - 2022-04-06
|
|
9
|
+
### Changed
|
|
10
|
+
- Updated package dependencies
|
|
11
|
+
|
|
12
|
+
## [0.4.0] - 2022-03-31
|
|
13
|
+
### Added
|
|
14
|
+
- Add a new utility function to determine whether a site has been launched.
|
|
15
|
+
|
|
16
|
+
## [0.3.1] - 2022-03-29
|
|
17
|
+
### Added
|
|
18
|
+
- Add missing JS peer dependency.
|
|
19
|
+
|
|
8
20
|
## [0.3.0] - 2022-03-23
|
|
9
21
|
### Added
|
|
10
22
|
- Moved plan-utils.js file from plugin/jetpack to shared-extension-utils. Updated import references for the same
|
|
@@ -32,6 +44,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
32
44
|
### Changed
|
|
33
45
|
- Core: prepare utility for release
|
|
34
46
|
|
|
47
|
+
[0.4.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.4.0...0.4.1
|
|
48
|
+
[0.4.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.3.1...0.4.0
|
|
49
|
+
[0.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.3.0...0.3.1
|
|
35
50
|
[0.3.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.2.0...0.3.0
|
|
36
51
|
[0.2.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.1.1...0.2.0
|
|
37
52
|
[0.1.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.1.0...0.1.1
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as getJetpackData, JETPACK_DATA_PATH } from './src/get-jetpack-data';
|
|
2
2
|
export { default as getSiteFragment } from './src/get-site-fragment';
|
|
3
|
-
export
|
|
3
|
+
export * from './src/site-type-utils';
|
|
4
4
|
export { default as getJetpackExtensionAvailability } from './src/get-jetpack-extension-availability';
|
|
5
5
|
export { default as registerJetpackPlugin } from './src/register-jetpack-plugin';
|
|
6
6
|
export { default as withHasWarningIsInteractiveClassNames } from './src/with-has-warning-is-interactive-class-names';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Utility functions used by the block editor extensions",
|
|
5
5
|
"homepage": "https://jetpack.com",
|
|
6
6
|
"bugs": {
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"test": "NODE_ENV=test NODE_PATH=tests:. js-test-runner --jsdom --initfile=test-main.jsx 'glob:./!(node_modules)/**/test/*.@(jsx|js)'"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@wordpress/compose": "5.
|
|
20
|
-
"@wordpress/i18n": "4.
|
|
21
|
-
"@wordpress/plugins": "4.
|
|
22
|
-
"@wordpress/url": "3.
|
|
19
|
+
"@wordpress/compose": "5.3.0",
|
|
20
|
+
"@wordpress/i18n": "4.5.0",
|
|
21
|
+
"@wordpress/plugins": "4.3.0",
|
|
22
|
+
"@wordpress/url": "3.6.0",
|
|
23
23
|
"lodash": "4.17.21"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@babel/core": "7.17.8",
|
|
27
27
|
"@babel/preset-react": "7.16.7",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"nyc": "15.1.0",
|
|
29
|
+
"react": "17.0.2"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": "./index.js"
|
package/src/site-type-utils.js
CHANGED
|
@@ -41,3 +41,14 @@ export function isPrivateSite() {
|
|
|
41
41
|
const jetpackData = getJetpackData();
|
|
42
42
|
return jetpackData?.jetpack?.is_private_site ?? false;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Return whether the current site is coming soon (i.e. not launched yet).
|
|
47
|
+
* This is only available for WordPress.com sites so far.
|
|
48
|
+
*
|
|
49
|
+
* @returns {boolean} whether the current site is coming soon.
|
|
50
|
+
*/
|
|
51
|
+
export function isComingSoon() {
|
|
52
|
+
const jetpackData = getJetpackData();
|
|
53
|
+
return jetpackData?.jetpack?.is_coming_soon ?? false;
|
|
54
|
+
}
|