Skip to content

Commit a27d490

Browse files
Update to Connect v2
1 parent 460c6f8 commit a27d490

21 files changed

+7720
-1554
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
- uses: pnpm/action-setup@v4
1010
- uses: actions/setup-node@v4
1111
with:
12-
node-version: '20'
12+
node-version: '22'
1313
cache: pnpm
1414
- run: pnpm install --frozen-lockfile
15-
- run: pnpm fmt:check
15+
- run: pnpm lint
1616
- run: pnpm type-check
1717
- run: pnpm build

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/settings.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
"npm.packageManager": "pnpm",
33
"typescript.enablePromptUseWorkspaceTsdk": true,
44
"typescript.tsdk": "node_modules/typescript/lib",
5-
"prettier.prettierPath": "node_modules/prettier/index.cjs",
5+
"editor.defaultFormatter": "biomejs.biome",
66
"editor.codeActionsOnSave": {
7-
"source.fixAll.eslint": "explicit"
7+
"source.fixAll.biome": "explicit",
8+
"source.organizeImports.biome": "explicit"
89
},
9-
"eslint.lintTask.enable": true,
10-
"eslint.lintTask.options": "--cache --cache-location node_modules/.cache/.eslintcache ."
10+
"[json]": {
11+
"editor.defaultFormatter": "biomejs.biome"
12+
},
13+
"[typescript]": {
14+
"editor.defaultFormatter": "biomejs.biome"
15+
}
1116
}

biome.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
4+
"files": { "ignoreUnknown": false, "ignore": ["example/worker-configuration.d.ts"] },
5+
"formatter": {
6+
"enabled": true,
7+
"useEditorconfig": true,
8+
"formatWithErrors": false,
9+
"indentStyle": "space",
10+
"indentWidth": 2,
11+
"lineEnding": "lf",
12+
"lineWidth": 120,
13+
"attributePosition": "auto",
14+
"bracketSpacing": true,
15+
"ignore": ["**/pnpm-lock.yaml"]
16+
},
17+
"organizeImports": { "enabled": true },
18+
"linter": { "enabled": true, "rules": { "recommended": true } },
19+
"javascript": {
20+
"formatter": {
21+
"jsxQuoteStyle": "double",
22+
"quoteProperties": "asNeeded",
23+
"trailingCommas": "all",
24+
"semicolons": "asNeeded",
25+
"arrowParentheses": "always",
26+
"bracketSameLine": false,
27+
"quoteStyle": "single",
28+
"attributePosition": "auto",
29+
"bracketSpacing": false
30+
}
31+
}
32+
}

example/.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/buf.gen.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
version: v1
1+
version: v2
2+
clean: true
23
plugins:
3-
- name: es
4-
out: src/proto
5-
opt:
6-
- target=ts
7-
- import_extension=none
8-
- name: connect-es
4+
- local: protoc-gen-es
95
out: src/proto
6+
include_imports: true
107
opt:
118
- target=ts
129
- import_extension=none

example/buf.work.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

example/buf.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: v2
2+
modules:
3+
- path: proto
4+
lint:
5+
use:
6+
- DEFAULT
7+
except:
8+
- FIELD_NOT_REQUIRED
9+
- PACKAGE_NO_IMPORT_CYCLE
10+
breaking:
11+
use:
12+
- FILE
13+
except:
14+
- EXTENSION_NO_DELETE
15+
- FIELD_SAME_DEFAULT

example/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
"type-check": "tsc --noEmit"
99
},
1010
"dependencies": {
11-
"@bufbuild/protobuf": "1.10.0",
12-
"@cloudflare/workers-types": "^4.20240925.0",
13-
"@connectrpc/connect": "^1.5.0",
14-
"@connectrpc/connect-node": "^1.5.0"
11+
"@bufbuild/protobuf": "2.2.5",
12+
"@cloudflare/workers-types": "^4.20250502.0",
13+
"@connectrpc/connect": "^2.0.2",
14+
"@connectrpc/connect-node": "^2.0.2"
1515
},
1616
"devDependencies": {
17-
"@bufbuild/protoc-gen-es": "1.10.0",
18-
"@connectrpc/protoc-gen-connect-es": "^1.5.0",
19-
"@types/node": "^22.7.4",
20-
"tsx": "^4.19.1",
21-
"typescript": "^5.6.2",
22-
"wrangler": "^3.78.12"
17+
"@bufbuild/protoc-gen-es": "2.2.5",
18+
"@types/node": "^22.15.3",
19+
"tsx": "^4.19.4",
20+
"typescript": "^5.8.3",
21+
"wrangler": "^4.14.1"
2322
}
2423
}

0 commit comments

Comments
 (0)