Make WordPress Core

Changeset 50203


Ignore:
Timestamp:
02/05/2021 04:09:50 AM (3 years ago)
Author:
desrosj
Message:

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

This updates the 4.8 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.8, 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.8 branch.
See #52341.

Location:
branches/4.8
Files:
1 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/.editorconfig

    r32116 r50203  
    1414indent_style = tab
    1515
    16 [{.jshintrc,*.json,*.yml}]
     16[*.yml]
    1717indent_style = space
    1818indent_size = 2
  • branches/4.8/.nvmrc

    r49654 r50203  
    1 v6.9.1
     114
  • branches/4.8/Gruntfile.js

    r41201 r50203  
    66        BUILD_DIR = 'build/',
    77        autoprefixer = require('autoprefixer'),
     8        sass = require( 'sass' ),
    89        mediaConfig = {},
    910        mediaBuilds = ['audiovideo', 'grid', 'models', 'views'];
     
    2627                processors: [
    2728                    autoprefixer({
    28                         browsers: [
    29                             'Android >= 2.1',
    30                             'Chrome >= 21',
    31                             'Edge >= 12',
    32                             'Explorer >= 7',
    33                             'Firefox >= 17',
    34                             'Opera >= 12.1',
    35                             'Safari >= 6.0'
    36                         ],
    3729                        cascade: false
    3830                    })
     
    167159                src: ['wp-admin/css/colors/*/colors.scss'],
    168160                options: {
    169                     outputStyle: 'expanded'
     161                    implementation: sass
    170162                }
    171163            }
     
    448440        uglify: {
    449441            options: {
    450                 ASCIIOnly: true,
    451                 screwIE8: false
     442                output: {
     443                    ascii_only: true,
     444                    ie8: true
     445                }
    452446            },
    453447            core: {
     
    506500                options: {
    507501                    // Preserve comments that start with a bang.
    508                     preserveComments: /^!/
     502                    output: {
     503                        comments: /^!/
     504                    }
    509505                },
    510506                expand: true,
     
    526522                options: {
    527523                    // Preserve comments that start with a bang.
    528                     preserveComments: /^!/
     524                    output: {
     525                        comments: /^!/
     526                    }
    529527                },
    530528                src: SOURCE_DIR + 'wp-includes/js/jquery/jquery.masonry.js',
  • branches/4.8/package.json

    r49531 r50203  
    11{
    2   "name": "WordPress",
    3   "version": "4.8.15",
    4   "description": "WordPress is web software you can use to create a beautiful website or blog.",
    5   "repository": {
    6     "type": "svn",
    7     "url": "https://develop.svn.wordpress.org/trunk"
    8   },
    9   "engines": {
    10     "node": "6.9.1"
    11   },
    12   "author": "The WordPress Contributors",
    13   "license": "GPL-2.0+",
    14   "devDependencies": {
    15     "autoprefixer": "^6.5.1",
    16     "dotenv": "^8.2.0",
    17     "dotenv-expand": "^5.1.0",
    18     "grunt": "~0.4.5",
    19     "grunt-browserify": "~5.0.0",
    20     "grunt-cli": "0.1.13",
    21     "grunt-contrib-clean": "~1.0.0",
    22     "grunt-contrib-compress": "~1.3.0",
    23     "grunt-contrib-concat": "~1.0.0",
    24     "grunt-contrib-copy": "~1.0.0",
    25     "grunt-contrib-cssmin": "~1.0.2",
    26     "grunt-contrib-imagemin": "~1.0.0",
    27     "grunt-contrib-jshint": "~1.0.0",
    28     "grunt-contrib-qunit": "^1.2.0",
    29     "grunt-contrib-uglify": "~2.0.0",
    30     "grunt-contrib-watch": "~1.0.0",
    31     "grunt-includes": "~0.5.1",
    32     "grunt-jsvalidate": "~0.2.2",
    33     "grunt-legacy-util": "^0.2.0",
    34     "grunt-patch-wordpress": "~0.4.2",
    35     "grunt-postcss": "~0.7.1",
    36     "grunt-rtlcss": "~2.0.1",
    37     "grunt-sass": "~1.2.1",
    38     "matchdep": "~1.0.0",
    39     "wait-on": "~3.2.0"
    40   },
    41   "scripts": {
    42     "build": "grunt build",
    43     "build:dev": "grunt build --dev",
    44     "dev": "grunt watch --dev",
    45     "test": "grunt test",
    46     "watch": "grunt watch",
    47     "grunt": "grunt",
    48     "env:start": "node ./tools/local-env/scripts/start.js",
    49     "env:stop": "node ./tools/local-env/scripts/docker.js down",
    50     "env:restart": "npm run env:stop && npm run env:start",
    51     "env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
    52     "env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
    53     "env:install": "node ./tools/local-env/scripts/install.js",
    54     "env:cli": "node ./tools/local-env/scripts/docker.js run cli",
    55     "env:logs": "node ./tools/local-env/scripts/docker.js logs",
    56     "env:pull": "node ./tools/local-env/scripts/docker.js pull",
    57     "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit"
    58   }
     2    "name": "WordPress",
     3    "version": "4.8.15",
     4    "description": "WordPress is web software you can use to create a beautiful website or blog.",
     5    "repository": {
     6        "type": "svn",
     7        "url": "https://develop.svn.wordpress.org/trunk"
     8    },
     9    "engines": {
     10        "node": ">=14.15.0",
     11        "npm": ">=6.14.8"
     12    },
     13    "author": "The WordPress Contributors",
     14    "license": "GPL-2.0+",
     15    "browserslist": [
     16        "Android >= 2.1",
     17        "Chrome >= 21",
     18        "Edge >= 12",
     19        "Explorer >= 7",
     20        "Firefox >= 17",
     21        "Opera >= 12.1",
     22        "Safari >= 6.0"
     23    ],
     24    "devDependencies": {
     25        "autoprefixer": "^9.8.6",
     26        "dotenv": "^8.2.0",
     27        "dotenv-expand": "^5.1.0",
     28        "grunt": "~1.3.0",
     29        "grunt-browserify": "~5.3.0",
     30        "grunt-contrib-clean": "~2.0.0",
     31        "grunt-contrib-compress": "~2.0.0",
     32        "grunt-contrib-concat": "~1.0.1",
     33        "grunt-contrib-copy": "~1.0.0",
     34        "grunt-contrib-cssmin": "~3.0.0",
     35        "grunt-contrib-imagemin": "~4.0.0",
     36        "grunt-contrib-jshint": "3.0.0",
     37        "grunt-contrib-qunit": "^4.0.0",
     38        "grunt-contrib-uglify": "~5.0.0",
     39        "grunt-contrib-watch": "~1.1.0",
     40        "grunt-includes": "~1.1.0",
     41        "grunt-jsvalidate": "~0.2.2",
     42        "grunt-legacy-util": "^2.0.0",
     43        "grunt-patch-wordpress": "~3.0.0",
     44        "grunt-postcss": "~0.9.0",
     45        "grunt-rtlcss": "~2.0.2",
     46        "grunt-sass": "~3.1.0",
     47        "matchdep": "~2.0.0",
     48        "sass": "^1.32.6",
     49        "wait-on": "~5.2.1"
     50    },
     51    "scripts": {
     52        "build": "grunt build",
     53        "build:dev": "grunt build --dev",
     54        "dev": "grunt watch --dev",
     55        "test": "grunt test",
     56        "watch": "grunt watch",
     57        "grunt": "grunt",
     58        "env:start": "node ./tools/local-env/scripts/start.js",
     59        "env:stop": "node ./tools/local-env/scripts/docker.js down",
     60        "env:restart": "npm run env:stop && npm run env:start",
     61        "env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans",
     62        "env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
     63        "env:install": "node ./tools/local-env/scripts/install.js",
     64        "env:cli": "node ./tools/local-env/scripts/docker.js run cli",
     65        "env:logs": "node ./tools/local-env/scripts/docker.js logs",
     66        "env:pull": "node ./tools/local-env/scripts/docker.js pull",
     67        "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit"
     68    }
    5969}
  • branches/4.8/src/wp-admin/js/bookmarklet.min.js

    r38869 r50203  
    1 (function(a,b,c,d){function e(a,c){if("undefined"!=typeof c){var d=b.createElement("input");d.name=a,d.value=c,d.type="hidden",p.appendChild(d)}}var f,g,h,i,j,k,l,m,n,o=a.encodeURIComponent,p=b.createElement("form"),q=b.getElementsByTagName("head")[0],r="_press_this_app",s=!0;if(d){if(!c.match(/^https?:/))return void(top.location.href=d);if(d+="&u="+o(c),c.match(/^https:/)&&d.match(/^http:/)&&(s=!1),a.getSelection?h=a.getSelection()+"":b.getSelection?h=b.getSelection()+"":b.selection&&(h=b.selection.createRange().text||""),d+="&buster="+(new Date).getTime(),s||(b.title&&(d+="&t="+o(b.title.substr(0,256))),h&&(d+="&s="+o(h.substr(0,512)))),f=a.outerWidth||b.documentElement.clientWidth||600,g=a.outerHeight||b.documentElement.clientHeight||700,f=f<800||f>5e3?600:.7*f,g=g<800||g>3e3?700:.9*g,!s)return void a.open(d,r,"location,resizable,scrollbars,width="+f+",height="+g);i=q.getElementsByTagName("meta")||[];for(var t=0;t<i.length&&!(t>200);t++){var u=i[t],v=u.getAttribute("name"),w=u.getAttribute("property"),x=u.getAttribute("content");x&&(v?e("_meta["+v+"]",x):w&&e("_meta["+w+"]",x))}j=q.getElementsByTagName("link")||[];for(var y=0;y<j.length&&!(y>=50);y++){var z=j[y],A=z.getAttribute("rel");"canonical"!==A&&"icon"!==A&&"shortlink"!==A||e("_links["+A+"]",z.getAttribute("href"))}b.body.getElementsByClassName&&(k=b.body.getElementsByClassName("hfeed")[0]),k=b.getElementById("content")||k||b.body,l=k.getElementsByTagName("img")||[];for(var B=0;B<l.length&&!(B>=100);B++)n=l[B],n.src.indexOf("avatar")>-1||n.className.indexOf("avatar")>-1||n.width&&n.width<256||n.height&&n.height<128||e("_images[]",n.src);m=b.body.getElementsByTagName("iframe")||[];for(var C=0;C<m.length&&!(C>=50);C++)e("_embeds[]",m[C].src);b.title&&e("t",b.title),h&&e("s",h),p.setAttribute("method","POST"),p.setAttribute("action",d),p.setAttribute("target",r),p.setAttribute("style","display: none;"),a.open("about:blank",r,"location,resizable,scrollbars,width="+f+",height="+g),b.body.appendChild(p),p.submit()}})(window,document,top.location.href,window.pt_url);
     1(function(e,n,t,i){var a,l,o,r,s,m,g,h=e.encodeURIComponent,c=n.createElement("form"),d=n.getElementsByTagName("head")[0],b="_press_this_app",u=!0;if(i)if(t.match(/^https?:/))if(i+="&u="+h(t),t.match(/^https:/)&&i.match(/^http:/)&&(u=!1),e.getSelection?a=e.getSelection()+"":n.getSelection?a=n.getSelection()+"":n.selection&&(a=n.selection.createRange().text||""),i+="&buster="+(new Date).getTime(),u||(n.title&&(i+="&t="+h(n.title.substr(0,256))),a&&(i+="&s="+h(a.substr(0,512)))),t=(t=e.outerWidth||n.documentElement.clientWidth||600)<800||5e3<t?600:.7*t,h=(h=e.outerHeight||n.documentElement.clientHeight||700)<800||3e3<h?700:.9*h,u){l=d.getElementsByTagName("meta")||[];for(var p=0;p<l.length&&!(200<p);p++){var f=l[p],y=f.getAttribute("name"),v=f.getAttribute("property"),f=f.getAttribute("content");f&&(y?N("_meta["+y+"]",f):v&&N("_meta["+v+"]",f))}o=d.getElementsByTagName("link")||[];for(var E=0;E<o.length&&!(50<=E);E++){var w=o[E],A=w.getAttribute("rel");"canonical"!==A&&"icon"!==A&&"shortlink"!==A||N("_links["+A+"]",w.getAttribute("href"))}n.body.getElementsByClassName&&(r=n.body.getElementsByClassName("hfeed")[0]),s=(r=n.getElementById("content")||r||n.body).getElementsByTagName("img")||[];for(var _=0;_<s.length&&!(100<=_);_++)-1<(g=s[_]).src.indexOf("avatar")||-1<g.className.indexOf("avatar")||g.width&&g.width<256||g.height&&g.height<128||N("_images[]",g.src);m=n.body.getElementsByTagName("iframe")||[];for(var B=0;B<m.length&&!(50<=B);B++)N("_embeds[]",m[B].src);n.title&&N("t",n.title),a&&N("s",a),c.setAttribute("method","POST"),c.setAttribute("action",i),c.setAttribute("target",b),c.setAttribute("style","display: none;"),e.open("about:blank",b,"location,resizable,scrollbars,width="+t+",height="+h),n.body.appendChild(c),c.submit()}else e.open(i,b,"location,resizable,scrollbars,width="+t+",height="+h);else top.location.href=i;function N(e,t){var i;void 0!==t&&((i=n.createElement("input")).name=e,i.value=t,i.type="hidden",c.appendChild(i))}})(window,document,top.location.href,window.pt_url);
  • branches/4.8/src/wp-includes/js/jquery/jquery.masonry.min.js

    r38276 r50203  
    99 * by David DeSandro
    1010 */
    11 !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);
     11!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)}}();
  • branches/4.8/src/wp-includes/js/media-audiovideo.js

    r36546 r50203  
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
    22var media = wp.media,
    33    baseSettings = window._wpmejsSettings || {},
  • branches/4.8/src/wp-includes/js/media-grid.js

    r40359 r50203  
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
    22/**
    33 * wp.media.controller.EditAttachmentMetadata
  • branches/4.8/src/wp-includes/js/media-models.js

    r39051 r50203  
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
    22var $ = jQuery,
    33    Attachment, Attachments, l10n, media;
  • branches/4.8/src/wp-includes/js/media-views.js

    r41010 r50203  
    1 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
     1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
    22/**
    33 * wp.media.controller.CollectionAdd
  • branches/4.8/tests/phpunit/tests/basic.php

    r40614 r50203  
    3636        $this->assertArrayHasKey( 'engines', $package_json );
    3737        $this->assertArrayHasKey( 'node', $package_json['engines'] );
    38         $node = $package_json['engines']['node'];
    39         $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." );
    4038    }
    4139
Note: See TracChangeset for help on using the changeset viewer.