scalajs-bundler
scalajs-bundler copied to clipboard
Package manager abstraction
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:
- [x] Implement
pnpm
. - [x] Fix scripted tests.
@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?
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.
@julienrf @sjrd Could you review this?
I will try to find some time for it this week.
@sjrd Thank you for a very thorough review! I will make the changes as requested.
@sjrd I think I made all of the modifications you requested, PR is ready for a review. I also updated docs.
@ptrdom Thanks for this PR, would love to use pnpm with Scala.js. :)
Anything missing for this PR to be merged?
@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.
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:
- Fork
scalajs-bundler
and publish a community fork. - Move on to Vite in officially promoted way:
- https://www.scala-js.org/doc/tutorial/scalajs-vite.html
- Move on to one of the plugins I worked on:
- https://github.com/ptrdom/scalajs-vite for Vite, feature complete, but I am not working on it any further since I personally think that esbuild is a better bundler for Scala.js.
- https://github.com/ptrdom/scalajs-esbuild for esbuild, feature complete for web, still working on Electron plugin, and lacks docs, so I would still call it WIP.