0.12.6

(fix): In Node.js environments the SDK will default to using node-fetch. The SDK depends on v2 of node-fetch to stay CJS compatible.

Previously the SDK was doing require("node-fetch") but it should be require("node-fetch").default based on https://github.com/node-fetch/node-fetch/issues/450#issuecomment-387045223.

0.12.5

(feat): Introduce a custom configuration called tolerateRepublish which supports running npm publish with the flag --tolerateRepublish. This flag allows you to publish on top of an existing npm package.

To turn on this flag, update your generators.yml:

1groups:
2 generators:
3 - name: fernapi/fern-typscript-node-sdk
4 version: 0.12.5
5 ...
6 config:
7 tolerateRepublish: true

0.12.4

(fix): Previously reference.md was just leveraging the function name for the reference, now it leverages the full package-scoped path, mirroring how the function would be used in reality.

1seedExamples.getException(...)
2
3// is now
4
5seedExamples.file.notification.service.getException(...)

(fix): Previously SDK code snippets would not support generation with undiscriminated unions. Now, it does.

0.12.2

(fix): Previously SDK code snippets would not take into account default parameter values and would always include a {}. This was odd and didn’t represent how a developer would use the SDK. Now, the snippets check for default parameter values and omit if there are no fields specified.

1// Before
2client.users.list({});
3
4// After
5client.users.list();

0.12.1

(fix): Optional objects in deep query parameters were previously being incorrectly serialized. Before this change, optional objects were just being JSON.stringified which would send the incorrect contents over the wire.

1// Before
2if (foo != null) {
3 _queryParams["foo"] = JSON.stringify(foo);
4}
5
6// After
7if (foo != null) {
8 _queryParams["foo"] = foo;
9}
10
11// After (with serde layer)
12if (foo != null) {
13 _queryParams["foo"] = serializers.Foo.jsonOrThrow(foo, {
14 skipValidation: false,
15 breadcrumbs: ["request", "foo"]
16 });
17}