ArsenyYankovsky / nova-odm

A schema-based data mapper for Amazon DynamoDB.
https://github.com/ArsenyYankovsky/nova-odm
Apache License 2.0
34 stars 3 forks source link

Missing peer dependency in @nova-odm/annotations #9

Open kiesel opened 11 months ago

kiesel commented 11 months ago

Hi,

while attempting to include these libaries in a project with yarn2, the following error occurred:

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @nova-odm/annotations@npm:0.8.7::__archiveUrl=[...]2Fnpm%2Fnpm%2F%40nova- \
odm%2Fannotations%2F-%2Fannotations-0.8.7.tgz doesn't provide @aws-sdk/client-dynamodb (p1924d), \
 requested by @nova-odm/auto-marshaller
[...]

Comparing the annotations package with the other ones, it seems the peer dependency to @aws-sdk/client-dynamodb is missing.

Best regards, Alex

ArsenyYankovsky commented 10 months ago

Hi,

It's easy to add it but the annotations package doesn't use anything from the @aws-sdk/client-dynamodb so that's why it doesn't have it as a peer dependency. Let me know if I need to fix this or if you managed to somehow solve this. Thanks!

kiesel commented 10 months ago

I am using yarn which complains about it with this message:

➤ YN0002: │ @nova-odm/annotations@npm:0.8.7 doesn't provide @aws-sdk/client-dynamodb (p1924d), requested by @nova-odm/auto-marshaller

Yarn (2+) warns about missing dependency links (see here some related information); since the annotation package depends on other packages that have a peer dependency on the client-dynamodb package, but annotations does not list it, it regards this as a amissing dependency. By including the peer dependency, you'd essentially handing the requirement outwards in the chain.

In this specific case, a problem would probably never really manifest, since usually you'll be not only depending on the annotations package, but also on one of the dependencies as well. But it'd be nice to get rid of the warning :-)