microsoft / microsoft/DefinitelyTyped-tools
definitions-parser does not support subset peer dependencies
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 423
- Forks
- 237
- Avg merge
- 18h 18m
- Merged PRs (30d)
- 11
Description
Mapping react to react/v16 in react-virtualized-select and mapping react to react/v17 (new in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210) currently throws the following when running npm run test-all:
"react-virtualized-select depends on react-virtualized, which has a path mapping for react/v17. react-virtualized-select must have the same path mappings as its dependencies."
This constraint isn't really reflective of how peer dependencies work.
react-virtualized-select has a peer on React 16. react-virtualized has a peer on React 16 or 17. react-virtualized-select depends on react-virtualized.
This is perfectly fine at runtime by installing React 16.
But for some reason the definitions-parser thinks that's not ok. What's the reasoning behind that?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the definitions-parser implementation and reproduce the failure with npm run test-all using the react-virtualized-select and react-virtualized mappings described here. Trace why a dependency's react/v17 mapping must exactly match the dependent package's react/v16 mapping, then verify that compatible peer-dependency subsets pass while genuinely incompatible mappings remain rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100