Skip to content

Commit 687d005

Browse files
committed
Bump version 2.36.1
1 parent bde85bf commit 687d005

5 files changed

Lines changed: 39 additions & 4 deletions

File tree

.github/workflows/build-test-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
RELEASE_VERSION: v2.36.0
11+
RELEASE_VERSION: v2.36.1
1212

1313
# Add workflow-level permissions
1414
permissions:

NpgsqlRestClient/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
2.36.0
2+
2.36.1
33
*/
44
{
55
//

changelog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@ Note: The changelog for the older version can be found here: [Changelog Archive]
44

55
---
66

7+
## Version [2.36.1](https://github.com/NpgsqlRest/NpgsqlRest/tree/2.36.0) (2025-09-29)
8+
9+
[Full Changelog](https://github.com/NpgsqlRest/NpgsqlRest/compare/2.36.0...2.36.1)
10+
11+
This minor version improves `TSClient` plugin only (`ClientCodeGen` configuration in client).
12+
13+
Generated Typescript fetch modules are simplified:
14+
- Returned type is now `Promise<{status: number, response: IMyResponse[]}>` instead of previously `Promise<{status: number, response: IMyResponse[] | string}>`.
15+
- When failed, response cast string to any: `response: response.status == 200 ? await response.json() as IMyResponse[] : await response.text() as any`.
16+
17+
This approach avoids casting to appropriate type on caller:
18+
19+
```ts
20+
myCall({}).then(res => {
21+
if (res.status === 200) {
22+
// previously:
23+
//let myField = (res.response[0] as IMyResponse).field;
24+
25+
// now:
26+
let myField = res.response[0].field;
27+
}
28+
});
29+
```
30+
31+
If status is different then 200, then we need to cast to string.
32+
33+
Additionaly, new configuration option for `ClientCodeGen` configuration:
34+
35+
```jsonc
36+
//
37+
// When true, include PostgreSQL schema name in the generated type names to avoid name collisions. Set to false to simplify type names when no name collisions are expected.
38+
//
39+
"IncludeSchemaInNames": true
40+
```
41+
742
## Version [2.36.0](https://github.com/NpgsqlRest/NpgsqlRest/tree/2.36.0) (2025-09-29)
843

944
[Full Changelog](https://github.com/NpgsqlRest/NpgsqlRest/compare/2.35.0...2.36.0)

npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npgsqlrest",
3-
"version": "2.36.0",
3+
"version": "2.36.1",
44
"description": "Automatic REST API for PostgreSQL Databases Client Build",
55
"scripts": {
66
"postinstall": "node postinstall.js",

npm/postinstall.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const os = require("os");
66
const https = require("https");
77

88
const downloadDir = "../.bin/";
9-
const downloadFrom = "https://github.com/NpgsqlRest/NpgsqlRest/releases/download/v2.36.0/";
9+
const downloadFrom = "https://github.com/NpgsqlRest/NpgsqlRest/releases/download/v2.36.1/";
1010

1111
function download(url, to, done) {
1212
https.get(url, (response) => {

0 commit comments

Comments
 (0)