Visitar URL original
Support `devEngines` in package.json · Issue #150 · pnpm/action-setup · GitHub
Skip to content

Support devEngines in package.json #150

Closed

Description

@Jiralite

I noticed this action has no support for devEngines. See the documentation for devEngines.

packageManager support should not be dropped, but it should be deprioritised. See nodejs/corepack#567 for additional context.

Activity

  1. sdavids commented on Mar 7, 2026

    @sdavids

    Similar issue in actions/setup-node has been fixed: actions/setup-node#1255

  2. Mister-Hope commented on May 8, 2026

    @Mister-Hope

    Meeting this issue now.

    We are trying to migrate to the following:

      "devEngines": {
        "packageManager": {
          "name": "pnpm",
          "version": "11.0.8",
          "onFail": "error"
        },
        "runtime": {
          "name": "node",
          "version": "24.15.0",
          "onFail": "error"
        }
      }
    

    While the action does not care devEngines.packageManager.version at all.

  3. Mister-Hope commented on May 8, 2026

    @Mister-Hope

    @zkochan We'd better support it.

    https://pnpm.io/package_json#devenginespackagemanager

    I found the docs already mentioning the field during translation.

    It's pretty werid that the official action does not support this while pnpm v11 already changed it's default behavior and perfers devEngines.packageManager. So it now seems like a bug rather than a feature request.

  4. Mister-Hope commented on May 8, 2026

    @Mister-Hope

    Related: #225 #227

  5. MindTooth commented on May 8, 2026

    @MindTooth

    I fixed it by changing onFail: download:

      "devEngines": {
        "runtime": {
          "name": "node",
          "version": "26.1.0",
          "onFail": "warn"
        },
        "packageManager": {
          "name": "pnpm",
          "version": "11.0.8",
          "onFail": "download"
        }
      }

    https://pnpm.io/package_json#devenginespackagemanager

  6. nemchik commented on May 8, 2026

    @nemchik
    Contributor

    Does pnpm 10 know how to handle that? If not then everyone will have to manually update to pnpm 11, and then hopefully everything will stay consistent going forward.

  7. Mister-Hope commented on May 8, 2026

    @Mister-Hope

    The problem is that pnpm action is expected to prepare a supported version of pnpm. User should not be forced to set download to let node prepare it.

    If node has to prepare it, then it means that the action is not doing a correct job.

    However, onFail:download could be a workaround

  8. Mister-Hope commented on May 8, 2026

    @Mister-Hope

    Does pnpm 10 know how to handle that? If not then everyone will have to manually update to pnpm 11, and then hopefully everything will stay consistent going forward.

    Supporting devEngines in the action shall have no conflicts with keeping other behaviors.

    When you run on node24 and request pnpm v10 using devEngines, the behaviors shall be similar. When you use npm, you will get msg like this project is configured to use pnpm

  9. nemchik commented on May 8, 2026

    @nemchik
    Contributor

    Does pnpm 10 know how to handle that? If not then everyone will have to manually update to pnpm 11, and then hopefully everything will stay consistent going forward.

    Supporting devEngines in the action shall have no conflicts with keeping other behaviors.

    When you run on node24 and request pnpm v10 using devEngines, the behaviors shall be similar. When you use npm, you will get msg like this project is configured to use pnpm

    I agree with your edit (in the action). An issue I am seeing is having packageManager and devEngines.packageManager is throwing errors and exiting non-zero with pnpm 11, so we can't have both, and devEngines.packageManager isn't recognized by pnpm 10, so there's no path to ensure upgrades transition smoothly, it's a hard cut. That being said, this package lacking support for devEngines.packageManager means we pretty much need to stick with packageManager even when using pnpm 11, which documents packageManager as legacy.

  10. stehefan commented on Jul 8, 2026

    @stehefan

    Not sure who needs to hear this, but the latest version of the action supports this out of the box.

  11. Jiralite commented on Jul 8, 2026

    @Jiralite
    Author

    Resolved with #211. Too bad Claude did not catch it! (I hope maintainers are reading issues...)

  12. nemchik commented on Jul 8, 2026

    @nemchik
    Contributor

    Just opened #273 so that the docs indicate support. Should help future users and prevent duplicate issues being opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions