From 677bb0ebbc6c32fc913715faf1756974a17cbdaa Mon Sep 17 00:00:00 2001 From: Sam Kim Date: Wed, 19 Jan 2022 23:04:11 -0800 Subject: [PATCH 1/2] Add supported node and typescript versions to workflow --- .github/workflows/authzed-node.yaml | 9 +++++++-- README.md | 7 +++++++ package.json | 2 +- yarn.lock | 7 +------ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/authzed-node.yaml b/.github/workflows/authzed-node.yaml index 56f6ffb..c615031 100644 --- a/.github/workflows/authzed-node.yaml +++ b/.github/workflows/authzed-node.yaml @@ -18,12 +18,17 @@ jobs: test: name: Lint and Test runs-on: ubuntu-latest - + strategy: + matrix: + node-version: [14, 16, 17] steps: - uses: actions/checkout@v2 - uses: "authzed/action-spicedb@v1" with: version: "latest" + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} - uses: bahmutov/npm-install@v1 with: working-directory: ./ @@ -43,7 +48,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: 10 + node-version: 14 - run: npm install - run: npm test - uses: battila7/get-version-action@v2 diff --git a/README.md b/README.md index c3b039e..79bdb75 100644 --- a/README.md +++ b/README.md @@ -99,3 +99,10 @@ client.checkPermission(checkPermissionRequest, (err, response) => { console.log(err); }); ``` + +## Requirements + +Supported Node.js versions: 14, 16, 17 + +Minimum TypeScript version 3.8 + diff --git a/package.json b/package.json index 115545b..98d7f35 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,6 @@ "grpc-tools": "^1.10.0", "jasmine": "^3.6.4", "ts-node": "^10.3.0", - "typescript": "^4.4.4" + "typescript": "^3.8" } } diff --git a/yarn.lock b/yarn.lock index 7a4686b..dea7255 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1789,16 +1789,11 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typescript@^3.9: +typescript@^3.8, typescript@^3.9: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@^4.4.4: - version "4.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" - integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" From 5a548de5fd53ddedb8013a8db56003f48dcfc6e4 Mon Sep 17 00:00:00 2001 From: Sam Kim Date: Thu, 20 Jan 2022 15:55:28 -0800 Subject: [PATCH 2/2] Lint fixes --- src/full.test.ts | 2 -- src/v1.test.ts | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/full.test.ts b/src/full.test.ts index e6cd79c..d5c3d73 100644 --- a/src/full.test.ts +++ b/src/full.test.ts @@ -1,6 +1,4 @@ -import { Client } from "@grpc/grpc-js"; import { ClientSecurity } from "./util"; -import * as v0 from "./v0"; import * as v1 from "./v1"; import { Consistency } from "./v1"; import * as v1alpha from "./v1alpha1"; diff --git a/src/v1.test.ts b/src/v1.test.ts index 1c4e8fe..5acfe94 100644 --- a/src/v1.test.ts +++ b/src/v1.test.ts @@ -61,6 +61,7 @@ describe("a check with an known namespace", () => { client.writeSchema(request, function (err, response) { expect(err).toBe(null); + expect(response).toBeTruthy(); // Write a relationship. const resource = ObjectReference.create({ @@ -88,6 +89,7 @@ describe("a check with an known namespace", () => { client.writeRelationships(writeRequest, function (err, response) { expect(err).toBe(null); + expect(response).toBeTruthy(); // Call check. const checkPermissionRequest = CheckPermissionRequest.create({