Files
pnpm/cli/cli-utils/src
Zoltan Kochan de561a55fa fix: prefer .pnpmfile.mjs by default (#10683)
* fix: prefer .pnpmfile.mjs by default

* fix: handle ERR_MODULE_NOT_FOUND for missing optional .pnpmfile.mjs

Node's dynamic import() throws ERR_MODULE_NOT_FOUND (not MODULE_NOT_FOUND
like require()) when a file doesn't exist. This caused a hard error when
tryLoadDefaultPnpmfile was enabled and .pnpmfile.mjs was absent.

* fix: load only .pnpmfile.mjs when it exists, not both .mjs and .cjs

When both .pnpmfile.mjs and .pnpmfile.cjs exist, only the .mjs file
is now loaded. Previously both were loaded and their hooks combined.
Also adds .mjs support for config dependency plugins.
2026-03-01 17:00:33 +01:00
..