这是indexloc提供的服务,不要输入任何密码
Skip to content

refactor(turborepo): Factored out API Client crate #4388

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

Merged

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Mar 29, 2023

Description

Factored out the API client into a separate crate so that we can use the API client without importing all of turborepo-lib. Also makes turborepo-lib less monolithic.

Testing Instructions

@vercel
Copy link

vercel bot commented Mar 29, 2023

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

Name Status Preview Comments Updated (UTC)
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2023 9:02pm
10 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-nonmonorepo ⬜️ Ignored (Inspect) Apr 5, 2023 9:02pm
examples-svelte-web ⬜️ Ignored (Inspect) Apr 5, 2023 9:02pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Apr 5, 2023 9:02pm

@vercel
Copy link

vercel bot commented Mar 29, 2023

@NicholasLYang is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

let client = match timeout {
Some(timeout) => reqwest::Client::builder()
.timeout(std::time::Duration::from_secs(timeout))
.build()?,
None => reqwest::Client::builder().build()?,
};

let user_agent = format!(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We make user_agent a field in APIClient so that turborepo-lib can pass the version info instead of having turborepo-api-client have a dependency on get_version. That way we don't have to share get_version between turborepo-api-client and turborepo-lib.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a good choice.

@NicholasLYang NicholasLYang marked this pull request as ready for review March 29, 2023 22:56
@NicholasLYang NicholasLYang requested review from a team as code owners March 29, 2023 22:56
@NicholasLYang NicholasLYang force-pushed the refactor/separate-api-crate branch from 5b7863e to bd35500 Compare March 29, 2023 22:56
@turbo-orchestrator turbo-orchestrator bot added pkg: create-turbo Issues related to npx create-turbo pkg: turbo-codemod pkg: turbo-eslint eslint-config-turbo and eslint-plugin-turbo pkg: turbo-ignore packages/turbo-ignore labels Apr 5, 2023
@NicholasLYang NicholasLYang force-pushed the refactor/separate-api-crate branch from 16a692d to b9443e4 Compare April 5, 2023 19:47
@turbo-orchestrator turbo-orchestrator bot removed pkg: create-turbo Issues related to npx create-turbo pkg: turbo-ignore packages/turbo-ignore pkg: turbo-eslint eslint-config-turbo and eslint-plugin-turbo pkg: turbo-codemod labels Apr 5, 2023
@NicholasLYang NicholasLYang enabled auto-merge (squash) April 5, 2023 20:14
@NicholasLYang NicholasLYang added the pr: automerge Kodiak will merge these automatically after checks pass label Apr 5, 2023
@NicholasLYang NicholasLYang merged commit b71067e into vercel:main Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ci pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants