Skip to content

Commit b8e329e

Browse files
Update TypeScript to 5.6.3, bump version to v1.9.0 (#46)
1 parent 436fe9a commit b8e329e

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ This changelog documents the changes between release versions.
44
## [Unreleased]
55
Changes to be included in the next upcoming release
66

7+
## [1.9.0] - 2024-10-24
8+
79
### Added
810
- Exported the `@hasura/ndc-lambda-sdk/connector` module to make it easier to build entirely new connectors that extend the existing functionality provided by the SDK ([#45](https://github.com/hasura/ndc-nodejs-lambda/pull/45))
911

12+
### Changed
13+
* Updated to use [TypeScript v5.6.3](https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/) ([#46](https://github.com/hasura/ndc-nodejs-lambda/pull/46))
14+
1015
## [1.8.0] - 2024-09-20
1116
- Updated the NDC TypeScript SDK to v7.0.0 ([#44](https://github.com/hasura/ndc-nodejs-lambda/pull/44))
1217
- Added support for exporting OpenTelemetry traces and metrics over GRPC. A new environment variable `OTEL_EXPORTER_OTLP_PROTOCOL` lets you switch between `http/protobuf` and `grpc`.

ndc-lambda-sdk/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ndc-lambda-sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hasura/ndc-lambda-sdk",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"description": "SDK that can automatically expose TypeScript functions as Hasura NDC functions/procedures",
55
"author": "Hasura",
66
"license": "Apache-2.0",
@@ -39,7 +39,7 @@
3939
"p-limit": "^3.1.0",
4040
"ts-api-utils": "^1.3.0",
4141
"ts-node": "^10.9.2",
42-
"typescript": "^5.5.4"
42+
"typescript": "^5.6.3"
4343
},
4444
"devDependencies": {
4545
"@types/chai": "^4.3.11",

ndc-lambda-sdk/src/execution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export function reshapeResultUsingFieldSelection(value: unknown, type: schema.Ty
281281
switch (type.type) {
282282
case "array":
283283
if (!isArray(value))
284-
throw new sdk.InternalServerError(`Expected an array, but received '${value === null ? "null" : null ?? typeof value}'`);
284+
throw new sdk.InternalServerError(`Expected an array, but received '${value === null ? "null" : typeof value}'`);
285285

286286
const elementFieldSelection = (() => {
287287
switch (fieldSelection.type) {
@@ -314,7 +314,7 @@ export function reshapeResultUsingFieldSelection(value: unknown, type: schema.Ty
314314
if (objectType === undefined)
315315
throw new sdk.InternalServerError(`Unable to find object type definition '${type.name}'`)
316316
if (value === null || Array.isArray(value) || typeof value !== "object")
317-
throw new sdk.InternalServerError(`Expected an object, but received '${value === null ? "null" : null ?? Array.isArray(value) ? "array" : null ?? typeof value}'`);
317+
throw new sdk.InternalServerError(`Expected an object, but received '${value === null ? "null" : Array.isArray(value) ? "array" : typeof value}'`);
318318

319319
const selectedFields: Record<string, sdk.Field> = (() => {
320320
switch (fieldSelection.type) {

0 commit comments

Comments
 (0)