Skip to content

Commit e429d1e

Browse files
Update docs (#85)
1 parent f2b8006 commit e429d1e

17 files changed

+2802
-379
lines changed

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
CONDUCTOR_SERVER_URL=""
2+
23
CONDUCTOR_AUTH_KEY=""
3-
CONDUCTOR_AUTH_SECRET=""
4+
CONDUCTOR_AUTH_SECRET=""
5+
6+
CONDUCTOR_MAX_HTTP2_CONNECTIONS=

DECISIONS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,6 @@ I would suggest we maintain CJS compat for now, in the hope that there's either
1515

1616
Because it's relatively simple to support interop between ESM and CJS, and the wide footprint.
1717

18-
19-
### Using `node-fetch`
20-
21-
who: @nicktomlin
22-
23-
I initially explored [`undici`](https://github.com/nodejs/undici) as a way of using the built-in `fetch` support in node.
24-
25-
Unfortunately, at the time of writing there's no clean way to handle `tls` options. Additionally, `fetch` is experimental for node 16.x which results in warnings.
26-
27-
At some point in the future, it would be nice to migrate over once undici's `fetch` implementation is a little more feature rich and things have stabalized.
28-
29-
3018
### Using `jest` for testing
3119

3220
`jest` can be a little magical, but it's relatively fast (with 28.x especially), ergonomic, and provides a simple maintenance story over a BYO setup.
@@ -38,3 +26,15 @@ I considered `mocha` and `ava` (which i've also used and like) but `jest` struck
3826
who: @nicktomlin
3927

4028
Typescript publication can be a wacky process and `tsup` simplifies a lot of this.
29+
30+
### Using `undici` to make http2 requests (if possible)
31+
32+
who: @dmitryborisov-sm
33+
34+
Since Node.js uses Undici for its built-in fetch functionality, Undici supports HTTP/2 and meets all our requirements. If Undici fails to initialize, the SDK will fall back to the default fetch: HTTP/1.1 in Node 18 and HTTP/2 in browsers. It's also possible to provide a custom fetch function when creating the SDK, so in theory, the SDK could work on older Node versions using libraries like node-fetch.
35+
36+
### OpenAPI generated code should not be modified directly
37+
38+
who: @dmitryborisov-sm
39+
40+
The SDK should follow a layered architecture, with all modifications made in the top layers. This approach enables easy updates to autogenerated code and ensures alignment with API changes, minimizing both effort and risk.

0 commit comments

Comments
 (0)