diff --git a/package-lock.json b/package-lock.json
index 20959ee676..28de38db04 100644
a
|
b
|
|
5858 | 5858 | } |
5859 | 5859 | } |
5860 | 5860 | }, |
| 5861 | "core-js-url-browser": { |
| 5862 | "version": "3.6.4", |
| 5863 | "resolved": "https://registry.npmjs.org/core-js-url-browser/-/core-js-url-browser-3.6.4.tgz", |
| 5864 | "integrity": "sha512-VCMkPikOVp5JXftTj0E3gPZNKa0exQX837KxyPcnMAKvImWG8+RbXwEHEGMjiNz+9Vl2YgutkVYOpq7iaSOt/Q==" |
| 5865 | }, |
5861 | 5866 | "core-util-is": { |
5862 | 5867 | "version": "1.0.2", |
5863 | 5868 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", |
… |
… |
|
5905 | 5910 | }, |
5906 | 5911 | "create-hash": { |
5907 | 5912 | "version": "1.2.0", |
5908 | | "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", |
| 5913 | "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", |
5909 | 5914 | "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", |
5910 | 5915 | "dev": true, |
5911 | 5916 | "requires": { |
… |
… |
|
5918 | 5923 | }, |
5919 | 5924 | "create-hmac": { |
5920 | 5925 | "version": "1.1.7", |
5921 | | "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", |
| 5926 | "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", |
5922 | 5927 | "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", |
5923 | 5928 | "dev": true, |
5924 | 5929 | "requires": { |
… |
… |
|
5984 | 5989 | }, |
5985 | 5990 | "css-color-names": { |
5986 | 5991 | "version": "0.0.4", |
5987 | | "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", |
| 5992 | "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", |
5988 | 5993 | "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", |
5989 | 5994 | "dev": true |
5990 | 5995 | }, |
… |
… |
|
6867 | 6872 | }, |
6868 | 6873 | "diffie-hellman": { |
6869 | 6874 | "version": "5.0.3", |
6870 | | "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", |
| 6875 | "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", |
6871 | 6876 | "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", |
6872 | 6877 | "dev": true, |
6873 | 6878 | "requires": { |
… |
… |
|
17589 | 17594 | }, |
17590 | 17595 | "react-autosize-textarea": { |
17591 | 17596 | "version": "3.0.3", |
17592 | | "resolved": "http://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz", |
| 17597 | "resolved": "https://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz", |
17593 | 17598 | "integrity": "sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg==", |
17594 | 17599 | "requires": { |
17595 | 17600 | "autosize": "^4.0.0", |
… |
… |
|
18984 | 18989 | }, |
18985 | 18990 | "sha.js": { |
18986 | 18991 | "version": "2.4.11", |
18987 | | "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", |
| 18992 | "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", |
18988 | 18993 | "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", |
18989 | 18994 | "dev": true, |
18990 | 18995 | "requires": { |
diff --git a/package.json b/package.json
index 97029bd35c..a810c42aeb 100644
a
|
b
|
|
121 | 121 | "@wordpress/wordcount": "2.7.0", |
122 | 122 | "backbone": "1.4.0", |
123 | 123 | "clipboard": "2.0.4", |
| 124 | "core-js-url-browser": "3.6.4", |
124 | 125 | "element-closest": "^2.0.2", |
125 | 126 | "formdata-polyfill": "3.0.13", |
126 | 127 | "hoverintent": "2.2.1", |
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index ef085b5c93..f8e6c4383a 100644
a
|
b
|
function wp_default_packages_vendor( &$scripts ) { |
100 | 100 | 'wp-polyfill-fetch' => '3.0.0', |
101 | 101 | 'wp-polyfill-formdata' => '3.0.12', |
102 | 102 | 'wp-polyfill-node-contains' => '3.42.0', |
103 | | 'wp-polyfill-url' => '3.42.0', |
| 103 | 'wp-polyfill-url' => '3.6.4', |
104 | 104 | 'wp-polyfill-dom-rect' => '3.42.0', |
105 | 105 | 'wp-polyfill-element-closest' => '2.0.2', |
106 | 106 | 'wp-polyfill' => '7.4.4', |
… |
… |
function wp_default_packages_vendor( &$scripts ) { |
126 | 126 | array( |
127 | 127 | '\'fetch\' in window' => 'wp-polyfill-fetch', |
128 | 128 | 'document.contains' => 'wp-polyfill-node-contains', |
129 | | 'window.URL' => 'wp-polyfill-url', |
130 | 129 | 'window.DOMRect' => 'wp-polyfill-dom-rect', |
| 130 | 'window.URL && window.URL.prototype && window.URLSearchParams' => 'wp-polyfill-url', |
131 | 131 | 'window.FormData && window.FormData.prototype.keys' => 'wp-polyfill-formdata', |
132 | 132 | 'Element.prototype.matches && Element.prototype.closest' => 'wp-polyfill-element-closest', |
133 | 133 | ) |
diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php
index 5b885fe1b2..460c35e8a9 100644
a
|
b
|
JS; |
717 | 717 | $expected .= "<script type='text/javascript' src='http://example.com'></script>\n"; |
718 | 718 | $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/vendor/wp-polyfill.min.js'></script>\n"; |
719 | 719 | $expected .= "<script type='text/javascript'>\n"; |
720 | | $expected .= "( 'fetch' in window ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js\"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js\"></scr' + 'ipt>' );( window.URL ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-url.min.js\"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js\"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js\"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js\"></scr' + 'ipt>' );\n"; |
| 720 | $expected .= "( 'fetch' in window ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js\"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js\"></scr' + 'ipt>' );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-url.min.js\"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js\"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js\"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src=\"http://example.org/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js\"></scr' + 'ipt>' );\n"; |
721 | 721 | $expected .= "</script>\n"; |
722 | 722 | $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/dom-ready.min.js'></script>\n"; |
723 | 723 | $expected .= "<script type='text/javascript' src='/wp-includes/js/dist/a11y.min.js'></script>\n"; |
diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
index bf05904e61..167ce0110a 100644
a
|
b
|
module.exports = function( env = { environment: 'production', watch: false, buil |
77 | 77 | 'wp-polyfill-fetch.js': 'whatwg-fetch/dist/fetch.umd.js', |
78 | 78 | 'wp-polyfill-element-closest.js': 'element-closest/element-closest.js', |
79 | 79 | 'wp-polyfill-node-contains.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js', |
80 | | 'wp-polyfill-url.js': 'polyfill-library/polyfills/URL/polyfill.js', |
| 80 | 'wp-polyfill-url.js': 'core-js-url-browser/url.js', |
81 | 81 | 'wp-polyfill-dom-rect.js': 'polyfill-library/polyfills/DOMRect/polyfill.js', |
82 | 82 | 'wp-polyfill-formdata.js': 'formdata-polyfill/FormData.js', |
83 | 83 | 'moment.js': 'moment/moment.js', |
… |
… |
module.exports = function( env = { environment: 'production', watch: false, buil |
89 | 89 | 'lodash.min.js': 'lodash/lodash.min.js', |
90 | 90 | 'wp-polyfill.min.js': '@babel/polyfill/dist/polyfill.min.js', |
91 | 91 | 'wp-polyfill-formdata.min.js': 'formdata-polyfill/formdata.min.js', |
| 92 | 'wp-polyfill-url.min.js': 'core-js-url-browser/url.min.js', |
92 | 93 | 'moment.min.js': 'moment/min/moment.min.js', |
93 | 94 | 'react.min.js': 'react/umd/react.production.min.js', |
94 | 95 | 'react-dom.min.js': 'react-dom/umd/react-dom.production.min.js', |
… |
… |
module.exports = function( env = { environment: 'production', watch: false, buil |
98 | 99 | 'wp-polyfill-fetch.min.js': 'whatwg-fetch/dist/fetch.umd.js', |
99 | 100 | 'wp-polyfill-element-closest.min.js': 'element-closest/element-closest.js', |
100 | 101 | 'wp-polyfill-node-contains.min.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js', |
101 | | 'wp-polyfill-url.min.js': 'polyfill-library/polyfills/URL/polyfill.js', |
102 | 102 | 'wp-polyfill-dom-rect.min.js': 'polyfill-library/polyfills/DOMRect/polyfill.js', |
103 | 103 | }; |
104 | 104 | |