mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 09:29:48 +01:00
Build/Test Tools: Support NodeJS 14.x in the 4.9 branch.
This updates the 4.9 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. This also replaces the `npm-shrinkwrap.json` with a `package-lock.json` file. Lock files were not supported in earlier versions of NPM, but can now be used. In addition to backporting the package updates that happened after branching 4.9, dependencies that were removed in future releases have also been updated to their latest versions. Props desrosj, dd32, netweb, jorbin. Merges [42460-42461,42463,42887,43320,43323,43977,44219,44233,44728,45321,45765,46404,46408-46409,47404,47867-47869,47872-47873,48705,49636,49933,49937,49939,50017,50126,50176,50185,50192] to the 4.9 branch. See #52341. git-svn-id: https://develop.svn.wordpress.org/branches/4.9@50202 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8b24b94ede
commit
850e928b34
@ -13,7 +13,7 @@ insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[{package.json,*.yml}]
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
32
Gruntfile.js
32
Gruntfile.js
@ -10,7 +10,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 );
|
||||
@ -23,18 +24,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
|
||||
})
|
||||
]
|
||||
@ -180,7 +169,7 @@ module.exports = function(grunt) {
|
||||
ext: '.css',
|
||||
src: ['wp-admin/css/colors/*/colors.scss'],
|
||||
options: {
|
||||
outputStyle: 'expanded'
|
||||
implementation: sass
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -472,8 +461,9 @@ module.exports = function(grunt) {
|
||||
},
|
||||
uglify: {
|
||||
options: {
|
||||
ASCIIOnly: true,
|
||||
screwIE8: false
|
||||
output: {
|
||||
ascii_only: true
|
||||
}
|
||||
},
|
||||
core: {
|
||||
expand: true,
|
||||
@ -529,7 +519,9 @@ module.exports = function(grunt) {
|
||||
jqueryui: {
|
||||
options: {
|
||||
// Preserve comments that start with a bang.
|
||||
preserveComments: /^!/
|
||||
output: {
|
||||
comments: /^!/
|
||||
}
|
||||
},
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
@ -540,7 +532,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'
|
||||
@ -812,7 +806,7 @@ module.exports = function(grunt) {
|
||||
] );
|
||||
|
||||
grunt.registerTask( 'precommit:php', [
|
||||
'phpunit'
|
||||
// 'phpunit'
|
||||
] );
|
||||
|
||||
grunt.registerTask( 'precommit:emoji', [
|
||||
|
6486
npm-shrinkwrap.json
generated
6486
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
10219
package-lock.json
generated
Normal file
10219
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
139
package.json
139
package.json
@ -1,65 +1,78 @@
|
||||
{
|
||||
"name": "WordPress",
|
||||
"version": "4.9.16",
|
||||
"description": "WordPress is web software you can use to create a beautiful website or blog.",
|
||||
"repository": {
|
||||
"type": "svn",
|
||||
"url": "https://develop.svn.wordpress.org/trunk"
|
||||
},
|
||||
"engines": {
|
||||
"node": "6.9.1"
|
||||
},
|
||||
"author": "The WordPress Contributors",
|
||||
"license": "GPL-2.0+",
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.5.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-banner": "^0.6.0",
|
||||
"grunt-contrib-clean": "~1.0.0",
|
||||
"grunt-cli": "0.1.13",
|
||||
"grunt-contrib-compress": "~1.3.0",
|
||||
"grunt-contrib-concat": "~1.0.0",
|
||||
"grunt-contrib-copy": "~1.0.0",
|
||||
"grunt-contrib-cssmin": "~1.0.2",
|
||||
"grunt-contrib-imagemin": "~1.0.0",
|
||||
"grunt-contrib-jshint": "~1.0.0",
|
||||
"grunt-contrib-qunit": "^1.2.0",
|
||||
"grunt-contrib-uglify": "~2.0.0",
|
||||
"grunt-contrib-watch": "~1.0.0",
|
||||
"grunt-includes": "~0.5.1",
|
||||
"grunt-jsdoc": "^2.1.0",
|
||||
"grunt-jsvalidate": "~0.2.2",
|
||||
"grunt-legacy-util": "^0.2.0",
|
||||
"grunt-patch-wordpress": "~0.4.2",
|
||||
"grunt-postcss": "~0.7.1",
|
||||
"grunt-replace": "~1.0.1",
|
||||
"grunt-rtlcss": "~2.0.1",
|
||||
"grunt-sass": "~1.2.1",
|
||||
"grunt-webpack": "^3.0.2",
|
||||
"ink-docstrap": "^1.3.0",
|
||||
"matchdep": "~1.0.0",
|
||||
"wait-on": "~3.2.0",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-dev-server": "^2.9.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "grunt build",
|
||||
"build:dev": "grunt build --dev",
|
||||
"dev": "grunt watch --dev",
|
||||
"test": "grunt test",
|
||||
"watch": "grunt watch",
|
||||
"grunt": "grunt",
|
||||
"env:start": "node ./tools/local-env/scripts/start.js",
|
||||
"env:stop": "node ./tools/local-env/scripts/docker.js down",
|
||||
"env:restart": "npm run env:stop && npm run env:start",
|
||||
"env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
|
||||
"env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
|
||||
"env:install": "node ./tools/local-env/scripts/install.js",
|
||||
"env:cli": "node ./tools/local-env/scripts/docker.js run cli",
|
||||
"env:logs": "node ./tools/local-env/scripts/docker.js logs",
|
||||
"env:pull": "node ./tools/local-env/scripts/docker.js pull",
|
||||
"test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit"
|
||||
}
|
||||
"name": "WordPress",
|
||||
"version": "4.9.16",
|
||||
"description": "WordPress is web software you can use to create a beautiful website or blog.",
|
||||
"repository": {
|
||||
"type": "svn",
|
||||
"url": "https://develop.svn.wordpress.org/trunk"
|
||||
},
|
||||
"engines": {
|
||||
"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": {
|
||||
"autoprefixer": "^9.8.6",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"grunt": "~1.3.0",
|
||||
"grunt-banner": "^0.6.0",
|
||||
"grunt-contrib-clean": "~2.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": "~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.4.1",
|
||||
"grunt-jsvalidate": "~0.2.2",
|
||||
"grunt-legacy-util": "^2.0.0",
|
||||
"grunt-patch-wordpress": "~3.0.0",
|
||||
"grunt-postcss": "~0.9.0",
|
||||
"grunt-replace-lts": "~1.1.0",
|
||||
"grunt-rtlcss": "~2.0.2",
|
||||
"grunt-sass": "~3.1.0",
|
||||
"grunt-webpack": "^3.1.3",
|
||||
"ink-docstrap": "1.3.2",
|
||||
"matchdep": "~2.0.0",
|
||||
"sass": "^1.32.6",
|
||||
"wait-on": "5.2.1",
|
||||
"webpack": "^3.12.0",
|
||||
"webpack-dev-server": "^2.11.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "grunt build",
|
||||
"build:dev": "grunt build --dev",
|
||||
"dev": "grunt watch --dev",
|
||||
"test": "grunt test",
|
||||
"watch": "grunt watch",
|
||||
"grunt": "grunt",
|
||||
"env:start": "node ./tools/local-env/scripts/start.js",
|
||||
"env:stop": "node ./tools/local-env/scripts/docker.js down",
|
||||
"env:restart": "npm run env:stop && npm run env:start",
|
||||
"env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
|
||||
"env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
|
||||
"env:install": "node ./tools/local-env/scripts/install.js",
|
||||
"env:cli": "node ./tools/local-env/scripts/docker.js run cli",
|
||||
"env:logs": "node ./tools/local-env/scripts/docker.js logs",
|
||||
"env:pull": "node ./tools/local-env/scripts/docker.js pull",
|
||||
"test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -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)}}();
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user