@wordpress/widgets 2.1.0 → 2.1.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
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.1.1 (2022-02-10)
6
+
7
+ ### Bug Fix
8
+
9
+ - Removed unused `@wordpress/url` dependency ([#38388](https://github.com/WordPress/gutenberg/pull/38388)).
10
+
5
11
  ## 2.1.0 (2022-01-27)
6
12
 
7
13
  ## 2.0.0 (2021-07-29)
package/README.md CHANGED
@@ -14,4 +14,10 @@ npm install @wordpress/widgets
14
14
 
15
15
  _This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for such language features and APIs, you should include [the polyfill shipped in `@wordpress/babel-preset-default`](https://github.com/WordPress/gutenberg/tree/HEAD/packages/babel-preset-default#polyfill) in your code._
16
16
 
17
- <br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
17
+ ## Contributing to this package
18
+
19
+ This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
20
+
21
+ To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).
22
+
23
+ <br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/widgets",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Functionality used by the widgets block editor in the Widgets screen and the Customizer.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -21,23 +21,22 @@
21
21
  "react-native": "src/index",
22
22
  "dependencies": {
23
23
  "@babel/runtime": "^7.16.0",
24
- "@wordpress/api-fetch": "^6.0.0",
25
- "@wordpress/block-editor": "^8.1.0",
26
- "@wordpress/blocks": "^11.2.0",
27
- "@wordpress/components": "^19.3.0",
28
- "@wordpress/compose": "^5.1.0",
29
- "@wordpress/core-data": "^4.1.0",
30
- "@wordpress/data": "^6.2.0",
31
- "@wordpress/element": "^4.1.0",
32
- "@wordpress/i18n": "^4.3.0",
33
- "@wordpress/icons": "^6.2.0",
34
- "@wordpress/notices": "^3.3.0",
35
- "@wordpress/url": "^3.4.0",
24
+ "@wordpress/api-fetch": "^6.0.1",
25
+ "@wordpress/block-editor": "^8.1.2",
26
+ "@wordpress/blocks": "^11.2.1",
27
+ "@wordpress/components": "^19.4.1",
28
+ "@wordpress/compose": "^5.1.1",
29
+ "@wordpress/core-data": "^4.1.1",
30
+ "@wordpress/data": "^6.2.1",
31
+ "@wordpress/element": "^4.1.1",
32
+ "@wordpress/i18n": "^4.3.1",
33
+ "@wordpress/icons": "^7.0.0",
34
+ "@wordpress/notices": "^3.3.1",
36
35
  "classnames": "^2.3.1",
37
36
  "lodash": "^4.17.21"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public"
41
40
  },
42
- "gitHead": "d95ccb9366e249133cdb1d7b25c382446b9ee502"
41
+ "gitHead": "0f838547f37472e46e6d5a9d2e84b6c61f4bd3f0"
43
42
  }
@@ -24,21 +24,9 @@ function render_block_core_legacy_widget( $attributes ) {
24
24
  return '';
25
25
  }
26
26
 
27
- $id_base = $attributes['idBase'];
28
- if ( method_exists( $wp_widget_factory, 'get_widget_key' ) && method_exists( $wp_widget_factory, 'get_widget_object' ) ) {
29
- $widget_key = $wp_widget_factory->get_widget_key( $id_base );
30
- $widget_object = $wp_widget_factory->get_widget_object( $id_base );
31
- } else {
32
- /*
33
- * This file is copied from the published @wordpress/widgets package when WordPress
34
- * Core is built. Because the package is a dependency of both WordPress Core and the
35
- * Gutenberg plugin where the block editor is developed, this fallback condition is
36
- * required until the minimum required version of WordPress for the plugin is raised
37
- * to 5.8.
38
- */
39
- $widget_key = gutenberg_get_widget_key( $id_base );
40
- $widget_object = gutenberg_get_widget_object( $id_base );
41
- }
27
+ $id_base = $attributes['idBase'];
28
+ $widget_key = $wp_widget_factory->get_widget_key( $id_base );
29
+ $widget_object = $wp_widget_factory->get_widget_object( $id_base );
42
30
 
43
31
  if ( ! $widget_key || ! $widget_object ) {
44
32
  return '';