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
The current implementation uses engines.pm in order to define the package manager, but it's perhaps not the best location to store this information. The engines field intends to specify which versions of the package manager are capable of properly installing the package, not the project (the distinction matters: the project is whatever you clone, whereas the package is whatever people consume when running yarn add my-package).
In particular, engines are typically checked even on transitive dependencies whereas we would want the pmm definition to only be considered for the top-level manifest, and ignored for all others. It also avoids potential issues with older package managers that would print a warning with projects that would list an "unknown engine field".
Of note: package managers have their own fields in the engines field (respectively engines.npm, engines.yarn, engines.pnpm). Those would be completely ignore by pmm, which would only care about the top-level field. So, for instance, if you wish to indicate that your package needs to be installed by Yarn 1.20+ or npm 6+ and that its project needs to be developed using Yarn 1.22.4, you'd write:
Note however that I personally wouldn't recommend using engines.yarn (or any of the others) - a package should be compatible with every reasonable package manager.
The text was updated successfully, but these errors were encountered:
The current implementation uses
engines.pm
in order to define the package manager, but it's perhaps not the best location to store this information. Theengines
field intends to specify which versions of the package manager are capable of properly installing the package, not the project (the distinction matters: the project is whatever you clone, whereas the package is whatever people consume when runningyarn add my-package
).In particular, engines are typically checked even on transitive dependencies whereas we would want the pmm definition to only be considered for the top-level manifest, and ignored for all others. It also avoids potential issues with older package managers that would print a warning with projects that would list an "unknown engine field".
Of note: package managers have their own fields in the
engines
field (respectivelyengines.npm
,engines.yarn
,engines.pnpm
). Those would be completely ignore by pmm, which would only care about the top-level field. So, for instance, if you wish to indicate that your package needs to be installed by Yarn 1.20+ or npm 6+ and that its project needs to be developed using Yarn 1.22.4, you'd write:Note however that I personally wouldn't recommend using
engines.yarn
(or any of the others) - a package should be compatible with every reasonable package manager.The text was updated successfully, but these errors were encountered: