diff --git a/CHANGELOG.md b/CHANGELOG.md index ab82e58..ec4bf7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,14 @@ This changelog documents the changes between release versions. ## [Unreleased] Changes to be included in the next upcoming release +## [1.9.0] - 2024-10-24 + ### Added - 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)) +### 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`. diff --git a/ndc-lambda-sdk/package-lock.json b/ndc-lambda-sdk/package-lock.json index a1d1733..d6fda51 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", @@ -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" @@ -3851,9 +3851,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 a992ba9..2c306cc 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", @@ -39,7 +39,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) {