From 75e432b774b2a43759617cff4728fcd0c28b5a18 Mon Sep 17 00:00:00 2001 From: John Kaster Date: Mon, 16 Sep 2024 15:04:14 -0700 Subject: [PATCH] feat: allow node 20 for the TS SDK --- .github/workflows/tssdk-ci.yml | 4 ++-- packages/sdk-node/README.md | 4 ++-- packages/sdk/README.md | 4 ++-- shell.nix | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tssdk-ci.yml b/.github/workflows/tssdk-ci.yml index 3a0746150..905725162 100644 --- a/.github/workflows/tssdk-ci.yml +++ b/.github/workflows/tssdk-ci.yml @@ -43,7 +43,7 @@ jobs: matrix: os: - ubuntu - node-version: [22.x] + node-version: [20.x, 22.x] steps: - name: Cancel Previous Runs @@ -122,7 +122,7 @@ jobs: runs-on: ${{ matrix.os }}-latest strategy: matrix: - node-version: [22.x] + node-version: [20.x, 22.x] os: - ubuntu looker: ${{ fromJson(needs.setup.outputs.matrix_json) }} diff --git a/packages/sdk-node/README.md b/packages/sdk-node/README.md index 9ba9647db..6a152a4a9 100644 --- a/packages/sdk-node/README.md +++ b/packages/sdk-node/README.md @@ -201,9 +201,9 @@ The [deprecated NodeJS `request` package](https://www.npmjs.com/package/request) The streaming method callback signature changed from `(readable: Readable) => Promise` to `(response: Response) => Promise`. Using `Response` as the parameter to the callback greatly increases the flexibility of streaming implementations and provides other valuable information like `Content-Type` and other headers to the streaming callback. -For the Browser SDK (`@looker/sdk`), the standard `fetch` function is still used. For the Node SDK (`@looker/sdk-node`), the global [`fetch`](https://nodejs.org/api/globals.html#fetch) function from NodeJS v22 is used. +For the Browser SDK (`@looker/sdk`), the standard `fetch` function is still used. For the Node SDK (`@looker/sdk-node`), the global [`fetch`](https://nodejs.org/api/globals.html#fetch) function from NodeJS is used, which was marked **stable** in version 22. -This means the Looker Node SDK now uses NodeJS v22. +This means the Looker Node SDK now requires Node 20 or above. The streaming version of the SDK methods should be initialized using the same `AuthSession` as the main SDK to reduce authentication thrashing. diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 3141350b9..42feef035 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -82,9 +82,9 @@ The [deprecated NodeJS `request` package](https://www.npmjs.com/package/request) The streaming method callback signature changed from `(readable: Readable) => Promise` to `(response: Response) => Promise`. Using `Response` as the parameter to the callback greatly increases the flexibility of streaming implementations and provides other valuable information like `Content-Type` and other headers to the streaming callback. -For the Browser SDK (`@looker/sdk`), the standard `fetch` function is still used. For the Node SDK (`@looker/sdk-node`), the global [`fetch`](https://nodejs.org/api/globals.html#fetch) function from NodeJS v22 is used. +For the Browser SDK (`@looker/sdk`), the standard `fetch` function is still used. For the Node SDK (`@looker/sdk-node`), the global [`fetch`](https://nodejs.org/api/globals.html#fetch) function from NodeJS is used, which was marked **stable** in version 22. -This means the Looker Node SDK now uses NodeJS v22. +This means the Looker Node SDK now requires Node 20 or above. The streaming version of the SDK methods should be initialized using the same `AuthSession` as the main SDK to reduce authentication thrashing. diff --git a/shell.nix b/shell.nix index d4a3ae042..6d95ae84f 100644 --- a/shell.nix +++ b/shell.nix @@ -4,5 +4,5 @@ with nixpkgs; with lib; mkShell { name = "sdk-codegen"; - buildInputs =[nodejs_22 yarn]; + buildInputs =[nodejs yarn]; }