Build/Test Tools: Support NodeJS 14.x in the 5.0 branch.

This updates the 5.0 branch to support the latest LTS version of NodeJS (currently 14.x), allowing the same version to be used across all WordPress branches that receive security updates as a courtesy.

In addition to backporting the package updates that happened after branching 5.0, dependencies that were removed in future releases have also been updated to their latest versions.

Props desrosj, dd32, netweb, jorbin.
Merges [44233,44728,45321,45765,45826,46403-46404,46408,46409,47404,47867-47869,47872-47873,48705,49636,49933,49937,49939,49940,49983,49989,50017,50126,50176,50185,50192] to the 5.0 branch.
See #52341.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@50201 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2021-02-05 04:03:45 +00:00
parent 4b924e3341
commit 676c22e235
7 changed files with 6504 additions and 8203 deletions

2
.nvmrc
View File

@ -1 +1 @@
10.22.1
14

View File

@ -9,7 +9,8 @@ module.exports = function(grunt) {
SOURCE_DIR = 'src/',
BUILD_DIR = 'build/',
BANNER_TEXT = '/*! This file is auto-generated */',
autoprefixer = require( 'autoprefixer' );
autoprefixer = require( 'autoprefixer' ),
sass = require( 'sass' );
// Load tasks.
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );
@ -22,18 +23,6 @@ module.exports = function(grunt) {
options: {
processors: [
autoprefixer({
browsers: [
'> 1%',
'ie >= 11',
'last 1 Android versions',
'last 1 ChromeAndroid versions',
'last 2 Chrome versions',
'last 2 Firefox versions',
'last 2 Safari versions',
'last 2 iOS versions',
'last 2 Edge versions',
'last 2 Opera versions'
],
cascade: false
})
]
@ -184,7 +173,7 @@ module.exports = function(grunt) {
ext: '.css',
src: ['wp-admin/css/colors/*/colors.scss'],
options: {
outputStyle: 'expanded'
implementation: sass
}
}
},
@ -485,8 +474,9 @@ module.exports = function(grunt) {
},
uglify: {
options: {
ASCIIOnly: true,
screwIE8: false
output: {
ascii_only: true
}
},
core: {
expand: true,
@ -542,7 +532,9 @@ module.exports = function(grunt) {
jqueryui: {
options: {
// Preserve comments that start with a bang.
preserveComments: /^!/
output: {
comments: /^!/
}
},
expand: true,
cwd: SOURCE_DIR,
@ -553,7 +545,9 @@ module.exports = function(grunt) {
masonry: {
options: {
// Preserve comments that start with a bang.
preserveComments: /^!/
output: {
comments: /^!/
}
},
src: SOURCE_DIR + 'wp-includes/js/jquery/jquery.masonry.js',
dest: SOURCE_DIR + 'wp-includes/js/jquery/jquery.masonry.min.js'

14510
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,97 +7,110 @@
"url": "https://develop.svn.wordpress.org/trunk"
},
"engines": {
"node": "10.22.1",
"npm": "6.14.6"
"node": ">=14.15.0",
"npm": ">=6.14.8"
},
"author": "The WordPress Contributors",
"license": "GPL-2.0+",
"browserslist": [
"> 1%",
"ie >= 11",
"last 1 Android versions",
"last 1 ChromeAndroid versions",
"last 2 Chrome versions",
"last 2 Firefox versions",
"last 2 Safari versions",
"last 2 iOS versions",
"last 2 Edge versions",
"last 2 Opera versions"
],
"devDependencies": {
"@wordpress/custom-templated-path-webpack-plugin": "^1.1.5",
"@wordpress/library-export-default-webpack-plugin": "^1.0.4",
"autoprefixer": "^9.1.5",
"@wordpress/custom-templated-path-webpack-plugin": "1.1.5",
"@wordpress/library-export-default-webpack-plugin": "1.0.4",
"autoprefixer": "^9.8.6",
"copy-webpack-plugin": "^4.6.0",
"cssnano": "^4.1.4",
"cssnano": "4.1.10",
"dotenv": "^8.2.0",
"dotenv-expand": "^5.1.0",
"grunt": "~1.0.3",
"grunt": "~1.3.0",
"grunt-banner": "^0.6.0",
"grunt-contrib-clean": "~2.0.0",
"grunt-contrib-compress": "~1.4.3",
"grunt-contrib-concat": "~1.0.0",
"grunt-contrib-compress": "~2.0.0",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-cssmin": "~3.0.0",
"grunt-contrib-imagemin": "~2.0.1",
"grunt-contrib-jshint": "~2.0.0",
"grunt-contrib-qunit": "^1.2.0",
"grunt-contrib-uglify": "~2.0.0",
"grunt-contrib-imagemin": "~4.0.0",
"grunt-contrib-jshint": "3.0.0",
"grunt-contrib-qunit": "^4.0.0",
"grunt-contrib-uglify": "~5.0.0",
"grunt-contrib-watch": "~1.1.0",
"grunt-includes": "~1.1.0",
"grunt-jsdoc": "^2.1.0",
"grunt-jsdoc": "2.4.1",
"grunt-jsvalidate": "~0.2.2",
"grunt-legacy-util": "^1.1.1",
"grunt-patch-wordpress": "~1.0.0",
"grunt-legacy-util": "^2.0.0",
"grunt-patch-wordpress": "~3.0.0",
"grunt-postcss": "~0.9.0",
"grunt-replace": "~1.0.1",
"grunt-rtlcss": "~2.0.1",
"grunt-sass": "^2.0.0",
"grunt-webpack": "^3.0.2",
"ink-docstrap": "^1.3.0",
"grunt-replace-lts": "~1.1.0",
"grunt-rtlcss": "~2.0.2",
"grunt-sass": "~3.1.0",
"grunt-webpack": "^4.0.0",
"ink-docstrap": "1.3.2",
"matchdep": "~2.0.0",
"source-map-loader": "^0.2.4",
"uglify-js": "^3.4.9",
"wait-on": "^3.3.0",
"webpack": "^4.24.0",
"webpack-dev-server": "^3.1.9",
"webpack-livereload-plugin": "^2.1.1"
"sass": "^1.32.6",
"source-map-loader": "^1.1.3",
"uglify-js": "^3.12.6",
"wait-on": "5.2.1",
"webpack": "4.43.0",
"webpack-dev-server": "3.11.2",
"webpack-livereload-plugin": "2.3.0"
},
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@wordpress/a11y": "^2.0.2",
"@wordpress/annotations": "^1.0.5",
"@wordpress/api-fetch": "^2.2.7",
"@wordpress/autop": "^2.0.2",
"@wordpress/blob": "^2.1.0",
"@wordpress/block-library": "^2.2.17",
"@wordpress/block-serialization-default-parser": "^2.0.3",
"@wordpress/blocks": "^6.0.5",
"@wordpress/components": "^7.0.5",
"@wordpress/compose": "^3.0.0",
"@wordpress/core-data": "^2.0.16",
"@wordpress/data": "^4.2.0",
"@wordpress/date": "^3.0.1",
"@wordpress/deprecated": "^2.0.4",
"@wordpress/dom": "^2.0.8",
"@wordpress/dom-ready": "^2.0.2",
"@wordpress/edit-post": "^3.1.7",
"@wordpress/editor": "^9.0.7",
"@wordpress/element": "^2.1.8",
"@wordpress/escape-html": "^1.0.1",
"@wordpress/format-library": "^1.2.10",
"@wordpress/hooks": "^2.0.4",
"@wordpress/html-entities": "^2.0.4",
"@wordpress/i18n": "^3.1.0",
"@wordpress/is-shallow-equal": "^1.1.4",
"@wordpress/keycodes": "^2.0.5",
"@wordpress/list-reusable-blocks": "^1.1.18",
"@wordpress/notices": "^1.1.2",
"@wordpress/nux": "^3.0.6",
"@wordpress/plugins": "^2.0.10",
"@wordpress/redux-routine": "^3.0.3",
"@wordpress/rich-text": "^3.0.4",
"@wordpress/shortcode": "^2.0.2",
"@wordpress/token-list": "^1.1.0",
"@wordpress/url": "^2.3.3",
"@wordpress/viewport": "^2.1.0",
"@wordpress/wordcount": "^2.0.3",
"element-closest": "^2.0.2",
"formdata-polyfill": "^3.0.12",
"lodash": "^4.17.11",
"moment": "^2.22.2",
"polyfill-library": "^3.26.0-0",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"whatwg-fetch": "^3.0.0"
"@babel/polyfill": "7.0.0",
"@wordpress/a11y": "2.0.2",
"@wordpress/annotations": "1.0.5",
"@wordpress/api-fetch": "2.2.7",
"@wordpress/autop": "2.0.2",
"@wordpress/blob": "2.1.0",
"@wordpress/block-library": "2.2.17",
"@wordpress/block-serialization-default-parser": "2.0.3",
"@wordpress/blocks": "6.0.5",
"@wordpress/components": "7.0.5",
"@wordpress/compose": "3.0.0",
"@wordpress/core-data": "2.0.16",
"@wordpress/data": "4.2.0",
"@wordpress/date": "3.0.1",
"@wordpress/deprecated": "2.0.4",
"@wordpress/dom": "2.0.8",
"@wordpress/dom-ready": "2.0.2",
"@wordpress/edit-post": "3.1.7",
"@wordpress/editor": "9.0.7",
"@wordpress/element": "2.1.8",
"@wordpress/escape-html": "1.0.1",
"@wordpress/format-library": "1.2.10",
"@wordpress/hooks": "2.0.4",
"@wordpress/html-entities": "2.0.4",
"@wordpress/i18n": "3.1.0",
"@wordpress/is-shallow-equal": "1.1.4",
"@wordpress/keycodes": "2.0.5",
"@wordpress/list-reusable-blocks": "1.1.18",
"@wordpress/notices": "1.1.2",
"@wordpress/nux": "3.0.6",
"@wordpress/plugins": "2.0.10",
"@wordpress/redux-routine": "3.0.3",
"@wordpress/rich-text": "3.0.4",
"@wordpress/shortcode": "2.0.2",
"@wordpress/token-list": "1.1.0",
"@wordpress/url": "2.3.3",
"@wordpress/viewport": "2.1.0",
"@wordpress/wordcount": "2.0.3",
"element-closest": "2.0.2",
"formdata-polyfill": "3.0.12",
"lodash": "4.17.11",
"moment": "2.22.2",
"polyfill-library": "3.26.0-0",
"react": "16.6.3",
"react-dom": "16.6.3",
"whatwg-fetch": "3.0.0"
},
"scripts": {
"build": "grunt build",

File diff suppressed because one or more lines are too long

View File

@ -8,4 +8,4 @@
* MIT License
* by David DeSandro
*/
!function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window);
!function(){"use strict";var t=window.Masonry;t.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(t){return!t});var t=this.options.isAnimated;void 0!==t&&(this.options.transitionDuration=t?this.options.transitionDuration:0),void 0!==t&&!t||(t=(t=this.options.animationOptions)&&t.duration)&&(this.options.transitionDuration="string"==typeof t?t:t+"ms")},t.prototype._remapOption=function(t,o,i){t=this.options[t];void 0!==t&&(this.options[o]=i?i(t):t)};var o=t.prototype._create;t.prototype._create=function(){var t=this;this._remapV2Options(),o.apply(this,arguments),setTimeout(function(){jQuery(t.element).addClass("masonry")},0)};var i=t.prototype.layout;t.prototype.layout=function(){this._remapV2Options(),i.apply(this,arguments)};var n=t.prototype.option;t.prototype.option=function(){n.apply(this,arguments),this._remapV2Options()};var s=t.prototype._itemize;t.prototype._itemize=function(t){var o=s.apply(this,arguments);return jQuery(t).addClass("masonry-brick"),o};var e=t.prototype.measureColumns;t.prototype.measureColumns=function(){var t=this.options.columnWidth;t&&"function"==typeof t&&(this.getContainerWidth(),this.columnWidth=t(this.containerWidth)),e.apply(this,arguments)},t.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var p=t.prototype.destroy;t.prototype.destroy=function(){var t=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(t).removeClass("masonry-brick"),p.apply(this,arguments)}}();

View File

@ -35,8 +35,6 @@ class Tests_Basic extends WP_UnitTestCase {
function test_package_json_node_engine( $package_json ) {
$this->assertArrayHasKey( 'engines', $package_json );
$this->assertArrayHasKey( 'node', $package_json['engines'] );
$node = $package_json['engines']['node'];
$this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." );
}
// two tests for a lame bug in PHPUnit that broke the $GLOBALS reference