buffer: fix deprecation warning emit
Due to npm using workers on Windows which inititate processes for code within node_modules, the current way of testing is a little too strict to catch all occurrences.
I understand that the previous implementation was there for a reason but as far as I can tell it's also likely to get a lot of other false positives than just the npm install
issue — such as running code in node_modules/.bin/
.
Fixes: https://github.com/nodejs/node/issues/20160 Refs: https://github.com/npm/npm/blob/8452a9d9b231bc6c95745bb49a4b838ce11d3b9c/lib/install/action/extract.js#L22-L34
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines