Bug 36682

Summary: Replace yarn with pnpm
Product: Koha Reporter: Paul Derscheid <me>
Component: Architecture, internals, and plumbingAssignee: Paul Derscheid <paul.derscheid>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, jonathan.druart, me, paul.derscheid, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Paul Derscheid 2024-04-24 14:22:58 UTC
The idea is to deprecate yarn in favor of pnpm as it offers
- better disk space efficiency
- speed (compared to yarn)
- deterministic installs
- stricter dependency isolation
Comment 1 David Cook 2024-08-30 00:49:57 UTC
Sounds interesting.

It looks like we use the Debian packaged "yarn" atm, but there is no package for "pnpm". 

Guessing that's part of why we're on yarn 1.x and not yarn 2.x as well...
Comment 2 David Cook 2024-08-30 01:01:20 UTC
Also, if it stores the modules somewhere than in ./node_modules, then maybe I wouldn't have to chronically be typing "grep --exclude-dir=node_modules" haha.
Comment 3 Victor Grousset/tuxayo 2024-10-13 18:31:43 UTC
Updating Yarn and using the Yarn PnP strategy (default for new projects) doesn't look bad either:
https://github.com/pnpm/pnpm?tab=readme-ov-file#benchmark
https://yarnpkg.com/features/pnp
https://yarnpkg.com/blog/release/4.0#performances

Ultimately both are fast and well maintained.

So whichever someone motivated to attempt to make it happen finds easier to migrate to or find differentiating features for our daily use.

Thanks for opening the topic! :)
Comment 4 Victor Grousset/tuxayo 2025-03-17 09:02:12 UTC
(In reply to David Cook from comment #1)
> It looks like we use the Debian packaged "yarn" atm, but there is no package
> for "pnpm". 
> 
> Guessing that's part of why we're on yarn 1.x and not yarn 2.x as well...

We install from a repo. Otherwise the D13/trixie build would be on yarn 4 and likely blow up ^^

That's part of why yarn isn't a production dependency I think.