Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with lockdown.js npm preinstall hook.
lockdown.js uses some magic so that it gets run automatically whenever somebody runs `npm install`. This is done by registering a preinstall hook with npm. lockdown.js expects this hook to be called before `npm install` installs the packages and in fact before npm has even fetched any information about the packages from the registry. This used to be the case in older versions of npm but the behavior of npm has changed and now the preinstall hook is run later. This is too late for lockdown.js to intercept the fetches from the registry which leaves things in a broken state. Fixing this seems difficult but luckily for our use case we don't need to run `npm install` interactively and don't care whether that works or or not. Instead we can just call lockdown directly instead of calling `npm install`. This allows things to work as expected. See npm/cli#2660 but note that the exact behavior has changed several times between versions.
- Loading branch information