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

Allow custom Package Managers for better performance (yarn) #14367

Closed
1 task done
stormojm opened this issue Jan 13, 2023 · 2 comments
Closed
1 task done

Allow custom Package Managers for better performance (yarn) #14367

stormojm opened this issue Jan 13, 2023 · 2 comments

Comments

@stormojm
Copy link

Description

I would like to be able to either add my own package manager or modify an existing package manager. This would allow users to customize the run command to use alternate methods of running. There could be some other use cases for customizing install or the other commands.

Motivation

I have been in progress of migrating a large monorepo from lerna 4 to nx. Our monorepo has around 50 packages that we build using typescript, which we are using the run-script executor to build. After switching to nx, I have noticed a noticeable slowdown. One of the performance issues is that default run-script executor uses the package manager to determine how to run the script. In our case we use yarn and thus yarn ${script} is used. However yarn is slower by ~1s compared to npx/npm yarnpkg/berry#2575. Our previous lerna implementation would always use npm instead of yarn when running commands. This is translating to a ~40s slowdown in our case when running our build (if nothing is cached).

Suggested Implementation

There would likely need to be a configuration in the nx.json to point to a package manager file. This would be akin to an executor.

Alternate Implementations

We could make an easier implementation for the specific use case using NX environment variables.

@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

Copy link

github-actions bot commented Nov 6, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants