What Is package.json?
package.json explained, including what it does and how it matters in CI/CD.
package.json is the manifest file at the root of a Node.js project.
What it is
It declares the project name, version, scripts, and dependencies (dependencies and devDependencies). The scripts block defines commands like build and test that tooling and CI invoke via npm run.
Why it matters in CI/CD
CI reads package.json to know what to install and which scripts to run. The engines field can pin the Node version, and packageManager (with Corepack) pins npm/yarn/pnpm for reproducible builds.
Key takeaways
- package.json is the Node project manifest.
- It defines scripts and dependencies.
- CI runs its scripts and reads engines/packageManager.