Principle:8beeeaaat Touchdesigner mcp Reproducible Install Lockfile
| Knowledge Sources | |
|---|---|
| Domains | Dependency_Management, Reproducibility |
| Last Updated | 2026-10-28 00:00 GMT |
Overview
A discipline of committing a lockfile that pins the entire resolved dependency tree with integrity hashes so that every install — local, CI, or production — produces an identical `node_modules`.
Description
When a project's dependency graph includes transitive packages that float by version range, two installs can resolve to different trees, causing "works on my machine" failures. The reproducible install lockfile principle commits a lockfile (npm `package-lock.json` v3) that records the exact version and integrity hash of every package in the transitive closure. CI uses `npm ci` (which reads only the lockfile and fails if it is out of sync with `package.json`) rather than `npm install` (which may mutate the lockfile). This guarantees that a release built in CI has the same dependency versions the developer tested locally.
Usage
Use this principle for any npm package that ships to users or runs in CI, where a transitive dependency change must never silently alter behavior between environments.
Theoretical Basis
# Abstract procedure (NOT real implementation)
# 1. Commit package-lock.json alongside package.json
git add package.json package-lock.json
# 2. In CI, install strictly from lockfile
npm ci # fails if lockfile is out of sync
# 3. To update a dependency, bump package.json then regenerate
npm install <pkg>@<version>
git add package.json package-lock.json
Key properties:
- Integrity hashes: every package entry carries a SHA-512 hash.
- `npm ci` enforcement: CI refuses to mutate the lockfile.
- Lockfile version pinned: v3 format for npm 7+.