Skip to content

Reduce size of module dependency graph #1342

@Krinkle

Description

@Krinkle

The qunit npm package has quite a lot of dependencies installed when used in another project.

The total number of packages installed according to (as of QUnit 2.8.0) is 143 packages. (Not including dev dependencies, that are only installed for QUnit contributors.)

Assuming we won't be investing in a way to sandbox QUnit, I believe this is beyond what we can reasonably expect a developer to audit before installing. Keeping in mind that merely running npm install in a Git project using qunit, is enough for any of these packages turned bad to start scraping process.env, ~/.ssh, etc (e.g. through postinstall hooks, or at run-time).

I'm aiming with this task to take a serious look at what abstractions we need and are providing value, and which we might be better off not using a package for. For problems where the abstractions can be "simple enough to obviously have no problems", it might be better to simply inline it within our repo (with proper licensing information inline, if based on an existing package). In such case, I believe the theoretical value gained from future updates is non-existent or small enough to not outweigh the loss in understandability and security of QUnit overall. If in these areas we do find a rare bug one day, we can easily update it by hand.

Goal: Maximum 20, preferably less than 10.

QUnit prides simplicity, I believe. We've done well to uphold that in our API. I'm hoping we can reach simplicity in our dependency graph as well!

Relating reading:

And also:

Metadata

Metadata

Assignees

Labels

Component: CLIType: BugSomething isn't working right.Type: MetaSeek input from maintainers and contributors.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions