5 Commits

Author SHA1 Message Date
Brendan Irvine-Broque
5c846ca06e
Clarify usage and update readme (#3114)
refs https://github.com/Ethan-Arrowood/socket/pull/17

@petebacondarwin @brianc — publishing `pg-cloudflare` as a separate package seems to be really helpful to people. Ex:

https://github.com/sidorares/node-mysql2/pull/2289/files#diff-e56fabfb5e90fd8f6265cfbe84f3701a85261d884e198bf61de34958cee4864aR12

Added some docs to clarify usage, and cross link to the Node.js implementation of the Socket API.

Co-authored-by: Brian Carlson <brian.m.carlson@gmail.com>
2024-06-04 11:49:30 -05:00
Brian Carlson
eaafac36dc Publish
- pg-cloudflare@1.1.1
 - pg-connection-string@2.6.1
 - pg-cursor@2.10.1
 - pg-pool@3.6.1
 - pg-query-stream@4.5.1
 - pg@8.11.1
2023-06-26 11:36:32 -05:00
Pete Bacon Darwin
0dfd955be5
fix: ensure that pg-cloudflare can be used with bundlers that don't know about Cloudflare sockets (#2978)
By implementing package.json `exports` we can avoid processing the Cloudflare
specific code, which contains `import ... from "cloudflare:sockets"`, in bundlers such
as Webpack.

If you are bundling for a Worker environment using Webpack then you need to add the
`workerd` condition and ignore `cloudflare:sockets` imports:

**webpack.config.js**
```js
resolve: { conditionNames: ["require", "node", "workerd"] },
  plugins: [
    new webpack.IgnorePlugin({
      resourceRegExp: /^cloudflare:sockets$/,
    }),
  ],
```
2023-05-31 11:25:56 -05:00
Brian Carlson
14b840e96e Publish
- pg-cloudflare@1.1.0
 - pg-connection-string@2.6.0
 - pg-cursor@2.10.0
 - pg-query-stream@4.5.0
 - pg@8.11.0
2023-05-15 10:36:31 -05:00
Pete Bacon Darwin
07553428e9 Add Cloudflare Worker compatible socket 2023-05-15 07:29:07 +01:00