Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard code the package manager into the CLI #278

Open
jessestorbeck opened this issue Feb 8, 2024 · 0 comments
Open

Hard code the package manager into the CLI #278

jessestorbeck opened this issue Feb 8, 2024 · 0 comments

Comments

@jessestorbeck
Copy link
Contributor

The CLI currently contains a file (https://github.com/pushkin-consortium/pushkin/blob/main/packages/pushkin-cli/src/pMan.js) intended to detect whether the user has installed yarn and, if not, substitute npm. The name of the package manager then gets imported anywhere in the CLI needs to execute a command through the package manager like:

exec(${pacMan} install);

The issue with this approach is that yarn and npm aren't 100% substitutable, so some commands would fail without manual adjustment, e.g. ${pacMan} --mutex network install. The pacMan thing is apparently historical from before Pushkin had committed to yarn. At this point, it could be removed for the sake of readability with the package manager hard-coded into the exec commands.

This is related to the much bigger issue of when Pushkin might want to upgrade from Yarn 1, since we have had some recent issues with it (#272). To @jkhartshorne's recollection, the original reason for committing to yarn over npm was the ability to use yalc, but it seems now that yalc is compatible with both npm and yarn (https://www.npmjs.com/package/yalc). It may not make sense to get rid of the pacMan thing until after it's decided which package manager we'd like to upgrade to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant