Skip to content
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

Run prettier in individual workspaces #3925

Merged

Conversation

mehulkar
Copy link
Contributor

@mehulkar mehulkar commented Feb 22, 2023

This adds a lint:prettier task in each workspace so that we can get the benefits of a granular cache and when running prettier, we don't have to run it across the entire monorepo (notably the benchmark/ workspace which is very slow to run prettier on, and rarely changes -- an ideal candidate for a cache hit)

Note: adding this granularity immediately calls attention to the fact that we need some way to audit which workspaces may have forgotten to implement the script.

@turbo-orchestrator turbo-orchestrator bot added area: ci area: site 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 team: turbopack labels Feb 22, 2023
@vercel
Copy link

vercel bot commented Feb 22, 2023

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2023

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)
  • TurboRepo Rust tests

See workflow summary for details

@github-actions
Copy link
Contributor

Benchmark for 0f42e66

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 11.47ms ± 0.09ms 11.53ms ± 0.08ms +0.55%
bench_hmr_to_commit/Turbopack RCC/1000 modules 16.66ms ± 0.70ms 15.99ms ± 0.10ms -4.06%
bench_hmr_to_commit/Turbopack RSC/1000 modules 502.65ms ± 1.46ms 498.70ms ± 0.62ms -0.79%
bench_hmr_to_commit/Turbopack SSR/1000 modules 11.47ms ± 0.08ms 11.49ms ± 0.08ms +0.10%
bench_hmr_to_eval/Turbopack CSR/1000 modules 10.74ms ± 0.10ms 10.78ms ± 0.12ms +0.37%
bench_hmr_to_eval/Turbopack RCC/1000 modules 14.63ms ± 0.19ms 14.61ms ± 0.21ms -0.10%
bench_hmr_to_eval/Turbopack SSR/1000 modules 10.49ms ± 0.07ms 10.56ms ± 0.07ms +0.62%
bench_hydration/Turbopack RCC/1000 modules 3878.25ms ± 14.67ms 3854.33ms ± 13.45ms -0.62%
bench_hydration/Turbopack RSC/1000 modules 3540.80ms ± 17.59ms 3507.88ms ± 13.16ms -0.93%
bench_hydration/Turbopack SSR/1000 modules 3384.57ms ± 19.88ms 3353.17ms ± 8.68ms -0.93%
bench_startup/Turbopack CSR/1000 modules 2580.80ms ± 8.61ms 2574.54ms ± 11.16ms -0.24%
bench_startup/Turbopack RCC/1000 modules 2349.58ms ± 5.22ms 2356.91ms ± 7.31ms +0.31%
bench_startup/Turbopack RSC/1000 modules 2334.02ms ± 9.97ms 2326.55ms ± 10.16ms -0.32%
bench_startup/Turbopack SSR/1000 modules 2082.45ms ± 2.48ms 2076.60ms ± 2.55ms -0.28%

@mehulkar mehulkar marked this pull request as ready for review February 22, 2023 23:16
@mehulkar mehulkar requested review from a team as code owners February 22, 2023 23:16
@mehulkar mehulkar requested review from tknickman and NicholasLYang and removed request for a team February 22, 2023 23:16
turbo.json Outdated Show resolved Hide resolved
turbo.json Outdated Show resolved Hide resolved
Base automatically changed from mk/lint-task to main February 23, 2023 17:33
Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

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

@mehulkar checking in on this one - I can take another look once conflicts are resolved if we still want to get it in

@mehulkar mehulkar force-pushed the mehulkar/turbo-830-run-prettier-in-individual-workspaces branch from fcb3820 to d5ea4e6 Compare May 3, 2023 23:55
@mehulkar mehulkar force-pushed the mehulkar/turbo-830-run-prettier-in-individual-workspaces branch from d5ea4e6 to 1a9349b Compare May 3, 2023 23:57
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

✅ This change can build next-swc

@github-actions
Copy link
Contributor

Linux Benchmark for 1e1aeb9

Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 9405.07µs ± 81.40µs 8801.72µs ± 95.22µs -6.42% -2.71%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 9405.07µs ± 81.40µs 8801.72µs ± 95.22µs -6.42% -2.71%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7739.38µs ± 31.71µs 7717.54µs ± 85.60µs -0.28%
bench_startup/Turbopack CSR/1000 modules 926.77ms ± 2.34ms 933.55ms ± 5.22ms +0.73%

@socket-security
Copy link

New dependency changes detected. Learn more about Socket for GitHub ↗︎


🚨 Potential security issues found in this pull request. To accept the risk, merge this PR and you will not be notified again.

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

🧐 Potential typo squat

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Package 📎 Did you mean? Found in
[email protected] (added) lib-astr (1.2 million times more downloads) turborepo-tests/integration/tests/_fixtures/task_dependencies/complex/app-a/package.json, turborepo-tests/integration/tests/_fixtures/task_dependencies/complex/app-b/package.json via [email protected], turborepo-tests/integration/tests/_fixtures/task_dependencies/complex/lib-a/package.json via [email protected]
[email protected] (added) cmamacro (221 times more downloads) crates/turbopack/tests/node-file-trace/package.json, crates/turbopack/tests/node-file-trace/pnpm-lock.yaml
Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ⚠️ 2 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

@github-actions
Copy link
Contributor

Linux Benchmark for ca77034

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8219.53µs ± 29.85µs 8122.56µs ± 60.15µs -1.18%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7279.99µs ± 73.87µs 7486.65µs ± 363.32µs +2.84%
bench_startup/Turbopack CSR/1000 modules 868.95ms ± 1.74ms 880.92ms ± 5.30ms +1.38%

@github-actions
Copy link
Contributor

MacOS Benchmark for ca77034

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 8883.11ms ± 1849.28ms 2738.10ms ± 46.43ms -69.18% -45.40%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 25.87ms ± 0.13ms 26.33ms ± 0.25ms +1.78%
bench_hmr_to_eval/Turbopack CSR/1000 modules 23.10ms ± 0.96ms 24.19ms ± 0.19ms +4.72%
bench_startup/Turbopack CSR/1000 modules 8883.11ms ± 1849.28ms 2738.10ms ± 46.43ms -69.18% -45.40%

@github-actions
Copy link
Contributor

Windows Benchmark for ca77034

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 3821.59ms ± 13.27ms 4014.29ms ± 81.43ms +5.04% +0.09%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 16.15ms ± 0.09ms 15.96ms ± 0.10ms -1.18%
bench_hmr_to_eval/Turbopack CSR/1000 modules 15.70ms ± 0.05ms 15.64ms ± 0.03ms -0.39%
bench_startup/Turbopack CSR/1000 modules 3821.59ms ± 13.27ms 4014.29ms ± 81.43ms +5.04% +0.09%

@github-actions
Copy link
Contributor

Linux Benchmark for edb633f

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8652.24µs ± 33.18µs 8817.36µs ± 72.67µs +1.91%
bench_hmr_to_eval/Turbopack CSR/1000 modules 8358.30µs ± 85.38µs 8297.35µs ± 261.55µs -0.73%
bench_startup/Turbopack CSR/1000 modules 901.00ms ± 2.60ms 906.82ms ± 7.41ms +0.65%

@mehulkar
Copy link
Contributor Author

mehulkar commented Jun 2, 2023

The failing tests are because cli tests are running in the JS package workflow, when that workflow doesn't provision Go/Rust setup. This was reverted in 4e035e6, so this failure would be fine if I updated the branch. But I don't want to wait for another round of CI checks if I do that.

@mehulkar mehulkar merged commit 9ce240a into main Jun 2, 2023
@mehulkar mehulkar deleted the mehulkar/turbo-830-run-prettier-in-individual-workspaces branch June 2, 2023 03:19
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
This adds a `lint:prettier` task in each workspace so that we can get
the benefits of a granular cache and when running prettier, we don't
have to run it across the entire monorepo (notably the `benchmark/`
workspace which is very slow to run prettier on, and rarely changes --
an ideal candidate for a cache hit)
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
This adds a `lint:prettier` task in each workspace so that we can get
the benefits of a granular cache and when running prettier, we don't
have to run it across the entire monorepo (notably the `benchmark/`
workspace which is very slow to run prettier on, and rarely changes --
an ideal candidate for a cache hit)
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
This adds a `lint:prettier` task in each workspace so that we can get
the benefits of a granular cache and when running prettier, we don't
have to run it across the entire monorepo (notably the `benchmark/`
workspace which is very slow to run prettier on, and rarely changes --
an ideal candidate for a cache hit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ci area: site 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 pkg: turbo-workspaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants