Skip to content

Conversation

mehulkar
Copy link
Contributor

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.

@vercel
Copy link
Contributor

vercel bot commented Jan 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-basic-web 🔄 Building (Inspect) Jan 19, 2023 at 0:14AM (UTC)
examples-cra-web 🔄 Building (Inspect) Jan 19, 2023 at 0:14AM (UTC)
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 19, 2023 at 0:14AM (UTC)
7 Ignored Deployments
Name Status Preview Comments Updated
examples-designsystem-docs ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 0:14AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2023

🟢 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
@mehulkar mehulkar marked this pull request as ready for review January 18, 2023 21:28
@mehulkar mehulkar requested a review from a team as a code owner January 18, 2023 21:28
Copy link
Contributor

@chris-olszewski chris-olszewski left a 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)
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants