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

Add user-agent header with turbo version and os info #109

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
merged 2 commits into from
Dec 7, 2021
Merged

Conversation

jaredpalmer
Copy link
Contributor

@jaredpalmer jaredpalmer commented Dec 7, 2021

Close #87

This adds the turbo version and os information as follows to the User-Agent HTTP headers in the api client:

turbo :version :goversion :os (:arch)

for my mac m1, on turbo v0.9.0-next.1 this will be:

turbo v0.9.0-next.1 go1.17.2 darwin (arm64)

It uses version.txt/package.json version (which is set at build time), runtime.Version(), runtime.GOOS, and runtime.GOARCH for the values.

This is modeled after vercel cli here: https://github.com/vercel/vercel/blob/main/packages/cli/src/util/ua.ts

@vercel
Copy link

vercel bot commented Dec 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/9AcySw8byTRveM3p3DL98evff4Un
✅ Preview: https://turbo-site-git-user-agent.vercel.sh

@jaredpalmer jaredpalmer requested a review from gaspar09 December 7, 2021 19:20
@jaredpalmer jaredpalmer merged commit 643c6f3 into main Dec 7, 2021
@jaredpalmer jaredpalmer deleted the user-agent branch December 7, 2021 19:55
sokra added a commit that referenced this pull request Oct 25, 2022
sokra added a commit that referenced this pull request Oct 25, 2022
Closes #109

Note a difference between this and stable Next.js: at turbopack this
file is placed in .next/server/package.json, while Next.js currently
creates this file at .next/package.json.

Test Plan: Verified that the `hello-world-esm` no longer fails to SSR
(it's now blocked by #111).

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
…urborepo#145)

Closes vercel/turborepo#109

Note a difference between this and stable Next.js: at turbopack this
file is placed in .next/server/package.json, while Next.js currently
creates this file at .next/package.json.

Test Plan: Verified that the `hello-world-esm` no longer fails to SSR
(it's now blocked by vercel/turborepo#111).

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
sokra added a commit to vercel/next.js that referenced this pull request Mar 13, 2023
…urborepo#145)

Closes vercel/turborepo#109

Note a difference between this and stable Next.js: at turbopack this
file is placed in .next/server/package.json, while Next.js currently
creates this file at .next/package.json.

Test Plan: Verified that the `hello-world-esm` no longer fails to SSR
(it's now blocked by vercel/turborepo#111).

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
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.

1 participant