plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
475 stars 643 forks source link

Switch to pnpm #2778

Closed sneridagh closed 3 months ago

tiberiuichim commented 3 years ago

Work for this exists here: https://github.com/plone/volto/pull/2557/

I don't know anymore the problem that those additional exports in the package.json solve. It will be interesting to see, as far as I remember Volto worked, together with project. I don't recall the status of the testing infrastructure.

pnicolli commented 3 years ago

I would be interested in understanding more about pnpm, like what are its additional features, which problems it solves for us and what are the downsides of using a new tool like this. Of course I will do some reading of my own asap as well, this comment is just to suggest some starting discussion points.

tiberiuichim commented 3 years ago

@pnicolli Here's some interesting pages: https://rushjs.io/pages/advanced/phantom_deps/ and https://rushjs.io/pages/advanced/npm_doppelgangers/

Basically when you switch to pnpm the first thing it forces you to do is to cleanup all those dependency problems, which I did in that PR. Second, it enables properly linking a Volto development checkout into a Volto project, so that you can work on things that affect only addons (right now we use yalc for that, and it's a 3 step process, including a restart, with pnpm it work seamlessly, even hot reloading). And last, my hope is that we can cleanup our testing story for addons: right now we need to run unit tests for addons from a docker container because of jest + yarn limitations.

davisagli commented 3 months ago

This is basically done: