Skip to content

Commit

Permalink
Fix circular dependencies and migrate to turbo (#151)
Browse files Browse the repository at this point in the history
Finally got fed up with the build/test cycle not doing what I wanted.
Matching format of connectrpc/connect-playwright

- Remove requirement to manually test plugins
- Fixed circular dependencies and migrated to turbo
- More turbo
  • Loading branch information
paul-sachs authored Sep 7, 2023
1 parent 524b051 commit 051a215
Show file tree
Hide file tree
Showing 19 changed files with 124 additions and 704 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ jobs:
run: pnpm run generate

- name: Lint
run: pnpm run lint
run: pnpm run format

- name: Test
run: pnpm run test

- name: Check changed files
id: check_changed_files
run: |
git diff --name-only --exit-code
- name: Report errors
if: steps.check_changed_files.conclusion == 'failure'
run: echo "::error::Formatting errors found. Please run 'pnpm run format' and commit the changes."
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
node_modules
/packages/*/dist
/packages/*/coverage
*.tsbuildinfo
*.tsbuildinfo
.turbo

!/packages/generated-react/dist
/packages/generated-react/dist/descriptorset.bin
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
"name": "root",
"repository": "[email protected]:connectrpc/connect-query-es.git",
"scripts": {
"build": "pnpm --recursive build",
"generate": "pnpm --recursive generate",
"test": "pnpm --recursive test",
"lint": "pnpm run lint:code && pnpm run lint:markdown && pnpm run lint:spelling",
"lint:fix": "pnpm run lint:code:fix && pnpm run lint:markdown:fix && pnpm run lint:spelling",
"lint:markdown": "markdownlint-cli2 \"**/*.md\" \"#**/node_modules\"",
"lint:markdown:fix": "markdownlint-cli2-fix \"**/*.md\" \"#**/node_modules\"",
"lint:spelling": "cspell \"**\" --gitignore",
"lint:code": "eslint . && prettier . --check && license-header --check",
"lint:code:fix": "eslint . --fix && prettier . --write && license-header",
"all": "pnpm run build && pnpm run generate && pnpm run lint:fix && pnpm run test",
"update-all": "pnpm outdated --recursive || pnpm update --recursive --latest && pnpm outdated --recursive"
"build": "turbo run build",
"generate": "turbo run generate",
"test": "turbo run test",
"format": "turbo run format:all",
"format:all": "pnpm run format:code && pnpm run format:markdown && pnpm run check:spelling",
"format:markdown": "markdownlint-cli2-fix \"**/*.md\" \"#**/node_modules\"",
"check:spelling": "cspell \"**\" --gitignore",
"format:code": "eslint . --fix && prettier . --write && license-header",
"all": "turbo run build generate format:all test",
"update-all": "pnpm update --recursive --latest"
},
"license": "Apache-2.0",
"licenseHeader": {
Expand Down Expand Up @@ -46,6 +44,7 @@
"prettier": "3.0.2",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"turbo": "^1.10.13",
"typescript": "5.1.6"
},
"engineStrict": true,
Expand Down
1 change: 0 additions & 1 deletion packages/generated-react/.gitignore

This file was deleted.

Binary file removed packages/generated-react/dist/descriptorset.bin
Binary file not shown.
15 changes: 7 additions & 8 deletions packages/generated-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@
"clean": "rm -rf dist",
"generate": "pnpm run clean && pnpm run generate:code && pnpm run generate:descriptorset",
"generate:code": "pnpm buf generate --path eliza.proto --path example.proto",
"generate:descriptorset": "pnpm buf build --path eliza.proto --path example.proto --output dist/descriptorset.bin",
"license-header": "license-header"
"generate:descriptorset": "pnpm buf build --path eliza.proto --path example.proto --output dist/descriptorset.bin"
},
"dependencies": {
"@bufbuild/buf": "1.26.1",
"@connectrpc/connect": "^0.13.1",
"@connectrpc/connect-query": "workspace:*",
"@bufbuild/protobuf": "^1.3.0",
"@connectrpc/protoc-gen-connect-es": "^0.13.1",
"@connectrpc/protoc-gen-connect-query": "workspace:*",
"@connectrpc/protoc-gen-connect-query-react": "workspace:*",
"@bufbuild/protoc-gen-es": "^1.3.0",
"@tanstack/react-query": "^4.32.6"
"@connectrpc/protoc-gen-connect-query-react": "workspace:*"
},
"peerDependencies": {
"@connectrpc/connect-query": "*",
"@bufbuild/protobuf": "*",
"@connectrpc/connect": "*"
},
"preferUnplugged": true
}
23 changes: 0 additions & 23 deletions packages/protoc-gen-connect-query-react/jest.config.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/protoc-gen-connect-query-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@
},
"scripts": {
"clean": "rm -rf dist",
"test": "jest",
"build": "pnpm clean && tsc --project tsconfig.build.json"
},
"preferUnplugged": true,
"devDependencies": {
"@connectrpc/protoc-gen-connect-es": "^0.13.1",
"@connectrpc/protoc-gen-connect-query": "workspace:*",
"@bufbuild/protoc-gen-es": "^1.3.0",
"generated-react": "workspace:*",
"typescript": "^5.1.6"
},
"dependencies": {
Expand Down
97 changes: 0 additions & 97 deletions packages/protoc-gen-connect-query-react/src/generateDts.test.ts

This file was deleted.

Loading

0 comments on commit 051a215

Please sign in to comment.