-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Factor out ReadTurboConfig method #3368
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
7 Ignored Deployments
|
🟢 CI successful 🟢Thanks |
We need this method to be able to read arbitrary turbo.json files and not fallback on package.json config or synthesizing one from the package.json
b1254ba
to
73736ea
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.
Overall looks good to me as long as error message change was unintentional.
// If there's no turbo.json and no turbo key in package.json, return an error. | ||
return nil, errors.Wrapf(os.ErrNotExist, "Could not find %s. Follow directions at https://turbo.build/repo/docs to create one", configFile) | ||
// If there's no turbo.json, return an error. | ||
return nil, errors.Wrapf(os.ErrNotExist, "Could not find %s", configFile) |
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.
Was there a reason to drop the link to the docs? It's causing the unit tests to fail.
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.
The goal was to make it more general purpose since this method will be used for turbo.json's other than the root one. But let me double check we didn't lose the error message for the existing use case.
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.
Great catch, it's back now.
We need this method to be able to read arbitrary turbo.json files and not fallback on package.json config or synthesizing one from the package.json.
Some work extracted from #2706.