From 1d9b8eb6f84d165f05a672598f5247e92d4b6bb4 Mon Sep 17 00:00:00 2001 From: Daniel Chambers Date: Thu, 24 Oct 2024 13:37:06 +1100 Subject: [PATCH 1/3] Update TypeScript to 5.6.3 --- ndc-lambda-sdk/package-lock.json | 8 ++++---- ndc-lambda-sdk/package.json | 2 +- ndc-lambda-sdk/src/execution.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ndc-lambda-sdk/package-lock.json b/ndc-lambda-sdk/package-lock.json index c6cb563..a2c6895 100644 --- a/ndc-lambda-sdk/package-lock.json +++ b/ndc-lambda-sdk/package-lock.json @@ -17,7 +17,7 @@ "p-limit": "^3.1.0", "ts-api-utils": "^1.3.0", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.6.3" }, "bin": { "ndc-lambda-sdk": "bin/index.js" @@ -3856,9 +3856,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/ndc-lambda-sdk/package.json b/ndc-lambda-sdk/package.json index 7bd30a2..70d54ef 100644 --- a/ndc-lambda-sdk/package.json +++ b/ndc-lambda-sdk/package.json @@ -38,7 +38,7 @@ "p-limit": "^3.1.0", "ts-api-utils": "^1.3.0", "ts-node": "^10.9.2", - "typescript": "^5.5.4" + "typescript": "^5.6.3" }, "devDependencies": { "@types/chai": "^4.3.11", diff --git a/ndc-lambda-sdk/src/execution.ts b/ndc-lambda-sdk/src/execution.ts index c3e2964..7364f8b 100644 --- a/ndc-lambda-sdk/src/execution.ts +++ b/ndc-lambda-sdk/src/execution.ts @@ -281,7 +281,7 @@ export function reshapeResultUsingFieldSelection(value: unknown, type: schema.Ty switch (type.type) { case "array": if (!isArray(value)) - throw new sdk.InternalServerError(`Expected an array, but received '${value === null ? "null" : null ?? typeof value}'`); + throw new sdk.InternalServerError(`Expected an array, but received '${value === null ? "null" : typeof value}'`); const elementFieldSelection = (() => { switch (fieldSelection.type) { @@ -314,7 +314,7 @@ export function reshapeResultUsingFieldSelection(value: unknown, type: schema.Ty if (objectType === undefined) throw new sdk.InternalServerError(`Unable to find object type definition '${type.name}'`) if (value === null || Array.isArray(value) || typeof value !== "object") - throw new sdk.InternalServerError(`Expected an object, but received '${value === null ? "null" : null ?? Array.isArray(value) ? "array" : null ?? typeof value}'`); + throw new sdk.InternalServerError(`Expected an object, but received '${value === null ? "null" : Array.isArray(value) ? "array" : typeof value}'`); const selectedFields: Record = (() => { switch (fieldSelection.type) { From ed21465339671b57257608be06ea44864a307cd1 Mon Sep 17 00:00:00 2001 From: Daniel Chambers Date: Thu, 24 Oct 2024 13:38:37 +1100 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21e4e7d..e60cdce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ This changelog documents the changes between release versions. ## [Unreleased] Changes to be included in the next upcoming release +### Changed +* 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)) + ## [1.8.0] - 2024-09-20 - Updated the NDC TypeScript SDK to v7.0.0 ([#44](https://github.com/hasura/ndc-nodejs-lambda/pull/44)) - 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`. From 150c1860b8585f70b28e626861a6d9ac30b53b45 Mon Sep 17 00:00:00 2001 From: Daniel Chambers Date: Thu, 24 Oct 2024 13:42:26 +1100 Subject: [PATCH 3/3] Bump version --- CHANGELOG.md | 2 ++ ndc-lambda-sdk/package-lock.json | 4 ++-- ndc-lambda-sdk/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e60cdce..8252210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This changelog documents the changes between release versions. ## [Unreleased] Changes to be included in the next upcoming release +## [1.9.0] - 2024-10-24 + ### Changed * 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)) diff --git a/ndc-lambda-sdk/package-lock.json b/ndc-lambda-sdk/package-lock.json index a2c6895..62fc4da 100644 --- a/ndc-lambda-sdk/package-lock.json +++ b/ndc-lambda-sdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hasura/ndc-lambda-sdk", - "version": "1.8.0", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@hasura/ndc-lambda-sdk", - "version": "1.8.0", + "version": "1.9.0", "license": "Apache-2.0", "dependencies": { "@hasura/ndc-sdk-typescript": "^7.0.0", diff --git a/ndc-lambda-sdk/package.json b/ndc-lambda-sdk/package.json index 70d54ef..76f08cd 100644 --- a/ndc-lambda-sdk/package.json +++ b/ndc-lambda-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@hasura/ndc-lambda-sdk", - "version": "1.8.0", + "version": "1.9.0", "description": "SDK that can automatically expose TypeScript functions as Hasura NDC functions/procedures", "author": "Hasura", "license": "Apache-2.0",