From b6c6eb4dfa4596947493e3fd692ee01b31075fb7 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 10 Jul 2017 15:07:09 -0400 Subject: [PATCH] chore(appveyor): make node_modules cache depend on npm-shrinkwrap.json (#1580) We've been hitting some weird npm-shrinkwrap.json issues in our shrinkwrap staged sanity checks, where Appveyor would complain that the shrinkwrap is not up to date, while that wasn't the case either locally or in Travis CI. The issue is related to caching. If a commit changes a `from` entry of a npm-shrinkwrap.json dependency, but the CI servers kept the cached node_modules, then there will be a discrepancy between the `_from` field from the `package.json` of a dependency in `node_modules` and what the npm-shrinkwrap.json says. npm will obey `node_modules` over `npm-shrinkwrap`, causing the invalid diff. The fix is to make the Appveyor node_modules cached directory dependent on any change to the npm-shrinkwrap.json file. Change-Type: patch See: https://github.com/resin-io/etcher/pull/1547 Signed-off-by: Juan Cruz Viotti --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7ca29097..0731aa99 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ image: Visual Studio 2015 cache: - C:\Users\appveyor\.node-gyp - '%AppData%\npm-cache' - - node_modules + - node_modules -> npm-shrinkwrap.json - C:\ProgramData\chocolatey\bin -> appveyor.yml - C:\ProgramData\chocolatey\lib -> appveyor.yml - C:\Users\appveyor\AppData\Local\Temp\chocolatey -> appveyor.yml