I have recently migrated all of my startup's code into a monorepo, including my private packages, clients, and supabase. As a part of this, I set up pnpm workspaces and version catalogs to ensure my dependency versions are all synced.
While all of my other code was now able to use pnpm's workspace:* feature to reference my internal @company/types package instead of needing to publish to a private registry, my Deno edge functions were unable to access it. Additionally, I had to create a script that would text-replace my deno.json's dep versions to sync with the pnpm catalog every time I updated.
Deno has supported using package.json and node_modules for over 3 years now, but I can't figure out how to get the Edge Functions to use them. Is there a way to get the edge functions to use these standard tools? If not, what can I possibly do to better support monorepo development with local packages and catalog-synced versions within Deno?
TL;DR: I am trying to sync dependency version across my monorepo catalog and Deno and to use local workspace packages inside of my Edge Functions. Deno's support for package.json and node_modules seems like the perfect way to do this, but doesn't seem to be possible.
Thanks for any help you can provide. While at this point I think package.json is a great solution to these two issues of mine, I am open to others, even if it only solves one of my problems. Thanks again!
Edit: for reference, it seems like others would appreciate better package.json support for monorepo usage: https://discord.com/channels/839993398554656828/1437038461143224391 https://discord.com/channels/839993398554656828/1402310120615972954
The user has migrated their code to a monorepo and is using pnpm workspaces to sync dependency versions. They are facing issues with Deno edge functions not accessing local packages via package.json and node_modules. The user is seeking a way to integrate these tools for better monorepo support in Edge Functions.
FYI this is a user helping user forum and not regularly monitored by Supabase. There is a feature request at top of dashboad.
So this would be a feature request then, not just me using Deno/Edge Function configuration wrong?
I do not know, your last statement was you thought better support would be useful which implied it was a suggestion to SB. You'll have to see if any other users have ideas. I don't use this for Edge functions.