External Libraries: Update Underscore to version 1.12.1.

Full set of changes at https://github.com/jashkenas/underscore/compare/1.8.3...1.12.1.  
The new version includes a `sourceMappingURL` that causes a build failure, so this change 
also introduces a task to remove this from the source during the build.

Props mukesh27, hareesh-pillai, desrosj, SergeyBiryukov, TimoTijhof.
Fixes #45785.

git-svn-id: https://develop.svn.wordpress.org/trunk@50650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
David Baumwald
2021-04-02 19:40:43 +00:00
parent 2d8ba7b566
commit 44a066fa57
3 changed files with 25 additions and 4 deletions
+21
View File
@@ -1126,6 +1126,26 @@ module.exports = function(grunt) {
dest: BUILD_DIR + 'wp-includes/'
}
]
},
sourceMaps: {
options: {
patterns: [
{
match: new RegExp( '//# sourceMappingURL=.*\\s*' ),
replacement: ''
}
]
},
files: [
{
expand: true,
flatten: true,
src: [
BUILD_DIR + 'wp-includes/js/underscore.js'
],
dest: BUILD_DIR + 'wp-includes/js/'
}
]
}
},
_watch: {
@@ -1569,6 +1589,7 @@ module.exports = function(grunt) {
'includes:emoji',
'includes:embed',
'replace:emojiBannerText',
'replace:sourceMaps',
'verify:build'
] );
}
+3 -3
View File
@@ -23053,9 +23053,9 @@
"dev": true
},
"underscore": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
"integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI="
"version": "1.12.1",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz",
"integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw=="
},
"underscore.string": {
"version": "3.3.5",
+1 -1
View File
@@ -145,7 +145,7 @@
"react": "16.13.1",
"react-dom": "16.13.1",
"twemoji": "13.0.2",
"underscore": "1.8.3",
"underscore": "1.12.1",
"whatwg-fetch": "3.0.0"
},
"scripts": {