Skip to content

Global packages #1

Closed
Closed

Description

@arcanis

This thread aims to discuss the "global packages" scenario. For example, the pmm version of pnpx --version is currently forbidden if run within a Yarn project, even though it's supposed to run within a standalone context that might not be related.

Activity

  1. arcanis commented on Aug 11, 2020

    @arcanis
    ContributorAuthor

    My opinion about this is that the current behaviour isn't a problem. Justifications:

    • Under the current model, npm is unmodified, so users would be able to use npm install -g or npx regardless of the package manager for the current project. This reason alone makes this problem non-blocking, although it's an interesting discussion nonetheless.

    • Using pnpx on a Yarn project (or even npx, even if not applicable because of the first point) may be dangerous. For example, we are looking to make yarn dlx (the Yarn equivalent) persist some parts of the local configuration (for example custom registries). Using a different package manager for the "x" command would lead to installs being made based on the incorrect configuration, so packages would be installed from the wrong registry.

    • The initial point that "projects decide which package managers they are meant to be used with" doesn't apply here, because global commands aren't cloning them - they are installing them, as any other command. For this reason, requiring to use yarn dlx on Yarn projects (rather than allowing pnpx) won't have negative effects.

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