Implicit or explicit third party dependencies #10
Replies: 4 comments 1 reply
-
|
Discussed some in DTC 07-23-2024. It seems like it would make more sense to mark those dependencies as peer. This would allow the consumer to use them as their on discrepancy. Might make a note that these are peer dependencies and they can import them directly from that library. |
Beta Was this translation helpful? Give feedback.
-
|
Where this becomes slightly complicated: Say we had a formatter that we wanted to expose called Meaning that when people use the following in a consuming application: We would have |
Beta Was this translation helpful? Give feedback.
-
|
I want to run a problem scenario past y'all and see how you feel we should take action: Problem: If an app is using a different version of react-aria-components than what @accelint/design-system is using, components break due to different instances of React context. Example: In this scenario, There's a couple possible approaches that I've thought of, but I'd like your ideas as well. Here's a couple that I came up with:
|
Beta Was this translation helpful? Give feedback.
-
|
After discussing during our TSC meeting 11/12/24, it was decided to go with the peer dependency path as a solution to this problem space. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We know for a fact that we will be utilizing some third party dependencies for large parts of our toolkit capability. An example being Turfjs.
Given that we have
@hypergiant/geowould it make sense to simply export all ofturfjsfrom that package? Would we rather expect the consuming application to addturfjsexplicitly? If so how do we manage version drift between what is used in say@hypergiant/geoand the consuming application?Option 1 (implicit):
import { distance } from '@hypergiant/geo';Option 2 (explicit):
import { distance } from 'turfjs';Beta Was this translation helpful? Give feedback.
All reactions