WordPress.org

Make WordPress Core

Changeset 47497


Ignore:
Timestamp:
03/24/2020 01:04:43 AM (10 months ago)
Author:
azaozz
Message:

Build/Test Tools: Introduce Install-changed. It keeps a hash of package.json and compares it when run. If it has any changes, it runs npm install.

This keeps node_modules always updated and is useful not only when the packages have been updated, but also when the working copy has been "reverted" to an earlier revision.

Fixes #49594.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1515vendor
        1616docker-compose.override.yml
         17packagehash.txt
  • trunk/.gitignore

    r47352 r47497  
    2929/src/wp-includes/css/*.min.css
    3030/src/wp-includes/css/*-rtl.css
     31/packagehash.txt
    3132
    3233# Files and folders that get created in wp-content
  • trunk/Gruntfile.js

    r47471 r47497  
    33/* globals Set */
    44var webpackConfig = require( './webpack.config' );
     5var installChanged = require( 'install-changed' );
    56
    67module.exports = function(grunt) {
     
    4142        );
    4243    }
     44
     45    // First do `npm install` if package.json has changed.
     46    installChanged.watchPackage();
    4347
    4448    // Load tasks.
  • trunk/package-lock.json

    r47495 r47497  
    1178511785            }
    1178611786        },
     11787        "install-changed": {
     11788            "version": "1.1.0",
     11789            "resolved": "https://registry.npmjs.org/install-changed/-/install-changed-1.1.0.tgz",
     11790            "integrity": "sha512-APUWMdQnwGcyv9bmuvgxCcrR6qtD996+hofEEAPGSjsvGIZuBpBF0yrYAKOl9tmhm2AzxJC4EXUbxZ/SId4NIA==",
     11791            "dev": true
     11792        },
    1178711793        "internal-ip": {
    1178811794            "version": "4.3.0",
  • trunk/package.json

    r47495 r47497  
    6060        "grunt-webpack": "^3.1.3",
    6161        "ink-docstrap": "1.3.2",
     62        "install-changed": "1.1.0",
    6263        "jquery-migrate": "1.4.1",
    6364        "matchdep": "~2.0.0",
Note: See TracChangeset for help on using the changeset viewer.