@automattic/jetpack-shared-extension-utils 0.3.1 → 0.4.1-alpha
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 +10 -0
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/site-type-utils.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ 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-alpha] - unreleased
|
|
9
|
+
|
|
10
|
+
This is an alpha version! The changes listed here are not final.
|
|
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
|
+
|
|
8
16
|
## [0.3.1] - 2022-03-29
|
|
9
17
|
### Added
|
|
10
18
|
- Add missing JS peer dependency.
|
|
@@ -36,6 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
36
44
|
### Changed
|
|
37
45
|
- Core: prepare utility for release
|
|
38
46
|
|
|
47
|
+
[0.4.1-alpha]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.4.0...0.4.1-alpha
|
|
48
|
+
[0.4.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.3.1...0.4.0
|
|
39
49
|
[0.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.3.0...0.3.1
|
|
40
50
|
[0.3.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.2.0...0.3.0
|
|
41
51
|
[0.2.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.1.1...0.2.0
|
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
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
|
+
}
|