You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompt pack install can select a transitive dependency instead of the requested package #6093
The pack installer chooses the newest node_modules directory by mtime. A newer dependency can be mistaken for the requested package, causing a false missing-pack error or silently installing a different pack from that dependency.
Reproduction
At master 541cf26, install a real local npm tarball whose dependency gives its directory a later mtime in postinstall. With no bili-pack.json the dependency causes rejection; with a decoy bili-pack.json the wrong pack is installed. Actual npm installs reproduce both: 6 passed / 2 failed on the base.
Expected
Have npm record the direct dependency in the isolated temporary manifest and resolve that single dependency. Remove timestamp-based package identity guessing. Existing validation and atomic destination writes remain intact.
Prior work
Screened all 3,221 cached upstream PRs. #5342 introduced this installer and its directory-mtime heuristic. No historical fix addresses requested-package versus dependency selection. Previous Afloat16 PRs #6046–#6055 are excluded.
Activity
ranxianglei commentedon Nov 12, 2026
Fixed in batch PR #6439 (merged).