What's the purpose of the additional .package-lock.json inside node_modules? It seems to be a subset of package-lock.json.
I assume this has been asked before, but i couldn't find anything in the npm docs, and google still refuses to properly search for punctuation symbols, so here we are.
PS: It's recreated by npm i, when i delete it. However i cannot find it on older projects of mine, so it appears to be a newer thing.
The additional node_modules/.package-lock.json is a helper file, which speeds up npm under normal circumstances. When npm finds, that node_modules hasn't changed (checked by e.g. looking at the modified-time of package folders), it can be used instead of processing the folder repeatedly.
As RobC mentions in his comment:
A comprehensive description for
node_modules/.package-lock.jsoncan be found in the Hidden Lockfiles section of the "yet to be published docs" in the GitHub repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With