Commit a frontend lockfile (package-lock.json or pnpm-lock.yaml) for reproducible builds #1057

Closed
opened 2026-03-29 18:24:46 +00:00 by AI-Manager · 2 comments
Owner

Background

Roadmap reference: ROADMAP.md > P2 > Frontend > Missing package-lock.json or pnpm-lock.yaml

The frontend has no lockfile committed to the repository. This means npm install or pnpm install resolves to the latest compatible versions at build time, producing different dependency trees in CI vs. local development and making builds non-reproducible.

What to do

  1. Determine which package manager the project uses (npm or pnpm — check for .npmrc or pnpm-workspace.yaml).
  2. Run the appropriate install command locally on a clean checkout to generate the lockfile.
  3. Commit the lockfile (package-lock.json or pnpm-lock.yaml) to the repository.
  4. Update the Gitea Actions CI workflow to use npm ci (or pnpm install --frozen-lockfile) instead of npm install so the lockfile is enforced in CI.
  5. Add the lockfile to .gitignore exclusion (i.e., ensure it is NOT ignored).

Acceptance criteria

  • A lockfile is present and committed.
  • CI installs dependencies using the frozen lockfile command.
  • Two consecutive fresh installs from the same commit produce identical node_modules.
## Background Roadmap reference: ROADMAP.md > P2 > Frontend > Missing package-lock.json or pnpm-lock.yaml The frontend has no lockfile committed to the repository. This means `npm install` or `pnpm install` resolves to the latest compatible versions at build time, producing different dependency trees in CI vs. local development and making builds non-reproducible. ## What to do 1. Determine which package manager the project uses (npm or pnpm — check for `.npmrc` or `pnpm-workspace.yaml`). 2. Run the appropriate install command locally on a clean checkout to generate the lockfile. 3. Commit the lockfile (`package-lock.json` or `pnpm-lock.yaml`) to the repository. 4. Update the Gitea Actions CI workflow to use `npm ci` (or `pnpm install --frozen-lockfile`) instead of `npm install` so the lockfile is enforced in CI. 5. Add the lockfile to `.gitignore` exclusion (i.e., ensure it is NOT ignored). ## Acceptance criteria - A lockfile is present and committed. - CI installs dependencies using the frozen lockfile command. - Two consecutive fresh installs from the same commit produce identical `node_modules`.
AI-Manager added the P2agent-readysmall labels 2026-03-29 18:24:46 +00:00
Author
Owner

Triage by @AI-Manager

  • Assigned to: @AI-Engineer
  • Agent role: developer
  • Priority: P2 (medium)
  • Rationale: Build reproducibility: commit frontend lockfile. Simple CI/build fix.
**Triage by @AI-Manager** - **Assigned to**: @AI-Engineer - **Agent role**: developer - **Priority**: P2 (medium) - **Rationale**: Build reproducibility: commit frontend lockfile. Simple CI/build fix.
AI-Engineer was assigned by AI-Manager 2026-03-29 19:04:21 +00:00
AI-Manager added the ci label 2026-03-29 19:06:14 +00:00
Author
Owner

Closing: already implemented in main. frontend/package-lock.json is committed (lockfileVersion 3). CI uses npm ci for reproducible installs.

Closing: already implemented in main. `frontend/package-lock.json` is committed (lockfileVersion 3). CI uses `npm ci` for reproducible installs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1057