processing / processing/p5.js

[p5.js 2.0] Investigate replacing dependencies

Open
#7,761 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Discussion
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Hey there,

First of all: congratulations and thank you for releasing 2.0

I've been looking through the dependencies in the package.json file and thought that it might be possible to reduce the weight of the node_modules folder and its contents (208 MB). Additionally this could result in a smaller bundle and speed up the build and tests. See the list down below for further insights

Another Issue that caught my eye is the 'exports' field "./": "./src/app.js". The specifier "./" should be changed to "."

dependency replacements

colorjs.io@0.5.2 (7.85 MB) => chroma.js (396 kB)

file-saver@^1.3.8 (36 kB)

  • depends on Blob.js which is not prebundled
  • additionally all main Browser have built-in support of Blobs

libtess@1.2.2

  • 9 years old (?)

omggif@1.0.10 (38.5 kB)

  • is not bundled / minified
  • 6 years old
dev dependency replacements

dayjs@1.11.10 (670 kB)

  • could be replaced by a single utility function

lint-staged@15.1.0 (132 kB) => nano-staged (41.1 kB)

msw@2.6.3 (4.49 MB)

  • MSW supports browser and node environments which seems to be a bit of an overkill for its used purpose in the tests

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with package.json and review each listed runtime and development dependency, including the exports field. Check how the proposed replacements are used and whether they preserve the current bundle, build, and test behavior. Done means an agreed dependency plan is implemented and validated without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.