From 0afad278ebf89c44369bf495ae8105280722e6ea Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 12 Sep 2019 11:08:07 +0200 Subject: [PATCH] Fix updating of node_modules/ `npm install` does not update/touch an already existing package-lock.json. Thus after make touch package.json make a subsequent `make` would still run `npm install`. To fix this, remove package-lock.json before `npm install`, so that (1) package-lock.json always gets touched and thus the make rule actually works, and (2) during development we always get up to date packages (we only really want the "locking" behaviour for building from release tarballs). Also run `npm prune` so that switching between git trees with added/removed modules works correctly. Closes #223 --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index dbc77c0..08059db 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,9 @@ test/common: git reset test/common $(NODE_MODULES_TEST): package.json + # if it exists already, npm install won't update it; force that so that we always get up-to-date packages + rm -f package-lock.json npm install + npm prune .PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po