scalacenter / scalajs-bundler

https://scalacenter.github.io/scalajs-bundler
Other
235 stars 101 forks source link

Package manager abstraction #420

Open ptrdom opened 2 years ago

ptrdom commented 2 years ago

References https://github.com/scalacenter/scalajs-bundler/issues/417.

Main idea is to make a package manager abstraction that allows a flexible interaction with plugin's internals so that user's can extend the behavior however they wish.

TODO:

ptrdom commented 2 years ago

@julienrf @sjrd comments would be appreciated. Could I get some permissions to run CI at will, scripted tests are kind of clunky on my local machine. I could fix up tests that were broken prior to this PR too, but I will need to edit actual CI scripts because I have a feeling it needs some tinkering with Node/npm versions. I do not see where those AppVeyor scripts are located, but do we even need them with GitHub Actions being already in place?

ptrdom commented 2 years ago

Also, this very much breaks the backwards compatibility, but I assume that it is fine since the plugin is not v1 yet 😅 Let me know if that is not alright, there is definitely a way to stay backwards compatible, although the old design should be deprecated eventually - things like having both npm and yarn settings available simultaneously are obviously clunky.

ptrdom commented 2 years ago

@julienrf @sjrd Could you review this?

sjrd commented 2 years ago

I will try to find some time for it this week.

ptrdom commented 2 years ago

@sjrd Thank you for a very thorough review! I will make the changes as requested.

ptrdom commented 2 years ago

@sjrd I think I made all of the modifications you requested, PR is ready for a review. I also updated docs.

mims-github commented 1 year ago

@ptrdom Thanks for this PR, would love to use pnpm with Scala.js. :)

Anything missing for this PR to be merged?

nadenf commented 1 year ago

@sjrd .. Can we request a review of this. I would be happy to add bun support as well on top of this.

Either way the JS community has much faster options than NPM right now which we should take advantage of.

ptrdom commented 1 year ago

I think this PR was ignored for long enough to assume that maintainers are not accepting any PRs to actually develop features, which is fine, but it would have been considerate towards community to explicitly state that.

My suggestions for plugin users who want a package manager abstraction: