Conversation
Greptile SummaryThis PR adds ESM pnpmfile support by preferring Confidence Score: 5/5Safe to merge — no logical, security, or behavioural regressions identified. All changed code paths are well-tested (three new unit tests + three new bats integration tests), the JS export-resolution logic handles every realistic ESM export shape correctly, and the docs/help text are updated consistently. No P0 or P1 findings. No files require special attention. Important Files Changed
Reviews (4): Last reviewed commit: "fix(pnpmfile): avoid esm readPackage sta..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ed973b7. Configure here.

Summary
.pnpmfile.mjsover.pnpmfile.cjsduring default pnpmfile discoveryrequire()support.mjsafterAllResolved/readPackage hooksValidation
cargo test -p aube pnpmfile::testscargo build -p aubemise run test:bats test/pnpmfile.batsmise run docs:buildcargo fmt --checkgit diff --checkNote
Medium Risk
Changes how pnpmfile hooks are discovered and executed (including dynamic ESM loading), which can affect dependency resolution behavior during installs if projects rely on existing hook semantics.
Overview
Adds support for ESM pnpmfiles by discovering and preferring
.pnpmfile.mjsover.pnpmfile.cjs, while still honoringpnpmfilePathoverrides.Updates the Node hook shims to dynamically load
.mjsviaimport()(and.cjsviarequire()), including a fallback when an ESM default export lackshooks. Documentation/CLI help text and bats/unit tests are updated to reflect the new lookup order and to cover.mjsfor bothafterAllResolvedandreadPackage.Reviewed by Cursor Bugbot for commit 38f6eb1. Bugbot is set up for automated code reviews on this repo. Configure here.