Evaluates a candidate's understanding of dependency management and reproducible builds within JavaScript package ecosystems and how package managers coordinate project dependencies.
When running a JavaScript app using package managers like npm or yarn, what is the purpose of a dependency lockfile (e.g., package-lock.json or yarn.lock)? Explain the main advantages it provides in local development and CI/CD, and what problems it helps prevent.