forked from processing/processing4
-
Notifications
You must be signed in to change notification settings - Fork 0
Chosen Technologies
Stephan Max edited this page Aug 19, 2025
·
2 revisions
We need a robust, fast, and space-saving package manager to allow p5.js mode users to install arbitrary external Node packages. We also want to store the central Electron dependency just once, regardless how many sketches a user creates and edits. Anything else will blow space requirements out of proportion.
-
npm❌- Pros
- shipped with Node.js runtime
- well-established
- Cons:
- performance (sequential installation of packages)
- questionable
npm auditmessages
- Pros
-
yarn❌- Pros:
- faster installation through parallelized downloads
- offline mirrors + Plug’n’Play (Yarn’s way to avoid re-installs of dependencies)
- Cons:
- complex and bloated configuration
- unclear whether PnP works for all kinds of packages
- Yarn with PnP is a strong runner-up that I will keep on my radar; I will concentrate on interfacing with
pnpm, though, both because of time restrictions and becausepnpmpresents itself as that strong
- Pros:
-
pnpm✅- Pros:
- main motivation is saving space
- performance
- for different versions of same dependencies only files that differ are stored
- no ghost dependencies via non-flat
node_modulesfolder structure - comes with more interesting features like
pnpm recursivefor project installs in batches and Node environment management (replaces tools likenvmor manual management of different Node runtimes)
- Cons:
- Haven’t found any for our use-case
- Pros:
- Core mechanic: saving space by storing dependencies and version diffs in a central (configurable) content-addressable store
- Gotcha:
node_modulesfile structure is non-flat and only exposes explicit dependencies, i.e. a transitive dependency C in case of A → B → C is not automatically importable when A only explicitly lists B as dependency- This clean approach is by design
- Fix by adding C as an explicit dependency or work around by hoisting C to top level of
node_modules(same as hownpmdoes it)
- Interesting:
pnpmleaves its core business by also doubling as a Node environment management tool viapnpm env