Deno support for deps.ts
Hi team!
I´m trying Deno, and following one of their best practices, they recommend moving all the dependencies with a url or a npm prefix to a deps.ts file: https://deno.land/[email protected]/examples/manage_dependencies
Given that the "xata codegen" tool generates the client code and builds something like:
Is there a recommended way to handle it, as we should not change generated code...
Deno
Manage Dependencies | Manual | Deno
In Deno there is no concept of a package manager as external modules are
imported directly into local modules. This raises the question of how to manage
remote dependencies without a package manager.
2 Replies
That's right, the src/xata.ts output shouldn't be edited as its content can be overwritten by next CLI actions.
What about exporting the XataClient in the deps.ts file?
You could then call it in your code like in this example, with a custom getXataClient if options need to be passed to it https://xata.io/docs/typescript-client/configuration#configuration-overrides
i.e.
Thanks! I'll built it through this approach!