porsager / postgres

Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
The Unlicense
7.04k stars 257 forks source link

chore: update export conditions #819

Closed Hebilicious closed 3 months ago

Hebilicious commented 4 months ago

Hello there ! The official runtime export key for cloudflare is workerd (not worker). I believe many apps out there might already be relying on worker so I propose to add it alongside it.

Reference :

porsager commented 3 months ago

Read from here on down for why it was changed from workerd to worker originally. https://github.com/porsager/postgres/pull/618#issuecomment-1693173590

Would be great to get a confirmation from cloudflare if they now think workerd is the way to go before merging, but my own tests seem to have no problems with workerd

elithrar commented 3 months ago

@porsager - workerd is the correct export. Also see https://runtime-keys.proposal.wintercg.org/#workerd

porsager commented 3 months ago

I'll merge this and remove the worker export for now, as it appears the cases where the worker export is requested actually needs the default esm export.