@automattic/jetpack-shared-extension-utils 0.3.1 → 0.4.2

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,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.2] - 2022-04-12
9
+ ### Changed
10
+ - Updated package dependencies.
11
+
12
+ ## [0.4.1] - 2022-04-06
13
+ ### Changed
14
+ - Updated package dependencies
15
+
16
+ ## [0.4.0] - 2022-03-31
17
+ ### Added
18
+ - Add a new utility function to determine whether a site has been launched.
19
+
8
20
  ## [0.3.1] - 2022-03-29
9
21
  ### Added
10
22
  - Add missing JS peer dependency.
@@ -36,6 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
48
  ### Changed
37
49
  - Core: prepare utility for release
38
50
 
51
+ [0.4.2]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.4.1...0.4.2
52
+ [0.4.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.4.0...0.4.1
53
+ [0.4.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.3.1...0.4.0
39
54
  [0.3.1]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.3.0...0.3.1
40
55
  [0.3.0]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/0.2.0...0.3.0
41
56
  [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 { isSimpleSite, isAtomicSite, isPrivateSite } from './src/site-type-utils';
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.1",
3
+ "version": "0.4.2",
4
4
  "description": "Utility functions used by the block editor extensions",
5
5
  "homepage": "https://jetpack.com",
6
6
  "bugs": {
@@ -16,14 +16,14 @@
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.1.2",
20
- "@wordpress/i18n": "4.3.0",
21
- "@wordpress/plugins": "4.1.1",
22
- "@wordpress/url": "3.4.0",
19
+ "@wordpress/compose": "5.4.0",
20
+ "@wordpress/i18n": "4.6.0",
21
+ "@wordpress/plugins": "4.4.0",
22
+ "@wordpress/url": "3.7.0",
23
23
  "lodash": "4.17.21"
24
24
  },
25
25
  "devDependencies": {
26
- "@babel/core": "7.17.8",
26
+ "@babel/core": "7.17.9",
27
27
  "@babel/preset-react": "7.16.7",
28
28
  "nyc": "15.1.0",
29
29
  "react": "17.0.2"
@@ -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
+ }