-
Notifications
You must be signed in to change notification settings - Fork 282
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
chore(repo): Scoping Turborepo task inputs #1882
Conversation
🦋 Changeset detectedLatest commit: 25b5840 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Small typo
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.
I love that you're using the per-workspace turbo.json
files here!
c64e8e6
to
4be2951
Compare
4be2951
to
201750e
Compare
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.
One question about the dependsOn
change for lint
, otherwise this looks pretty good. Nice improvement!
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Speed up DX by scoping down the Turborepo inputs on particular tasks.
As-is, any changed file in a package results in Turborepo marking that package as altered. That slows down the DX as it requires a task (and, potentially, dependent tasks) to be re-run every time.
This PR ensures that only the relevant files are considered when Turborepo is making that determination.
There are a number of useful cases for this, like speeding up the turnaround time for developers running tasks like
npm run test
.The convoluted example below might not seem like much, but it all adds up, especially, when the dependent tasks are further up the dependency graph.
Example:
You're testing a change you made to
@clerk/clerk-sdk-node
directly and your editing only your tests.Current
You run
npm run test -- --filter=@clerk/clerk-sdk-node
:Because all files are considered for the dependent
build
task, it's also re-run:@clerk/clerk-sdk-node:build
(runs)@clerk/clerk-sdk-node:test
(runs)New
You run
npm run test -- --filter=@clerk/clerk-sdk-node
:Because only required files are considered for the dependent
build
, it isn't re-run:@clerk/clerk-sdk-node:build
(cached)@clerk/clerk-sdk-node:test
(runs)Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change
Packages affected
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
@clerk/chrome-extension
gatsby-plugin-clerk
build/tooling/chore