Skip to content

Commit 86dc3ff

Browse files
committed
External Libraries: Update element-closest.
This updates the `element-closest` polyfill to the latest version, `3.0.2`. Because of changes to how the package is now built and distributed, both files for the library now contain minified code. This library is no longer used by Core itself and maintained as a courtesy. Any projects utilizing it should reevaluate their usage requirements with modern browsers. Props hareesh-pillai, gziolo, mukesh27, costdev. Fixes #52851. git-svn-id: https://develop.svn.wordpress.org/trunk@55275 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f29e0fe commit 86dc3ff

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"backbone": "1.4.1",
138138
"clipboard": "2.0.11",
139139
"core-js-url-browser": "3.6.4",
140-
"element-closest": "^2.0.2",
140+
"element-closest": "^3.0.2",
141141
"formdata-polyfill": "4.0.10",
142142
"hoverintent": "2.2.1",
143143
"imagesloaded": "4.1.4",

src/wp-includes/script-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function wp_default_packages_vendor( $scripts ) {
114114
'wp-polyfill-node-contains' => '4.6.0',
115115
'wp-polyfill-url' => '3.6.4',
116116
'wp-polyfill-dom-rect' => '4.6.0',
117-
'wp-polyfill-element-closest' => '2.0.2',
117+
'wp-polyfill-element-closest' => '3.0.2',
118118
'wp-polyfill-object-fit' => '2.3.5',
119119
'wp-polyfill-inert' => '3.1.2',
120120
'wp-polyfill' => '3.15.0',

tools/webpack/packages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
6565
'lodash.js': 'lodash/lodash.js',
6666
'wp-polyfill.js': '@wordpress/babel-preset-default/build/polyfill.js',
6767
'wp-polyfill-fetch.js': 'whatwg-fetch/dist/fetch.umd.js',
68-
'wp-polyfill-element-closest.js': 'element-closest/element-closest.js',
68+
'wp-polyfill-element-closest.js': 'element-closest/browser.js',
6969
'wp-polyfill-node-contains.js': 'polyfill-library/polyfills/__dist/Node.prototype.contains/raw.js',
7070
'wp-polyfill-url.js': 'core-js-url-browser/url.js',
7171
'wp-polyfill-dom-rect.js': 'polyfill-library/polyfills/__dist/DOMRect/raw.js',
@@ -81,6 +81,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
8181
const minifiedVendors = {
8282
'lodash.min.js': 'lodash/lodash.min.js',
8383
'wp-polyfill.min.js': '@wordpress/babel-preset-default/build/polyfill.min.js',
84+
'wp-polyfill-element-closest.min.js': 'element-closest/browser.js',
8485
'wp-polyfill-formdata.min.js': 'formdata-polyfill/formdata.min.js',
8586
'wp-polyfill-url.min.js': 'core-js-url-browser/url.min.js',
8687
'wp-polyfill-object-fit.min.js': 'objectFitPolyfill/dist/objectFitPolyfill.min.js',
@@ -93,7 +94,6 @@ module.exports = function( env = { environment: 'production', watch: false, buil
9394
const minifyVendors = {
9495
'regenerator-runtime.min.js': 'regenerator-runtime/runtime.js',
9596
'wp-polyfill-fetch.min.js': 'whatwg-fetch/dist/fetch.umd.js',
96-
'wp-polyfill-element-closest.min.js': 'element-closest/element-closest.js',
9797
'wp-polyfill-node-contains.min.js': 'polyfill-library/polyfills/__dist/Node.prototype.contains/raw.js',
9898
'wp-polyfill-dom-rect.min.js': 'polyfill-library/polyfills/__dist/DOMRect/raw.js',
9999
};

0 commit comments

Comments
 (0)