Motivation ("The Why")
It's very bad for different users prefer different registries globally, I accidentally commit unexpected changes several times.
Example
FYI, yarn 2+ and pnpm don't store registry info in their lockfile.
How
Current Behaviour
Read it from .npmrc instead.
Desired Behaviour
As title, registry should not be stored into package-lock.json, it would also make package-lock.json much smaller.
References