-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Makefile with turborepo #1194
Conversation
Signed-off-by: Timo Stamm <ts@timostamm.de>
And task name in fix ci.yaml And fix Node version in workflows Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
…h the task "conformance" Signed-off-by: Timo Stamm <ts@timostamm.de>
…h the task "conformance" Signed-off-by: Timo Stamm <ts@timostamm.de>
@@ -32,7 +32,7 @@ export function replaceDependencies( | |||
): PackageJson | null { | |||
const modifiedPackageNames = new Set<string>(); | |||
const replacedPackageNames = new Map<string, string>(); | |||
const copy = structuredClone(pkg) as PackageJson; | |||
const copy = clonePackageJson(pkg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed when running tests in a matrix:
structuredClone
is not available in Node.js 16, but the package advertises compatibility. This fixes the issue.
packages/connect-web/turbo.json
Outdated
"conformance": { | ||
"dependsOn": [ | ||
"conformance:node:promise", | ||
"conformance:node:callback" | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the task "conformance", we run tests for @connectrpc/connect-web only on Node.js. Since browsers may not be available on the developer's machine, it seems more friendly to make this an opt in.
In effect, npm run all
will run everything but tests on browsers, browserstack, and cloudflare.
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: "npm" | ||
- uses: actions/cache@v4 | ||
with: | ||
path: .turbo | ||
key: ${{ runner.os }}/test/${{ github.sha }} | ||
restore-keys: ${{ runner.os }}/test | ||
- run: npm ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code block seems to be repeated, we can use a composite action instead an use that as a single step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but a composite action is only 20 lines shorter overall. Switched to a matrix instead in 225881e.
Signed-off-by: Timo Stamm <ts@timostamm.de>
58ed288
to
225881e
Compare
turborepo gives us more control over running tasks in a monorepo, and it caches quite nicely.
For example, when a task is run from a package directory, all its prerequisites run automatically:
Closes #798.