Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework to remove need for js-dist #159

Open
tstirrat15 opened this issue Oct 2, 2024 · 4 comments
Open

Rework to remove need for js-dist #159

tstirrat15 opened this issue Oct 2, 2024 · 4 comments

Comments

@tstirrat15
Copy link
Contributor

It'd be nice to only have a single package.json as a single source of truth. There are other node libraries out there that are written in TS and distributed in JS; https://github.com/nats-io/nats.node is an example.

@tstirrat15
Copy link
Contributor Author

I think authzed-node should work fine for a non-TS consumer. I'm going to verify that before I cut it out, though. My understanding is that it was added when a user asked for it for a non-TS environment.

@tstirrat15
Copy link
Contributor Author

tstirrat15 commented Oct 2, 2024

This is almost certainly why: https://github.com/authzed/authzed-node/blob/main/package.json#L31-L32

Part of this work will be figuring out why protobuf-ts has its own runtime :thonk:

@tstirrat15
Copy link
Contributor Author

Might be worth seeing if tsup could improve our build process as well.

@tstirrat15
Copy link
Contributor Author

Another thought:

There are libraries that ship multiple entrypoints, such that you do:

import { SomeThing } from 'my-library';
import { SomeOtherThing } from 'my-library/other';

The thought is that we'd have one set of client library files, and then two backing implementations. I think it makes an assumption that the TS proto gencode and the non-TS proto gencode look the same, though, which isn't necessarily going to be the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant