WordPress.org

Make WordPress Core

Changeset 50214


Ignore:
Timestamp:
02/05/2021 04:27:25 AM (5 months ago)
Author:
desrosj
Message:

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

This updates the 4.2 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.

Because older branches use (really) old versions of NodeJS, the local Docker environment cannot be backported since the needed dependencies will not run on these older versions (see #48301). This also blocks the ability to move automated testing over to GitHub Actions (see #50401).

This change also introduces a packager-lock.json file to the branch.

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

Props desrosj, dd32, netweb, jorbin.
Merges [32356-32357,32988,33726,34888,35335,35363,35513,35521,35538-35541,35859,36861-36865,36935,36979,37017,37019-37020,37212,37612,38111,39110,39113,39115-39119,39478,41835,42460,42461,42463,42887,43320,43323,43977,44219,44233,45321,45765,46404,46408-46409,47404,47867,47872-47873,48705,49636,49933,49937,49939,50126,50176,50185] to the 4.2 branch.
See #52341.

Location:
branches/4.2
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

  • branches/4.2/.editorconfig

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

    r49666 r50214  
    1 v0.12.18
     114
  • branches/4.2/Gruntfile.js

    r32125 r50214  
    55        BUILD_DIR = 'build/',
    66        mediaConfig = {},
    7         mediaBuilds = ['audiovideo', 'grid', 'models', 'views'];
     7        mediaBuilds = ['audiovideo', 'grid', 'models', 'views'],
     8        sass = require( 'sass' );
    89
    910    // Load tasks.
     
    135136                src: ['wp-admin/css/colors/*/colors.scss'],
    136137                options: {
    137                     outputStyle: 'expanded'
     138                    implementation: sass
    138139                }
    139140            }
     
    176177            options: {
    177178                // rtlcss options
    178                 config: {
    179                     swapLeftRightInUrl: false,
    180                     swapLtrRtlInUrl: false,
    181                     autoRename: false,
    182                     preserveDirectives: true,
     179                opts: {
     180                    clean: false,
     181                    processUrls: { atrule: true, decl: false },
    183182                    stringMap: [
    184183                        {
    185184                            name: 'import-rtl-stylesheet',
     185                            priority: 10,
     186                            exclusive: true,
    186187                            search: [ '.css' ],
    187188                            replace: [ '-rtl.css' ],
     
    193194                    ]
    194195                },
    195                 properties : [
     196                saveUnmodified: false,
     197                plugins: [
    196198                    {
    197199                        name: 'swap-dashicons-left-right-arrows',
    198                         expr: /content/im,
    199                         action: function( prop, value ) {
    200                             if ( value === '"\\f141"' ) { // dashicons-arrow-left
    201                                 value = '"\\f139"';
    202                             } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt
    203                                 value = '"\\f344"';
    204                             } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2
    205                                 value = '"\\f345"';
    206                             } else if ( value === '"\\f139"' ) { // dashicons-arrow-right
    207                                 value = '"\\f141"';
    208                             } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt
    209                                 value = '"\\f340"';
    210                             } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2
    211                                 value = '"\\f341"';
     200                        priority: 10,
     201                        directives: {
     202                            control: {},
     203                            value: []
     204                        },
     205                        processors: [
     206                            {
     207                                expr: /content/im,
     208                                action: function( prop, value ) {
     209                                    if ( value === '"\\f141"' ) { // dashicons-arrow-left
     210                                        value = '"\\f139"';
     211                                    } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt
     212                                        value = '"\\f344"';
     213                                    } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2
     214                                        value = '"\\f345"';
     215                                    } else if ( value === '"\\f139"' ) { // dashicons-arrow-right
     216                                        value = '"\\f141"';
     217                                    } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt
     218                                        value = '"\\f340"';
     219                                    } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2
     220                                        value = '"\\f341"';
     221                                    }
     222                                    return { prop: prop, value: value };
     223                                }
    212224                            }
    213                             return { prop: prop, value: value };
    214                         }
    215                     }
    216                 ],
    217                 saveUnmodified: false
     225                        ]
     226                    }
     227                ]
    218228            },
    219229            core: {
     
    394404        },
    395405        uglify: {
     406            options: {
     407                output: {
     408                    ascii_only: true,
     409                    ie8: true
     410                }
     411            },
    396412            core: {
    397413                expand: true,
     
    433449            jqueryui: {
    434450                options: {
    435                     preserveComments: 'some'
     451                    output: {
     452                        comments: /^!/
     453                    }
    436454                },
    437455                expand: true,
     
    535553                    interval: 2000
    536554                }
    537             },
    538             browserify: {
    539                 files: [
    540                     SOURCE_DIR + 'wp-includes/js/media/*.js',
    541                     '!' + SOURCE_DIR + 'wp-includes/js/media/*.manifest.js'
    542                 ],
    543                 tasks: ['uglify:media']
    544555            },
    545556            config: {
  • branches/4.2/package.json

    r49422 r50214  
    11{
    2   "name": "WordPress",
    3   "version": "4.2.29",
    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   "author": "The WordPress Contributors",
    10   "license": "GPLv2 or later",
    11   "devDependencies": {
    12     "grunt": "~0.4.5",
    13     "grunt-autoprefixer": "~2.2.0",
    14     "grunt-browserify": "^3.3.0",
    15     "grunt-contrib-clean": "~0.6.0",
    16     "grunt-contrib-compress": "~0.13.0",
    17     "grunt-contrib-concat": "~0.5.1",
    18     "grunt-contrib-copy": "~0.8.0",
    19     "grunt-contrib-cssmin": "~0.10.0",
    20     "grunt-contrib-imagemin": "~0.9.3",
    21     "grunt-contrib-jshint": "~0.11.0",
    22     "grunt-contrib-qunit": "~0.5.2",
    23     "grunt-contrib-uglify": "~0.8.0",
    24     "grunt-contrib-watch": "~0.6.1",
    25     "grunt-includes": "~0.4.5",
    26     "grunt-jsvalidate": "~0.2.2",
    27     "grunt-legacy-util": "^0.2.0",
    28     "grunt-patch-wordpress": "~0.3.0",
    29     "grunt-rtlcss": "~1.6.0",
    30     "grunt-sass": "~0.18.0",
    31     "matchdep": "~0.3.0"
    32   }
     2    "name": "WordPress",
     3    "version": "4.2.29",
     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": "GPLv2 or later",
     15    "devDependencies": {
     16        "grunt": "~1.3.0",
     17        "grunt-autoprefixer": "~3.0.0",
     18        "grunt-browserify": "~5.3.0",
     19        "grunt-contrib-clean": "~2.0.0",
     20        "grunt-contrib-compress": "~2.0.0",
     21        "grunt-contrib-concat": "1.0.1",
     22        "grunt-contrib-copy": "~1.0.0",
     23        "grunt-contrib-cssmin": "~3.0.0",
     24        "grunt-contrib-imagemin": "~4.0.0",
     25        "grunt-contrib-jshint": "3.0.0",
     26        "grunt-contrib-qunit": "^4.0.0",
     27        "grunt-contrib-uglify": "~5.0.0",
     28        "grunt-contrib-watch": "~1.1.0",
     29        "grunt-includes": "~1.1.0",
     30        "grunt-jsvalidate": "~0.2.2",
     31        "grunt-legacy-util": "^2.0.0",
     32        "grunt-patch-wordpress": "~3.0.0",
     33        "grunt-rtlcss": "~2.0.2",
     34        "grunt-sass": "~3.1.0",
     35        "matchdep": "~2.0.0",
     36        "sass": "^1.32.6"
     37    }
    3338}
  • branches/4.2/src/wp-admin/js/bookmarklet.min.js

    r31797 r50214  
    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=800>f||f>5e3?600:.7*f,g=800>g||g>3e3?700:.9*g,!s)return void a.open(d,r,"location,resizable,scrollbars,width="+f+",height="+g);(c.match(/\/\/(www|m)\.youtube\.com\/watch/)||c.match(/\/\/vimeo\.com\/(.+\/)?([\d]+)$/)||c.match(/\/\/(www\.)?dailymotion\.com\/video\/.+$/)||c.match(/\/\/soundcloud\.com\/.+$/)||c.match(/\/\/twitter\.com\/[^\/]+\/status\/[\d]+$/)||c.match(/\/\/vine\.co\/v\/[^\/]+/))&&e("_embeds[]",c),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(t,i,e,a){var n,o,l,m,r,s,c,h,d=t.encodeURIComponent,g=i.createElement("form"),u=i.getElementsByTagName("head")[0],b="_press_this_app",p=!0;if(a)if(e.match(/^https?:/))if(a+="&u="+d(e),e.match(/^https:/)&&a.match(/^http:/)&&(p=!1),t.getSelection?o=t.getSelection()+"":i.getSelection?o=i.getSelection()+"":i.selection&&(o=i.selection.createRange().text||""),a+="&buster="+(new Date).getTime(),p||(i.title&&(a+="&t="+d(i.title.substr(0,256))),o&&(a+="&s="+d(o.substr(0,512)))),n=(n=t.outerWidth||i.documentElement.clientWidth||600)<800||5e3<n?600:.7*n,d=(d=t.outerHeight||i.documentElement.clientHeight||700)<800||3e3<d?700:.9*d,p){(e.match(/\/\/(www|m)\.youtube\.com\/watch/)||e.match(/\/\/vimeo\.com\/(.+\/)?([\d]+)$/)||e.match(/\/\/(www\.)?dailymotion\.com\/video\/.+$/)||e.match(/\/\/soundcloud\.com\/.+$/)||e.match(/\/\/twitter\.com\/[^\/]+\/status\/[\d]+$/)||e.match(/\/\/vine\.co\/v\/[^\/]+/))&&T("_embeds[]",e),l=u.getElementsByTagName("meta")||[];for(var y=0;y<l.length&&!(200<y);y++){var f=l[y],w=f.getAttribute("name"),v=f.getAttribute("property"),f=f.getAttribute("content");f&&(w?T("_meta["+w+"]",f):v&&T("_meta["+v+"]",f))}m=u.getElementsByTagName("link")||[];for(var E=0;E<m.length&&!(50<=E);E++){var _=m[E],A=_.getAttribute("rel");"canonical"!==A&&"icon"!==A&&"shortlink"!==A||T("_links["+A+"]",_.getAttribute("href"))}i.body.getElementsByClassName&&(r=i.body.getElementsByClassName("hfeed")[0]),s=(r=i.getElementById("content")||r||i.body).getElementsByTagName("img")||[];for(var B=0;B<s.length&&!(100<=B);B++)-1<(h=s[B]).src.indexOf("avatar")||-1<h.className.indexOf("avatar")||h.width&&h.width<256||h.height&&h.height<128||T("_images[]",h.src);c=i.body.getElementsByTagName("iframe")||[];for(var N=0;N<c.length&&!(50<=N);N++)T("_embeds[]",c[N].src);i.title&&T("t",i.title),o&&T("s",o),g.setAttribute("method","POST"),g.setAttribute("action",a),g.setAttribute("target",b),g.setAttribute("style","display: none;"),t.open("about:blank",b,"location,resizable,scrollbars,width="+n+",height="+d),i.body.appendChild(g),g.submit()}else t.open(a,b,"location,resizable,scrollbars,width="+n+",height="+d);else top.location.href=a;function T(t,e){var a;void 0!==e&&((a=i.createElement("input")).name=t,a.value=e,a.type="hidden",g.appendChild(a))}})(window,document,top.location.href,window.pt_url);
Note: See TracChangeset for help on using the changeset viewer.