Skip to content

Commit a925146

Browse files
authored
Merge branch 'main' into add-depot-runners
2 parents 668b72f + 4814269 commit a925146

12 files changed

Lines changed: 170 additions & 37 deletions

File tree

.github/workflows/automatic-api-update.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: "Called update for API change"
23
on:
34
repository_dispatch:
@@ -10,6 +11,9 @@ jobs:
1011
steps:
1112
- uses: actions/checkout@v4
1213
- uses: actions/setup-node@v4
14+
- uses: bahmutov/npm-install@v1
15+
with:
16+
useLockFile: false
1317
- name: "Update Buf Script"
1418
id: buf-update
1519
uses: authzed/actions/buf-api-update@main
@@ -23,19 +27,21 @@ jobs:
2327
run: |
2428
echo "Update status: $UPDATED_STATUS"
2529
- name: "Install buf"
26-
uses: "bufbuild/buf-setup-action@v1.48.0"
30+
uses: "bufbuild/buf-setup-action@v1.50.0"
2731
with:
2832
github_token: ${{ secrets.GITHUB_TOKEN }}
2933
if: steps.buf-update.outputs.updated == 'true'
3034
- name: "Run buf generate"
3135
if: steps.buf-update.outputs.updated == 'true'
32-
run: "buf generate"
36+
run: "yarn run buf"
3337
- name: Create Pull Request
34-
uses: peter-evans/create-pull-request@v7.0.6
38+
uses: peter-evans/create-pull-request@v7.0.7
3539
if: steps.buf-update.outputs.updated == 'true'
3640
with:
3741
delete-branch: "true"
3842
title: "Update API to ${{ github.event.client_payload.BUFTAG }}"
43+
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
44+
draft: "always-true"
3945
branch: "api-change/${{ github.event.client_payload.BUFTAG }}"
4046
base: "main"
4147
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cla.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: "CLA"
23
on: # yamllint disable-line rule:truthy
34
issue_comment:

.github/workflows/manual-api-update.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,21 @@ jobs:
2828
run: |
2929
echo "Update status: $UPDATED_STATUS"
3030
- name: "Install buf"
31-
uses: "bufbuild/buf-setup-action@v1.48.0"
31+
uses: "bufbuild/buf-setup-action@v1.50.0"
3232
with:
3333
github_token: ${{ secrets.GITHUB_TOKEN }}
3434
if: steps.buf-update.outputs.updated == 'true'
3535
- name: "Run buf generate"
3636
if: steps.buf-update.outputs.updated == 'true'
3737
run: "buf generate"
3838
- name: Create Pull Request
39-
uses: peter-evans/create-pull-request@v7.0.6
39+
uses: peter-evans/create-pull-request@v7.0.7
4040
if: steps.buf-update.outputs.updated == 'true'
4141
with:
4242
delete-branch: "true"
4343
title: Update API to ${{ inputs.buftag }}
44+
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
45+
draft: "always-true"
4446
branch: api-change/${{ inputs.buftag }}
4547
base: "main"
4648
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: "depot-ubuntu-24.04-small"
3030
strategy:
3131
matrix:
32-
node-version: [18, 20, 21]
32+
node-version: [18, 20, 22]
3333
needs: "paths-filter"
3434
if: |
3535
needs.paths-filter.outputs.codechange == 'true'
@@ -55,7 +55,7 @@ jobs:
5555
runs-on: "depot-ubuntu-24.04-small"
5656
strategy:
5757
matrix:
58-
node-version: [18, 20, 21]
58+
node-version: [18, 20, 22]
5959
needs: "paths-filter"
6060
if: |
6161
needs.paths-filter.outputs.codechange == 'true'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ console.log(results[0]); // first ReadRelationship result
142142

143143
## Requirements
144144

145-
Supported Node.js versions: 18, 20, 21
145+
Supported Node.js versions: 18, 20, 22
146146

147147
Minimum TypeScript version 3.8

buf.gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins:
88
- long_type_string
99
- client_grpc1
1010
inputs:
11-
- module: "buf.build/authzed/api:v1.38.0"
11+
- module: "buf.build/authzed/api:v1.40.0"
1212
paths:
1313
# NOTE: This grabs only the v1 proto and ignores v0 and v1dev.
1414
- "authzed/api/v1"

js-dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"only-run-tests": "vitest"
2323
},
2424
"dependencies": {
25-
"@grpc/grpc-js": "^1.11.3",
25+
"@grpc/grpc-js": "~1.12.5",
2626
"google-protobuf": "^3.15.3"
2727
},
2828
"devDependencies": {

package.json

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@
1313
"spicedb",
1414
"zanzibar"
1515
],
16-
"main": "dist/src/index.js",
16+
"main": "dist/src/index.cjs",
17+
"module": "dist/src/index.js",
1718
"types": "dist/src/index.d.ts",
19+
"exports": {
20+
"./package.json": "./package.json",
21+
".": {
22+
"types": "./dist/src/index.d.ts",
23+
"require": "./dist/src/index.cjs",
24+
"import": "./dist/src/index.js"
25+
}
26+
},
1827
"repository": "https://github.com/authzed/authzed-node",
1928
"license": "Apache-2.0",
2029
"private": false,
@@ -24,26 +33,28 @@
2433
"buf": "buf generate && tsc-esm-fix --src src/authzedapi --ext='.js'",
2534
"lint": "./node_modules/.bin/eslint src",
2635
"build": "tsc",
36+
"postbuild": "rollup dist/src/index.js --file dist/src/index.cjs --format cjs",
2737
"prepublish": "yarn build",
2838
"build-js-client": "tsc --declaration false --outDir js-dist"
2939
},
3040
"dependencies": {
31-
"@grpc/grpc-js": "^1.12.5",
32-
"@protobuf-ts/runtime": "^2.9.4",
33-
"@protobuf-ts/runtime-rpc": "^2.9.4",
41+
"@grpc/grpc-js": "~1.12.5",
42+
"@protobuf-ts/runtime": "^2.9.6",
43+
"@protobuf-ts/runtime-rpc": "^2.9.6",
3444
"google-protobuf": "^3.21.4"
3545
},
3646
"devDependencies": {
37-
"@eslint/eslintrc": "^3.2.0",
38-
"@eslint/js": "^9.17.0",
39-
"@protobuf-ts/plugin": "^2.9.4",
47+
"@eslint/eslintrc": "^3.3.1",
48+
"@eslint/js": "^9.23.0",
49+
"@protobuf-ts/plugin": "^2.9.6",
4050
"@tsconfig/node18": "^18.2.4",
41-
"@typescript-eslint/eslint-plugin": "^8.19.0",
42-
"@typescript-eslint/parser": "^8.19.0",
43-
"eslint": "^9.17.0",
44-
"grpc-tools": "^1.12.4",
51+
"@typescript-eslint/eslint-plugin": "^8.28.0",
52+
"@typescript-eslint/parser": "^8.28.0",
53+
"eslint": "^9.23.0",
54+
"grpc-tools": "^1.13.0",
55+
"rollup": "^4.37.0",
4556
"tsc-esm-fix": "^3.1.2",
46-
"typescript": "^5.7",
47-
"vitest": "^2.1.3"
57+
"typescript": "^5.8",
58+
"vitest": "^3.0.9"
4859
}
4960
}

src/authzedapi/authzed/api/v1/core.ts

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

src/authzedapi/authzed/api/v1/debug.ts

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

0 commit comments

Comments
 (0)