Skip to content

Feature request: corepack exec #148

@v1nc3n4

Description

@v1nc3n4

Hi,

This feature request is not exactly the same than the one mentioned in #57. As introduced in the docs here, command corepack <binary name>[@<version>] [... args] allows to execute a package manager of our choice with custom arguments. This command checks whether the local project is configured for the given package manager.

I personnally would be interested with a command such as corepack exec [... args] (exec may not be the most relevant term however), that would take the exact release set in the packageManager property. I guess it is possible because in the command above, I assume corepack parses property packageManager in the package.json file to verify consistency with <binary name>.
Thus, I could run a command of the package manager whatever it is, and without repeating the binary name. This may be useful in writing plugins/extensions for build tools such as Maven, Gradle, acting as a bridge to launch npm/pnpm/yarn commands, without having to parse the package.json file and discover the package manager.

Thanks in advance for your comments.
BR

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