visgl / visgl/deck.gl

[Feat] Simplified peerDependencies policy

Open
#8,802 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Target Use Case

An idea for discussion.

Some modules now have a significant number of peer dependencies. @deck.gl/carto is one example, with seven peer dependencies, soon to be eight, which increases the complexity of setup for new users.

As a maintainer, it's not always clear to me which modules belong in dependencies vs. peerDependencies, or whether there's an established policy. See the @luma.gl/* dependencies here:

https://github.com/visgl/deck.gl/blob/fa029dddebc43f350cef07cf8e9fe86d98415c02/modules/aggregation-layers/package.json#L40-L51

Each time a peer dependency is added, or its version incremented, that is technically a breaking change under semver. Whether it breaks users in practice would depend on whether the package in question was already somewhere in the dependency chain, which is hard to predict.

Proposal

Perhaps a way to simplify this — while avoiding the "mismatched dependencies" risk — would be to take a policy that the relevant */core module is always a peer dependency, while any other visgl-related modules are production dependencies, unless there's some particular reason for an exception?

Because everything else depends on the */core modules, I think that could be a way to minimize what end-users need to install, while also ensuring that compatible versions are used.

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 the linked modules/aggregation-layers/package.json dependency section and review the issue's peerDependencies and semver references. Compare how the relevant */core and other vis.gl modules are currently classified. Done would require an agreed dependency policy and a clearly scoped set of package changes, which the issue does not yet define.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Feature
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.