mitodl/course-search-utils

History should be a peerDependency

Opened this issue · 0 comments

In mitodl/open-discussions#4115, Renovate made some updates resulting in...

  • Infinite Corridor using history v4, as required by React Router v5
  • Infinite Corridor's copy of course-search-utils using its own copy of history, v5, the most recent.

This leads to type errors when passing history objects to course-search-utils.

What to do?: History should be a peer dependency in order to guarantee course-search-utils isusing the same version of History as the hosting app. And probably, history should be an optional peer dependency:

  • we never use history directly, we only use its type annotations
  • not all functionality from course-search-utils requires passing a history object (only useCourseSearch).