rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

[RRFC] peerDevDependencies

Open rbalet opened this issue 3 years ago • 5 comments

Motivation ("The Why")

Some libraries are using devDependencies that are required to be downloaded in the new project another person may create.

Use case:
I'm using the open layer library. This library does required @types/topojson-specification, @types/geojson & @types/arcgis-rest-api to be downloaded as devDependencies in my project.

How

Current Behaviour

This could be archived by adding the dependencies into the peerDependencies and hoping that the three shakings make his work.

Desired Behaviour

Having a new peerDevDependencies list that do work exactly the same way as the peerDependencies.

rbalet avatar Mar 14 '22 08:03 rbalet

This would be a bit weird; peer requirements hoist up through as many levels of the graph as there are, but dev deps aren’t checked for anything transitive.

ljharb avatar Mar 14 '22 15:03 ljharb

tbh this seems more like something that TS could solve by fixing DT so it sets up peerDep relationships properly.

ljharb avatar Mar 14 '22 15:03 ljharb

@ljharb I'm not sure I understand what you just said.

But the open layer library is part developed in javascript & they are somehow generating a .d.ts file out of it.

But not sur about what I'm saying, I'm not experienced enough for that

rbalet avatar Mar 15 '22 06:03 rbalet