Skip to content

Stanzilla/pnpm-optimistic-patch-lockfile-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pnpm optimistic repeat install lockfile conflict repro

This repository reproduces a pnpm 11.1.1 issue where pnpm install exits with Already up to date and leaves pnpm-lock.yaml conflicted.

The issue appears when:

  • optimistic-repeat-install=true
  • node_modules already matches the current branch
  • a merge introduces a pnpm-lock.yaml conflict
  • the other branch only changes a patch file and the lockfile entries generated from that patch

Reproduction

git clone https://github.com/Stanzilla/pnpm-optimistic-patch-lockfile-repro.git
cd pnpm-optimistic-patch-lockfile-repro
pnpm install
git merge origin/update-patch
pnpm install
grep -n '<<<<<<<' pnpm-lock.yaml

Expected: pnpm install detects and resolves the lockfile conflict, updating the lockfile to include both the is-odd dependency from main and the updated is-number patch hash from update-patch.

Actual with pnpm 11.1.1: pnpm install prints Already up to date, exits successfully, and leaves conflict markers in pnpm-lock.yaml.

As a control, removing node_modules before the final install makes pnpm resolve the conflict:

rm -rf node_modules
pnpm install
grep -n '<<<<<<<' pnpm-lock.yaml || echo 'conflict resolved'

About

Minimal pnpm optimistic-repeat-install lockfile conflict reproduction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors