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

feat(core): support for 3rd party package managers #18895

Closed

Conversation

Jordan-Hall
Copy link
Contributor

Current Behavior

Currently you are limited to only the packages provided by NX repo and it does not allow for extending without NX support.

Major change is installPackagesTask now returns a promise instead of a void.

Expected Behavior

You can now create a plugin that manages package. Such as deno, bun and china package managers

Related Issue(s)

Fixes #15622

@Jordan-Hall Jordan-Hall requested review from a team as code owners August 29, 2023 20:32
@Jordan-Hall Jordan-Hall requested a review from vsavkin August 29, 2023 20:32
@vercel
Copy link

vercel bot commented Aug 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2023 9:00pm

@michaelangeloio
Copy link

+1 on this

@ffMathy
Copy link

ffMathy commented Jan 16, 2024

I can't believe no one has looked at this yet 😒

@Jordan-Hall do you think it'll help them merge it if you solved the conflicts?

I hope we'll even hear from the team.

@Jordan-Hall
Copy link
Contributor Author

@ffMathy there was some discussion on the community slack/discord about this. @AgentEnder has some ideas but it's not high on priority for the team. Don't think it was just ignore the team really does engaged with community

@ffMathy
Copy link

ffMathy commented Jan 16, 2024

Could those ideas be shared so we can contribute, and they only have to press the merge button? 😅

@Jordan-Hall
Copy link
Contributor Author

Craigory:

Yeah, its not something that we've thoroughly discussed. Its not something that super makes sense given that there's not a ton of PM's out and about, and very very few with even 1% of the market share
Additionally, things that are set on this incorrectly could very easily cause errors on commands like nx migrate or when running generators that install packages, which would then get reported as issues and so on
Further, there's a lot to do with package managers in regards to how we parse lock files to add nodes and deps to the graph... so if these new package managers add a new lockfile type then that needs to be handled as well

Miro:

We plan to move the entire package manager (including lock file logic) to @nx/js package and have it entirely optional, so that would open the door to any new package managers.

But as craigory mentioned, the new package manager's logic would have to include several tricky implementations - namely lock file parsing and pruning. Also, given the reach these package managers now have making changes to Nx core to support this would have low priority.

It's an interesting requirement, though. The PR is going in the right direction, but there's way more ground that needs to be covered to support something like this.

I would consider helping with move to js package. That's a good idea tbh. But that requires alot of planning and architecture design which team likely not decided

@ffMathy
Copy link

ffMathy commented Jan 17, 2024

But, for now, given that Bun's implementation is identical to Yarn, couldn't we just make an easy fix temporarily while we wait for the rest?

I get the impression that Bun's package manager won't be less than 1% market share for very long.

@jaysoo
Copy link
Member

jaysoo commented Jun 4, 2024

Closing this PR as it requires additional design discussion. Added this new discussion to keep track of the conversation.

@jaysoo jaysoo closed this Jun 4, 2024
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

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

Successfully merging this pull request may close these issues.

Allow any 3rd party package manager
4 participants