You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while looking at the source code of the monorepo, I noticed something interesting, eg. some dependencies aren’t listed in the packages itself but are marked as external in the tsup config.
for example, the agents-sdk package doesn’t declare ai, @ai-sdk/react, or react as dependencies, even though they’re used in the code. instead, the built ES modules keep them as external imports instead of bundling them. that makes sense, but I’m wondering if it’s the best approach.
I assume the idea is to let users install only the dependencies they actually need, for example, skipping react if they don’t use it. but doesn’t this make it harder to control dependency versions and compatibility? wouldn’t it be better to list them as peerDependencies instead? and if that’s the case, it would probably be safe to just remove them from external in tsup config, since by default tsup automatically excludes packages specified in the dependencies and peerDependencies.
also, in the hono-agents package, agents-sdk and hono are both listed as peerDependencies and devDependencies. wouldn’t it make more sense to pick just one? or maybe even declare them as regular dependencies?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
while looking at the source code of the monorepo, I noticed something interesting, eg. some dependencies aren’t listed in the packages itself but are marked as external in the tsup config.
for example, the
agents-sdk
package doesn’t declareai
,@ai-sdk/react
, orreact
as dependencies, even though they’re used in the code. instead, the built ES modules keep them as external imports instead of bundling them. that makes sense, but I’m wondering if it’s the best approach.I assume the idea is to let users install only the dependencies they actually need, for example, skipping react if they don’t use it. but doesn’t this make it harder to control dependency versions and compatibility? wouldn’t it be better to list them as
peerDependencies
instead? and if that’s the case, it would probably be safe to just remove them fromexternal
in tsup config, since by default tsup automatically excludes packages specified in thedependencies
andpeerDependencies
.also, in the
hono-agents
package,agents-sdk
andhono
are both listed aspeerDependencies
anddevDependencies
. wouldn’t it make more sense to pick just one? or maybe even declare them as regulardependencies
?Beta Was this translation helpful? Give feedback.
All reactions