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

make sure that removing collectibles will cleanup helper entries #2872

Merged
merged 4 commits into from
Dec 5, 2022

Conversation

sokra
Copy link
Member

@sokra sokra commented Nov 30, 2022

No description provided.

@vercel
Copy link

vercel bot commented Nov 30, 2022

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

Name Status Preview Comments Updated
examples-nonmonorepo 🔄 Building (Inspect) Dec 5, 2022 at 0:47AM (UTC)
7 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Dec 5, 2022 at 0:47AM (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2022 at 0:47AM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Dec 5, 2022 at 0:47AM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Dec 5, 2022 at 0:47AM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2022 at 0:47AM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Dec 5, 2022 at 0:47AM (UTC)
turbo-site ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2022 at 0:47AM (UTC)

@github-actions
Copy link
Contributor

Benchmark for 3d9b803

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8446.39µs ± 63.75µs 8431.07µs ± 34.02µs -0.18%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8864.74µs ± 40.38µs 8921.15µs ± 72.21µs +0.64%
bench_hmr_to_commit/Turbopack RSC/1000 modules 785.71ms ± 9.29ms 795.03ms ± 7.49ms +1.19%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8563.12µs ± 60.55µs 8532.94µs ± 55.88µs -0.35%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7490.34µs ± 44.98µs 7490.96µs ± 54.12µs +0.01%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7666.80µs ± 62.56µs 7644.09µs ± 50.20µs -0.30%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7519.60µs ± 54.52µs 7533.73µs ± 26.74µs +0.19%
bench_hydration/Turbopack RCC/1000 modules 4114.60ms ± 63.56ms 3958.26ms ± 98.68ms -3.80%
bench_hydration/Turbopack RSC/1000 modules 2755.62ms ± 45.31ms 2754.96ms ± 31.87ms -0.02%
bench_hydration/Turbopack SSR/1000 modules 2909.22ms ± 20.82ms 2883.80ms ± 25.54ms -0.87%
bench_startup/Turbopack CSR/1000 modules 1600.14ms ± 4.94ms 1582.56ms ± 6.02ms -1.10%
bench_startup/Turbopack RCC/1000 modules 3044.01ms ± 83.69ms 3175.18ms ± 88.10ms +4.31%
bench_startup/Turbopack RSC/1000 modules 2394.23ms ± 35.09ms 2426.24ms ± 31.31ms +1.34%
bench_startup/Turbopack SSR/1000 modules 2126.68ms ± 32.80ms 2038.99ms ± 20.36ms -4.12%

@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2022

🟢 CI successful 🟢

Thanks

@sokra sokra marked this pull request as ready for review November 30, 2022 13:38
@sokra sokra requested a review from a team as a code owner November 30, 2022 13:38
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2022

Benchmark for dec321f

Test Base PR % Significant %
bench_startup/Turbopack SSR/1000 modules 2407.35ms ± 4.63ms 2387.16ms ± 3.04ms -0.84% -0.20%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 7701.61µs ± 30.73µs 7649.34µs ± 34.22µs -0.68%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8145.88µs ± 54.40µs 8056.09µs ± 103.45µs -1.10%
bench_hmr_to_commit/Turbopack RSC/1000 modules 857.31ms ± 27.07ms 919.80ms ± 33.60ms +7.29%
bench_hmr_to_commit/Turbopack SSR/1000 modules 7897.85µs ± 73.52µs 7977.68µs ± 64.84µs +1.01%
bench_hmr_to_eval/Turbopack CSR/1000 modules 6869.79µs ± 52.55µs 6917.43µs ± 55.91µs +0.69%
bench_hmr_to_eval/Turbopack RCC/1000 modules 6994.40µs ± 101.52µs 6980.84µs ± 71.83µs -0.19%
bench_hmr_to_eval/Turbopack SSR/1000 modules 6927.38µs ± 61.05µs 6933.86µs ± 51.57µs +0.09%
bench_hydration/Turbopack RCC/1000 modules 3726.04ms ± 62.06ms 3667.07ms ± 34.35ms -1.58%
bench_hydration/Turbopack RSC/1000 modules 2797.51ms ± 32.83ms 2794.90ms ± 41.09ms -0.09%
bench_hydration/Turbopack SSR/1000 modules 3239.32ms ± 43.09ms 3217.79ms ± 25.35ms -0.66%
bench_startup/Turbopack CSR/1000 modules 1513.97ms ± 8.27ms 1511.63ms ± 5.81ms -0.15%
bench_startup/Turbopack RCC/1000 modules 2702.54ms ± 56.35ms 2588.20ms ± 40.36ms -4.23%
bench_startup/Turbopack RSC/1000 modules 2345.76ms ± 46.57ms 2368.54ms ± 60.35ms +0.97%
bench_startup/Turbopack SSR/1000 modules 2407.35ms ± 4.63ms 2387.16ms ± 3.04ms -0.84% -0.20%

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2022

Benchmark for 11f6e20

Test Base PR % Significant %
bench_startup/Turbopack CSR/1000 modules 1560.52ms ± 3.60ms 1532.67ms ± 6.57ms -1.78% -0.48%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 7860.95µs ± 38.91µs 7858.82µs ± 67.39µs -0.03%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8108.62µs ± 46.49µs 8271.65µs ± 69.79µs +2.01%
bench_hmr_to_commit/Turbopack RSC/1000 modules 916.90ms ± 24.22ms 873.14ms ± 20.25ms -4.77%
bench_hmr_to_commit/Turbopack SSR/1000 modules 7931.15µs ± 51.11µs 7988.58µs ± 48.92µs +0.72%
bench_hmr_to_eval/Turbopack CSR/1000 modules 6938.37µs ± 32.89µs 6964.07µs ± 47.28µs +0.37%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7133.16µs ± 57.47µs 7135.72µs ± 63.90µs +0.04%
bench_hmr_to_eval/Turbopack SSR/1000 modules 6990.28µs ± 50.38µs 7028.46µs ± 46.48µs +0.55%
bench_hydration/Turbopack RCC/1000 modules 3849.85ms ± 59.79ms 3680.93ms ± 37.72ms -4.39%
bench_hydration/Turbopack RSC/1000 modules 2802.61ms ± 39.11ms 2745.45ms ± 30.98ms -2.04%
bench_hydration/Turbopack SSR/1000 modules 3190.15ms ± 26.09ms 3194.25ms ± 29.39ms +0.13%
bench_startup/Turbopack CSR/1000 modules 1560.52ms ± 3.60ms 1532.67ms ± 6.57ms -1.78% -0.48%
bench_startup/Turbopack RCC/1000 modules 2828.56ms ± 59.86ms 2850.15ms ± 44.36ms +0.76%
bench_startup/Turbopack RSC/1000 modules 2340.19ms ± 35.97ms 2434.46ms ± 53.52ms +4.03%
bench_startup/Turbopack SSR/1000 modules 2407.52ms ± 29.66ms 2460.54ms ± 5.86ms +2.20%

@sokra sokra added the pr: automerge Kodiak will merge these automatically after checks pass label Dec 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

Benchmark for a8516ff

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8387.13µs ± 59.84µs 8424.87µs ± 30.97µs +0.45%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8756.27µs ± 64.07µs 8735.85µs ± 68.17µs -0.23%
bench_hmr_to_commit/Turbopack RSC/1000 modules 809.79ms ± 6.47ms 835.74ms ± 12.63ms +3.21%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8506.26µs ± 69.99µs 8418.68µs ± 52.65µs -1.03%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7457.03µs ± 59.56µs 7428.43µs ± 69.26µs -0.38%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7594.81µs ± 78.89µs 7599.19µs ± 59.08µs +0.06%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7482.55µs ± 72.75µs 7440.06µs ± 35.60µs -0.57%
bench_hydration/Turbopack RCC/1000 modules 3685.84ms ± 31.78ms 3742.15ms ± 52.56ms +1.53%
bench_hydration/Turbopack RSC/1000 modules 2789.96ms ± 51.44ms 2785.87ms ± 37.74ms -0.15%
bench_hydration/Turbopack SSR/1000 modules 3238.40ms ± 11.93ms 3205.75ms ± 30.14ms -1.01%
bench_startup/Turbopack CSR/1000 modules 1541.55ms ± 5.79ms 1531.69ms ± 4.08ms -0.64%
bench_startup/Turbopack RCC/1000 modules 2807.50ms ± 27.09ms 2771.75ms ± 36.29ms -1.27%
bench_startup/Turbopack RSC/1000 modules 2443.67ms ± 41.75ms 2432.67ms ± 55.51ms -0.45%
bench_startup/Turbopack SSR/1000 modules 2466.37ms ± 23.81ms 2474.25ms ± 30.67ms +0.32%

@kodiakhq kodiakhq bot merged commit e1bf5e2 into main Dec 5, 2022
@kodiakhq kodiakhq bot deleted the mem/cleaup-collectibles branch December 5, 2022 13:32
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

Benchmark for 75bfee0

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8467.23µs ± 60.77µs 8408.54µs ± 61.50µs -0.69%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8811.34µs ± 78.81µs 8729.90µs ± 77.26µs -0.92%
bench_hmr_to_commit/Turbopack RSC/1000 modules 880.59ms ± 14.73ms 896.33ms ± 19.10ms +1.79%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8480.49µs ± 78.05µs 8536.76µs ± 37.20µs +0.66%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7363.97µs ± 63.34µs 7463.43µs ± 64.32µs +1.35%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7528.36µs ± 44.96µs 7565.53µs ± 57.29µs +0.49%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7528.72µs ± 49.99µs 7535.24µs ± 46.42µs +0.09%
bench_hydration/Turbopack RCC/1000 modules 3538.03ms ± 34.83ms 3562.50ms ± 29.61ms +0.69%
bench_hydration/Turbopack RSC/1000 modules 2694.31ms ± 29.25ms 2774.26ms ± 46.42ms +2.97%
bench_hydration/Turbopack SSR/1000 modules 3074.81ms ± 31.92ms 3078.67ms ± 12.30ms +0.13%
bench_startup/Turbopack CSR/1000 modules 1502.60ms ± 2.87ms 1495.72ms ± 4.93ms -0.46%
bench_startup/Turbopack RCC/1000 modules 2709.36ms ± 30.05ms 2643.87ms ± 30.40ms -2.42%
bench_startup/Turbopack RSC/1000 modules 2315.63ms ± 34.07ms 2371.26ms ± 31.32ms +2.40%
bench_startup/Turbopack SSR/1000 modules 2398.63ms ± 7.81ms 2369.27ms ± 24.21ms -1.22%

NicholasLYang added a commit to NicholasLYang/turbo that referenced this pull request Dec 5, 2022
commit 096b8b8
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (vercel#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit e39d65e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (vercel#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 6b99818
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (vercel#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ce4c445
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (vercel#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit e1bf5e2
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (vercel#2872)

commit 532eff7
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (vercel#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on vercel#2416

commit dc36fc4
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (vercel#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (vercel#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 1e81806
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (vercel#2873)

    Reduces memory usage by 14%

commit cac79bb
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (vercel#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (vercel#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (vercel#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 6478d61
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (vercel#2916)

    updating in hope that this fixes the random errors in test runs

commit b7bcfc3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (vercel#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&vercel#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&vercel#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&vercel#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&vercel#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&vercel#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&vercel#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&vercel#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&vercel#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&vercel#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&vercel#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&vercel#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&vercel#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&vercel#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&vercel#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&vercel#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&vercel#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&vercel#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&vercel#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&vercel#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&vercel#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (vercel#2879)

    * Docs for topology outside of a task

    Documentation for behavior in vercel#2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (vercel#2913)

commit 0723170
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (vercel#2912)

commit c69298c
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (vercel#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 6965cb8
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (vercel#2886)

commit 4a3cb94
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (vercel#2884)

commit eead906
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (vercel#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (vercel#2904)

    Before vercel#2859:
    `eslint --quiet --fix`

    After vercel#2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (vercel#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit 9359c46
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (vercel#2899)

commit 22c1440
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (vercel#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (vercel#2897)
chris-olszewski added a commit that referenced this pull request Dec 8, 2022
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (#2668)

* feat(docs): new authors & consistent filesnames (#2680)

* Added caveat to environment variables docs (#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (#2681)

* change from yarn to pnpm (#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* add build turbo GH action to use across workflows

* use correct build target

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit e39d65e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 6b99818
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ce4c445
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit e1bf5e2
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (#2872)

commit 532eff7
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on #2416

commit dc36fc4
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 1e81806
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (#2873)

    Reduces memory usage by 14%

commit cac79bb
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 6478d61
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (#2916)

    updating in hope that this fixes the random errors in test runs

commit b7bcfc3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (#2879)

    * Docs for topology outside of a task

    Documentation for behavior in #2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (#2913)

commit 0723170
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (#2912)

commit c69298c
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 6965cb8
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (#2886)

commit 4a3cb94
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (#2884)

commit eead906
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (#2904)

    Before #2859:
    `eslint --quiet --fix`

    After #2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit 9359c46
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (#2899)

commit 22c1440
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* bump timeout on jobs that need to build turborepo

* use prebuilt turbo for e2e tests

* change when turbo is built

* add turbo_tasks State (#2935)

add mark_stateful() method to make tasks with state

* @next/font [1/n] Add query structure to module requests (#2743)

* Add query structure to module requests

* Update crates/next-dev/src/lib.rs

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* add memory usage tracking (#2865)

* @next/font [2/n] Apply next/font swc transform  (#2742)

* Check in next-font transform from Next.js repo

* Use next-font transform

* Run transform via custom rule

* Place next/font transform behind cargo feature

* Remove unused dependencies (#2934)

* Remove unused dependencies

* Add back lazy static as a dev dep

* Add back bench dependencies

* skip enabling corepack when building turborepo

* Disabled corepack on other node setup action

* explicitly disable corepack for examples

* nvm

* bump timemout for go unit

* I am once again trying to get CI to work

* force gnu compiler on windows

* fix shim build script

* fix lockfile

* use gcc on windows instead of clang

* fix shim

* first pass at splitting out shim to library crate

* change rust test workflow to not run turbo tests

* replace module tests with integration tests

* add readme and docs

* normalize paths in integration test

* Update crates/turborepo-lib/README.md

Co-authored-by: Nicholas Yang <nick@nicholasyang.com>

* Fix Cargo.lock

* fix clippy warnings

* extend timeout for running examples

* Set installed toolchain as default

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: Will Binns-Smith <wbinnssmith@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
tknickman added a commit that referenced this pull request Dec 13, 2022
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (#2668)

* feat(docs): new authors & consistent filesnames (#2680)

* Added caveat to environment variables docs (#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (#2681)

* change from yarn to pnpm (#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit e39d65e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 6b99818
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ce4c445
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit e1bf5e2
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (#2872)

commit 532eff7
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on #2416

commit dc36fc4
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 1e81806
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (#2873)

    Reduces memory usage by 14%

commit cac79bb
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 6478d61
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (#2916)

    updating in hope that this fixes the random errors in test runs

commit b7bcfc3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (#2879)

    * Docs for topology outside of a task

    Documentation for behavior in #2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (#2913)

commit 0723170
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (#2912)

commit c69298c
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 6965cb8
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (#2886)

commit 4a3cb94
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (#2884)

commit eead906
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (#2904)

    Before #2859:
    `eslint --quiet --fix`

    After #2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit 9359c46
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (#2899)

commit 22c1440
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* Moving shim to crates/turborepo

* More refactoring

* First pass at splitting up shim and cli

* Fixing tests

* Added detection for help flag so users can get help outside of a valid repo

* Update crates/turborepo-lib/src/shim.rs

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Update crates/turborepo/Cargo.toml

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* PR feedback and test fixing

* Set process's cwd

* Have to do inference even with TURBO_BINARY_PATH

* Comments

* PR feedback

* Moved single_package back to RunArgs

* Removed print

* Fixing bugs

* Fixing rust tests

* fixing bug with verbosity and Go tests

* add local turbo version checking

* remove ffi inclusion

* Fixed integration tests

* Linting fixes

* Integrated local_turbo_supports_skip_shim

* Fixed bug with cwd and restored yarn.lock

* Okay back to setting current_dir

* Fixed bug with canonicalization

* Removed print
starting

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
chris-olszewski added a commit that referenced this pull request Dec 13, 2022
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (#2668)

* feat(docs): new authors & consistent filesnames (#2680)

* Added caveat to environment variables docs (#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (#2681)

* change from yarn to pnpm (#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit e39d65e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 6b99818
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ce4c445
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit e1bf5e2
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (#2872)

commit 532eff7
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on #2416

commit dc36fc4
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 1e81806
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (#2873)

    Reduces memory usage by 14%

commit cac79bb
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/b7bcfc312e41367e2ec7f5fb37a6ee88a6b6545a/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91e
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 6478d61
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (#2916)

    updating in hope that this fixes the random errors in test runs

commit b7bcfc3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (#2879)

    * Docs for topology outside of a task

    Documentation for behavior in #2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (#2913)

commit 0723170
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (#2912)

commit c69298c
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 6965cb8
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (#2886)

commit 4a3cb94
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (#2884)

commit eead906
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (#2904)

    Before #2859:
    `eslint --quiet --fix`

    After #2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit 9359c46
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (#2899)

commit 22c1440
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* Moving shim to crates/turborepo

* More refactoring

* First pass at splitting up shim and cli

* Fixing tests

* Added detection for help flag so users can get help outside of a valid repo

* Update crates/turborepo-lib/src/shim.rs

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Update crates/turborepo/Cargo.toml

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* PR feedback and test fixing

* Set process's cwd

* Have to do inference even with TURBO_BINARY_PATH

* Comments

* PR feedback

* Moved single_package back to RunArgs

* Removed print

* Fixing bugs

* Fixing rust tests

* fixing bug with verbosity and Go tests

* add local turbo version checking

* remove ffi inclusion

* Fixed integration tests

* Linting fixes

* Integrated local_turbo_supports_skip_shim

* Fixed bug with cwd and restored yarn.lock

* Okay back to setting current_dir

* Fixed bug with canonicalization

* Removed print
starting

* match existing turbo exit codes

* pr feedback

Co-authored-by: Nicholas Yang <nicholas.yang@vercel.com>
Co-authored-by: Nicholas Yang <nick@nicholasyang.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
jridgewell added a commit to vercel/next.js that referenced this pull request Mar 10, 2023
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (vercel/turborepo#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (vercel/turborepo#2668)

* feat(docs): new authors & consistent filesnames (vercel/turborepo#2680)

* Added caveat to environment variables docs (vercel/turborepo#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (vercel/turborepo#2681)

* change from yarn to pnpm (vercel/turborepo#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8b357abe985e4116108af8a87aaba968cb
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (vercel/turborepo#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit e39d65eb5b97140fe6338dabfbd0ac3be2987d8f
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (vercel/turborepo#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 6b99818abd358ebb4fa3506b493e2fae34372d25
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (vercel/turborepo#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ce4c445cd2c17021b4397c8e3cf93d91921146ef
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (vercel/turborepo#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit e1bf5e2cde7ca2006c8a4c3455dec38e971aa3eb
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (vercel/turborepo#2872)

commit 532eff76326fb9237a450345b45073c1061e5a37
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (vercel/turborepo#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on vercel/turborepo#2416

commit dc36fc41586e5763520b4a16d249cdd6779bc902
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (vercel/turborepo#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be94b03f44765ac8bd334194545cd992b9b
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (vercel/turborepo#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 1e818068241c308cd3260bd83eba294d890a6151
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (vercel/turborepo#2873)

    Reduces memory usage by 14%

commit cac79bbe35c5ee7d2bf14625bb709dff8010b8ad
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (vercel/turborepo#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/e1a9bcb94d439856982fd7edb522ba3122699f2d/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/e1a9bcb94d439856982fd7edb522ba3122699f2d/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e7cba7bcff030c1f10f31fc0155dd055fe
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (vercel/turborepo#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91eae5c313556fe8cb0bde87ab521e28d7cf
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (vercel/turborepo#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit c2d5a07dc58a57434cf2aed00a1ce428215f585e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (vercel/turborepo#2916)

    updating in hope that this fixes the random errors in test runs

commit e1a9bcb94d439856982fd7edb522ba3122699f2d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (vercel/turborepo#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&vercel/turborepo#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&vercel/turborepo#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&vercel/turborepo#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&vercel/turborepo#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&vercel/turborepo#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&vercel/turborepo#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&vercel/turborepo#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&vercel/turborepo#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&vercel/turborepo#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&vercel/turborepo#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&vercel/turborepo#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&vercel/turborepo#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&vercel/turborepo#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&vercel/turborepo#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&vercel/turborepo#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&vercel/turborepo#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&vercel/turborepo#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&vercel/turborepo#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&vercel/turborepo#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&vercel/turborepo#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2b22d43bd9c1d917350f810e5398ca9d49
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (vercel/turborepo#2879)

    * Docs for topology outside of a task

    Documentation for behavior in vercel/turborepo#2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81cb7c833f672001eb36d30d700e1cf6cc9
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (vercel/turborepo#2913)

commit 07231701892cbca7b73e35bfb490f2514770628e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (vercel/turborepo#2912)

commit c69298c4a31516129bb62263f163a1da9c5614da
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (vercel/turborepo#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 6965cb81ef5693b3e7a23e6a999be04d6590fad5
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (vercel/turborepo#2886)

commit 934567015bc99eb8aa80311623e52ea924cbc424
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (vercel/turborepo#2884)

commit eead9063968a3b8571e3ba2c7a897522f890e2fc
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (vercel/turborepo#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c74636fd4b0586951011919bc05e1f651d
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (vercel/turborepo#2904)

    Before vercel/turborepo#2859:
    `eslint --quiet --fix`

    After vercel/turborepo#2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22098ff8825e83baa2561d8ec0acf5b52af
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (vercel/turborepo#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit dcb1ab33d1f9571177b9db51e3e0cbbbe8e021e1
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (vercel/turborepo#2899)

commit 22c1440283ed4dfd1e310210108244c4c12d4c56
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (vercel/turborepo#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1ea450cdaa629920464b509f3098997ae06
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (vercel/turborepo#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* Moving shim to crates/turborepo

* More refactoring

* First pass at splitting up shim and cli

* Fixing tests

* Added detection for help flag so users can get help outside of a valid repo

* Update crates/turborepo-lib/src/shim.rs

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Update crates/turborepo/Cargo.toml

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* PR feedback and test fixing

* Set process's cwd

* Have to do inference even with TURBO_BINARY_PATH

* Comments

* PR feedback

* Moved single_package back to RunArgs

* Removed print

* Fixing bugs

* Fixing rust tests

* fixing bug with verbosity and Go tests

* add local turbo version checking

* remove ffi inclusion

* Fixed integration tests

* Linting fixes

* Integrated local_turbo_supports_skip_shim

* Fixed bug with cwd and restored yarn.lock

* Okay back to setting current_dir

* Fixed bug with canonicalization

* Removed print
starting

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 13, 2023
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (vercel/turborepo#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (vercel/turborepo#2668)

* feat(docs): new authors & consistent filesnames (vercel/turborepo#2680)

* Added caveat to environment variables docs (vercel/turborepo#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (vercel/turborepo#2681)

* change from yarn to pnpm (vercel/turborepo#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8b357abe985e4116108af8a87aaba968cb
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (vercel/turborepo#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit e39d65eb5b97140fe6338dabfbd0ac3be2987d8f
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (vercel/turborepo#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 6b99818abd358ebb4fa3506b493e2fae34372d25
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (vercel/turborepo#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ce4c445cd2c17021b4397c8e3cf93d91921146ef
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (vercel/turborepo#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit e1bf5e2cde7ca2006c8a4c3455dec38e971aa3eb
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (vercel/turborepo#2872)

commit 532eff76326fb9237a450345b45073c1061e5a37
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (vercel/turborepo#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on vercel/turborepo#2416

commit dc36fc41586e5763520b4a16d249cdd6779bc902
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (vercel/turborepo#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be94b03f44765ac8bd334194545cd992b9b
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (vercel/turborepo#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 1e818068241c308cd3260bd83eba294d890a6151
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (vercel/turborepo#2873)

    Reduces memory usage by 14%

commit cac79bbe35c5ee7d2bf14625bb709dff8010b8ad
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (vercel/turborepo#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/e1a9bcb94d439856982fd7edb522ba3122699f2d/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/e1a9bcb94d439856982fd7edb522ba3122699f2d/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e7cba7bcff030c1f10f31fc0155dd055fe
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (vercel/turborepo#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91eae5c313556fe8cb0bde87ab521e28d7cf
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (vercel/turborepo#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit c2d5a07dc58a57434cf2aed00a1ce428215f585e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (vercel/turborepo#2916)

    updating in hope that this fixes the random errors in test runs

commit e1a9bcb94d439856982fd7edb522ba3122699f2d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (vercel/turborepo#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&vercel/turborepo#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&vercel/turborepo#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&vercel/turborepo#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&vercel/turbo#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&vercel/turborepo#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&vercel/turborepo#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&vercel/turborepo#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&vercel/turborepo#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&vercel/turborepo#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&vercel/turborepo#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&vercel/turborepo#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&vercel/turborepo#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&vercel/turborepo#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&vercel/turborepo#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&vercel/turborepo#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&vercel/turborepo#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&vercel/turborepo#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&vercel/turborepo#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&vercel/turborepo#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&vercel/turborepo#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&vercel/turborepo#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2b22d43bd9c1d917350f810e5398ca9d49
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (vercel/turborepo#2879)

    * Docs for topology outside of a task

    Documentation for behavior in vercel/turborepo#2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81cb7c833f672001eb36d30d700e1cf6cc9
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (vercel/turborepo#2913)

commit 07231701892cbca7b73e35bfb490f2514770628e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (vercel/turborepo#2912)

commit c69298c4a31516129bb62263f163a1da9c5614da
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (vercel/turborepo#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 6965cb81ef5693b3e7a23e6a999be04d6590fad5
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (vercel/turborepo#2886)

commit 934567015bc99eb8aa80311623e52ea924cbc424
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (vercel/turborepo#2884)

commit eead9063968a3b8571e3ba2c7a897522f890e2fc
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (vercel/turborepo#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c74636fd4b0586951011919bc05e1f651d
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (vercel/turborepo#2904)

    Before vercel/turborepo#2859:
    `eslint --quiet --fix`

    After vercel/turborepo#2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22098ff8825e83baa2561d8ec0acf5b52af
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (vercel/turborepo#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit dcb1ab33d1f9571177b9db51e3e0cbbbe8e021e1
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (vercel/turborepo#2899)

commit 22c1440283ed4dfd1e310210108244c4c12d4c56
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (vercel/turborepo#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1ea450cdaa629920464b509f3098997ae06
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (vercel/turborepo#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* Moving shim to crates/turborepo

* More refactoring

* First pass at splitting up shim and cli

* Fixing tests

* Added detection for help flag so users can get help outside of a valid repo

* Update crates/turborepo-lib/src/shim.rs

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Update crates/turborepo/Cargo.toml

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* PR feedback and test fixing

* Set process's cwd

* Have to do inference even with TURBO_BINARY_PATH

* Comments

* PR feedback

* Moved single_package back to RunArgs

* Removed print

* Fixing bugs

* Fixing rust tests

* fixing bug with verbosity and Go tests

* add local turbo version checking

* remove ffi inclusion

* Fixed integration tests

* Linting fixes

* Integrated local_turbo_supports_skip_shim

* Fixed bug with cwd and restored yarn.lock

* Okay back to setting current_dir

* Fixed bug with canonicalization

* Removed print
starting

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (vercel/turborepo#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (vercel/turborepo#2668)

* feat(docs): new authors & consistent filesnames (vercel/turborepo#2680)

* Added caveat to environment variables docs (vercel/turborepo#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (vercel/turborepo#2681)

* change from yarn to pnpm (vercel/turborepo#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8b357abe985e4116108af8a87aaba968cb
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (vercel/turborepo#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit 1a95850
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (vercel/turborepo#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 5bbdedf
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (vercel/turborepo#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit ac46ee9
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (vercel/turborepo#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 3940ec1
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (vercel/turborepo#2872)

commit a5b70b1
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (vercel/turborepo#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on vercel/turborepo#2416

commit fb3fb5d
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (vercel/turborepo#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be94b03f44765ac8bd334194545cd992b9b
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (vercel/turborepo#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit 8a7051a
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (vercel/turborepo#2873)

    Reduces memory usage by 14%

commit c4ab57d
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (vercel/turborepo#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/9b66fa301aeedd94a4fabc152432904a2ba0e82b/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/9b66fa301aeedd94a4fabc152432904a2ba0e82b/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e7cba7bcff030c1f10f31fc0155dd055fe
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (vercel/turborepo#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91eae5c313556fe8cb0bde87ab521e28d7cf
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (vercel/turborepo#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 54069b7
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (vercel/turborepo#2916)

    updating in hope that this fixes the random errors in test runs

commit 9b66fa3
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (vercel/turborepo#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2b22d43bd9c1d917350f810e5398ca9d49
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (vercel/turborepo#2879)

    * Docs for topology outside of a task

    Documentation for behavior in #2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81cb7c833f672001eb36d30d700e1cf6cc9
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (vercel/turborepo#2913)

commit 07231701892cbca7b73e35bfb490f2514770628e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (vercel/turborepo#2912)

commit 3bff42b
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (vercel/turborepo#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 1628544
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (vercel/turborepo#2886)

commit ee21f7f
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (vercel/turborepo#2884)

commit eead9063968a3b8571e3ba2c7a897522f890e2fc
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (vercel/turborepo#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c74636fd4b0586951011919bc05e1f651d
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (vercel/turborepo#2904)

    Before #2859:
    `eslint --quiet --fix`

    After #2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22098ff8825e83baa2561d8ec0acf5b52af
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (vercel/turborepo#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit d246dc9
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (vercel/turborepo#2899)

commit eb93ca6
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (vercel/turborepo#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1ea450cdaa629920464b509f3098997ae06
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (vercel/turborepo#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* Moving shim to crates/turborepo

* More refactoring

* First pass at splitting up shim and cli

* Fixing tests

* Added detection for help flag so users can get help outside of a valid repo

* Update crates/turborepo-lib/src/shim.rs

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Update crates/turborepo/Cargo.toml

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* PR feedback and test fixing

* Set process's cwd

* Have to do inference even with TURBO_BINARY_PATH

* Comments

* PR feedback

* Moved single_package back to RunArgs

* Removed print

* Fixing bugs

* Fixing rust tests

* fixing bug with verbosity and Go tests

* add local turbo version checking

* remove ffi inclusion

* Fixed integration tests

* Linting fixes

* Integrated local_turbo_supports_skip_shim

* Fixed bug with cwd and restored yarn.lock

* Okay back to setting current_dir

* Fixed bug with canonicalization

* Removed print
starting

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
* Created two separate chains for executing commands: One that uses the parsed arguments from clap that are
serialized to json, the other that still uses Cobra. Now to test to ensure that both do the same thing

* Adjusted json serialization. Now debugging

* Hooked up new CLI to commands

* Fixing compile error

* fixing lint error

* Fixing more Go lint errors

* Fixing lint errors

* fixing up tests

* Only using turbo state with link, login, and logout commands

* Reverting changes

* Removing more changes

* Deleting code and fixing lints

* Removed unlink command

* Fixing bugs

* Reverting more changes

* fixed all tests

* Refactored away duplicates using CLIConfigProvider interface

* Lint fixes

* Minor order tweak

* Added error if command is not handled

* PR feedback

* Minor fixes. Adding --__test-run flag

* Added workaround for subcommand help

* Moved logic around to accomodate login/logout/link/unlink

* Added some documentation, removed some printf

* Adding more tests.

* Hooked up link/login/unlink to --__test-run flag. Also added prysk tests for it.

* Split up derive into multiple lines

* Added comment explaining clap v3 in Cargo.toml

* Ported daemon

* Cleaning up code. Removed imports

* Fix lints

* Fixing lints

* Ported prune to Rust CLI

* Going all the way. Porting run to Rust CLI and upgrading back to clap v4

* Always gotta be testing

* Always be testing. Always. Be. Testing.

* Added tests for each singular flag. Now for combination tests

* WIP: Hooking up Rust CLI to Go run logic

* Disable color

* Removed root inference from Go side

* Fixing compile errors

* Update cli/cmd/turbo/main.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Patching up code for run

* PR changes

* Restored labeler

* Restore og.tsx

* Reverted run changes that somehow made it in here

* Fix run

* Update cli/internal/turbostate/turbostate.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* feat: polyfill `global` with `globalThis` (vercel/turborepo#2666)

This PR changes the ecmascript chunk logic to polyfill `global` with `globalThis`. A more complex and less performant solution (but with the benefit of us knowing the runtime environment) would be to add an effect for simple identifier expressions.

* delete IsYarn util (vercel/turborepo#2668)

* feat(docs): new authors & consistent filesnames (vercel/turborepo#2680)

* Added caveat to environment variables docs (vercel/turborepo#2703)

Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

* Fix publish workflow (vercel/turborepo#2681)

* change from yarn to pnpm (vercel/turborepo#2686)

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>

* Reverted workflow changes

* Fixing tests. Added run args to base

* Trying to fix tests

* Rewrote some logic around run args handling

* Fixing up tests by adding flags and fixing parsing bugs

* Hooked up RepoState to Go code

* Fixing e2e tests

* Fixing e2e

* Gotta build shim, not turbo in package.json

* Patched integration test

* Reverted Cargo.toml

* Cargo.lock too

* Fixing tests

* Moving turbo binary to shim

* Fixed tests and CI

* Check for TURBO_BINARY_PATH

* Ported shell completions to Rust

* Fixed logic issue with TURBO_BINARY_PATH

* Created .gitignore file with generated rust and header files

* Second try on cleaning up generated files

* More CI fixes

* Realized we still need some inference

* Removed files that are edited by run-examples.sh

* Switched order of `cargo fmt --check` and `cargo clippy` because `cargo clippy` generates files needed for `cargo fmt --check`.

* Cleaning up changes.

* Fix one thing break another

* Accept integration changes

* Deleting more unused code

* Test fixes

* No longer need this line now that src/ffi.rs is gitignored

* PR feedback

* Update cli/internal/run/run.go

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Fixing typo

* Merged main

* PR feedback

* PR feedback

* Merge main

* Reverted workflow change

* Error on invalid unicode instead of lossy conversion

* PR feedback

* Squashed commit of the following:

commit 096b8b8b357abe985e4116108af8a87aaba968cb
Author: David Barrat <david@barrat.io>
Date:   Mon Dec 5 15:29:41 2022 +0100

    Docs: Add Authdog to Turbo Showcase page (vercel/turborepo#2921)

    [Authdog](https://www.authdog.com/)  is an Identity and Access Management as a Service platform, built upon Serverless technologies (AWS Lambda, Vercel, Fastly and Cloudflare Workers). I started looking for alternatives to Nx, some times ago and experimented with Turbo, decided to migrate some projects to this tool, awesome stuff!

commit 35f5ddd
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:23:40 2022 +0100

    enable id reusing (vercel/turborepo#2895)

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 72e5974
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:53 2022 +0100

    Reduce wrapper tasks by eagerly resolving Vcs (vercel/turborepo#2933)

    * resolve codegenerateable before calling it

    * eagerly resolve some constructors to avoid creating many wrapper tasks

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit b49617e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 15:22:32 2022 +0100

    Share TaskInputs between task cache and task (vercel/turborepo#2923)

    Move bound task function into TaskState to allow unloading

    Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

commit 45166d8
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 14:32:24 2022 +0100

    make sure that removing collectibles will cleanup helper entries (vercel/turborepo#2872)

commit 11bca9d
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 13:27:22 2022 +0100

    Reduce the number of Strings and wrapper tasks (vercel/turborepo#2834)

    * use Cow to avoid creating Strings for trait function names
    * trait calls avoid the resolve trait wrapper task when called on a resolved VC
    * eagerly resolve some Vc that would otherwise create a lot of wrapper tasks

    Depends on vercel/turborepo#2416

commit 4a0491e
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 11:00:10 2022 +0100

    reduce number of allocations (vercel/turborepo#2833)

    VecDeque::new always allocates 7 elements

commit 4f247be94b03f44765ac8bd334194545cd992b9b
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Mon Dec 5 15:39:15 2022 +0800

    Upgrade to Next.js 13 (vercel/turborepo#2906)

    This gets our site updated to Next.js 13 and Nextra 2. As a bonus, this should help prevent some of the issues we're seeing in Sentry.

commit b4e8415
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Mon Dec 5 07:42:19 2022 +0100

    shrink lists and sets that are stored in Tasks (vercel/turborepo#2873)

    Reduces memory usage by 14%

commit 06b577c
Author: Ahab <ahabhgk@gmail.com>
Date:   Sun Dec 4 13:23:26 2022 +0800

    make lazy bundling for dynamic import more lazy (vercel/turborepo#2918)

    For example:

    ```js
    // index.js
    setTimeout(() => {
      import('./async.js').then(() => console.log('async.js loaded'))
    }, 1000)
    ```

    ```js
    // async.js
    import './async.css';
    console.log('async.js content')
    ```

    For now the graph generated by above code will be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 22 24" src="https://user-images.githubusercontent.com/42857895/205442932-ebfd5126-ef3d-4205-b5b5-434126ad46f7.png">

    The `ChunkGroup_async` will be a async chunk group of `ChunkGroup_index`, pushed at [turbopack-core/src/chunk/mod.rs#L462](https://github.com/vercel/turbo/blob/43289f8f036a51c6e8d27473c2a775c253ebdbfa/crates/turbopack-core/src/chunk/mod.rs#L462), and it will have a reference between `ChunkGroup_index` and `ChunkGroup_async`, but `ChunkGroup_async` will also be a chunk group of `ChunkGroup_async-manifest-chunk` created at [turbopack-ecmascript/src/chunk/loader.rs#L165](https://github.com/vercel/turbo/blob/43289f8f036a51c6e8d27473c2a775c253ebdbfa/crates/turbopack-ecmascript/src/chunk/loader.rs#L165), and will have a reference between `ChunkGroup_async-manifest-chunk` and `ChunkGroup_async`.

    This leads to when the browser request '/_a8a837.js', turbopack will compile chunks in `ChunkGroup_index` ('/_a8a837.js'), `ChunkGroup_async-manifest-chunk` ('/src_async.js_manifest-chunk.js'), and also chunks in `ChunkGroup_async` ('/src_async.js', '/src_async.css'), because of the reference between `ChunkGroup_index` and `ChunkGroup_async`.

    But the expected behavior is only compile chunks in `ChunkGroup_index` and `ChunkGroup_async-manifest-chunk`, so this PR deleted the reference between `ChunkGroup_index` and `ChunkGroup_async`, makes the graph be like this:

    <img width="1461" alt="Screen Shot 2022-12-03 at 21 50 29" src="https://user-images.githubusercontent.com/42857895/205444165-7b266dce-9aa6-4829-b8dc-d2bf74642aff.png">

    And makes chunks in `ChunkGroup_async` to be compiled only when the browser request '/src_async.js_manifest-chunk.js'.

commit fd09f2e7cba7bcff030c1f10f31fc0155dd055fe
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Dec 4 03:26:37 2022 +0000

    chore(deps): update dependency @types/node to v18.11.10 (vercel/turborepo#2928)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit 429e91eae5c313556fe8cb0bde87ab521e28d7cf
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 22:21:26 2022 -0500

    chore(deps): update dependency @babel/core to v7.20.5 (vercel/turborepo#2919)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 800adb5
Author: Tobias Koppers <tobias.koppers@googlemail.com>
Date:   Sat Dec 3 22:11:10 2022 +0100

    update chromiumoxide (vercel/turborepo#2916)

    updating in hope that this fixes the random errors in test runs

commit 43289f8
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Dec 3 08:54:50 2022 +0000

    chore(deps): update rust crate futures to 0.3.25 (vercel/turborepo#2915)

    [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

    This PR contains the following updates:

    | Package | Type | Update | Change |
    |---|---|---|---|
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dev-dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.21` -> `0.3.25` |
    | [futures](https://rust-lang.github.io/futures-rs) ([source](https://github.com/rust-lang/futures-rs)) | dependencies | patch | `0.3.24` -> `0.3.25` |

    ---

    ### ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

    ---

    ### Release Notes

    <details>
    <summary>rust-lang/futures-rs</summary>

    ### [`v0.3.25`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0325---2022-10-20)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

    -   Fix soundness issue in `join!` and `try_join!` macros ([#&#8203;2649](https://github.com/rust-lang/futures-rs/issues/2649))
    -   Implement `Clone` for `sink::Drain` ([#&#8203;2650](https://github.com/rust-lang/futures-rs/issues/2650))

    ### [`v0.3.24`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0324---2022-08-29)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

    -   Fix incorrect termination of `select_with_strategy` streams ([#&#8203;2635](https://github.com/rust-lang/futures-rs/issues/2635))

    ### [`v0.3.23`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0323---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.22...0.3.23)

    -   Work around MSRV increase due to a cargo bug.

    ### [`v0.3.22`](https://github.com/rust-lang/futures-rs/blob/HEAD/CHANGELOG.md#&#8203;0322---2022-08-14)

    [Compare Source](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.22)

    -   Fix `Sync` impl of `BiLockGuard` ([#&#8203;2570](https://github.com/rust-lang/futures-rs/issues/2570))
    -   Fix partial iteration in `FuturesUnordered` ([#&#8203;2574](https://github.com/rust-lang/futures-rs/issues/2574))
    -   Fix false detection of inner panics in `Shared` ([#&#8203;2576](https://github.com/rust-lang/futures-rs/issues/2576))
    -   Add `Mutex::lock_owned` and `Mutex::try_lock_owned` ([#&#8203;2571](https://github.com/rust-lang/futures-rs/issues/2571))
    -   Add `io::copy_buf_abortable` ([#&#8203;2507](https://github.com/rust-lang/futures-rs/issues/2507))
    -   Remove `Unpin` bound from `TryStreamExt::into_async_read` ([#&#8203;2599](https://github.com/rust-lang/futures-rs/issues/2599))
    -   Make `run_until_stalled` handle self-waking futures ([#&#8203;2593](https://github.com/rust-lang/futures-rs/issues/2593))
    -   Use `FuturesOrdered` in `try_join_all` ([#&#8203;2556](https://github.com/rust-lang/futures-rs/issues/2556))
    -   Fix orderings in `LocalPool` waker ([#&#8203;2608](https://github.com/rust-lang/futures-rs/issues/2608))
    -   Fix `stream::Chunk` adapters size hints ([#&#8203;2611](https://github.com/rust-lang/futures-rs/issues/2611))
    -   Add `push_front` and `push_back` to `FuturesOrdered` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Deprecate `FuturesOrdered::push` in favor of `FuturesOrdered::push_back` ([#&#8203;2591](https://github.com/rust-lang/futures-rs/issues/2591))
    -   Performance improvements ([#&#8203;2583](https://github.com/rust-lang/futures-rs/issues/2583), [#&#8203;2626](https://github.com/rust-lang/futures-rs/issues/2626))
    -   Documentation improvements ([#&#8203;2579](https://github.com/rust-lang/futures-rs/issues/2579), [#&#8203;2604](https://github.com/rust-lang/futures-rs/issues/2604), [#&#8203;2613](https://github.com/rust-lang/futures-rs/issues/2613))

    </details>

    ---

    ### Configuration

    📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

    ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

    ---

     - [ ] If you want to rebase/retry this PR, check this box

    ---

    This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/vercel/turbo).

commit 93222f2b22d43bd9c1d917350f810e5398ca9d49
Author: Anthony Shew <anthony.shew@vercel.com>
Date:   Fri Dec 2 16:36:55 2022 -0800

    feat(docs): document topology outside of a task (vercel/turborepo#2879)

    * Docs for topology outside of a task

    Documentation for behavior in #2855!

    * Minor cleanup.

    * Some copy updates and add image.

    Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>

commit f8aaf81cb7c833f672001eb36d30d700e1cf6cc9
Author: Will Binns-Smith <wbinnssmith@gmail.com>
Date:   Fri Dec 2 16:32:35 2022 -0800

    Link to Turbopack's architecture.md from CONTRIBUTING.md (vercel/turborepo#2913)

commit 07231701892cbca7b73e35bfb490f2514770628e
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Fri Dec 2 16:40:08 2022 -0500

    feat(docs): add github (vercel/turborepo#2912)

commit 7ad988b
Author: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date:   Fri Dec 2 11:58:55 2022 -0800

    build(cargo): update swc_core, dependencies to resolve circular deps (vercel/turborepo#2869)

    * build(cargo): bump up swc_core

    * build(cargo): unpin indexmap

    * build(cargo): update dependencies

    * style(cargo): adjust format

commit 80699ec
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 19:42:05 2022 +0100

    set correct cwd for server renderer (vercel/turborepo#2886)

commit 1c4732b
Author: Leah <github.leah@hrmny.sh>
Date:   Fri Dec 2 18:27:02 2022 +0100

    fix dynamic paths (vercel/turborepo#2884)

commit eead9063968a3b8571e3ba2c7a897522f890e2fc
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 16:09:08 2022 +0800

    Fix the missing links. (vercel/turborepo#2707)

    This PR does three things:
    1. Prevents double redirects by setting the correct destination the first time.
    2. Redirects URLs accidentally recreated in the new scope. 🤦‍♂️
    3. Removes a catch-all to trigger any additional missing links to appear.

    Changes are easy to review commit-by-commit.

commit b8c0c3c74636fd4b0586951011919bc05e1f651d
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 14:37:03 2022 +0800

    Update lint-staged behavior. (vercel/turborepo#2904)

    Before #2859:
    `eslint --quiet --fix`

    After #2859:
    `pnpm run lint --quiet --fix --`
    =>
    `eslint . --ext js,jsx,ts,tsx --quiet --fix --`

    After this:
    `eslint --ext js,jsx,ts,tsx --quiet --fix --`

    Removes the sneaky `.`.

commit 336ea22098ff8825e83baa2561d8ec0acf5b52af
Author: Nathan Hammond <nathan.hammond@vercel.com>
Date:   Fri Dec 2 08:33:21 2022 +0800

    Add additional detailed warning message if no tasks were run. (vercel/turborepo#2778)

    This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.

commit 1040108
Author: Leah <github.leah@hrmny.sh>
Date:   Thu Dec 1 21:02:33 2022 +0100

    simplify `next-binding` (vercel/turborepo#2899)

commit e65cc93
Author: Justin Ridgewell <justin@ridgewell.name>
Date:   Thu Dec 1 13:55:15 2022 -0500

    Implement import.meta (vercel/turborepo#2816)

    I chose to have the `import.meta.url` to have the relative project path on disk.

    Webpack makes it the absolute system path, but that would make the JS output system dependent and I didn't like that. Vite doesn't bundle and uses the browser's behavior, which is the dev server path.

    I'm splitting this from the in-progress PR to implement `new URL(…, import.meta.url)` support. That requires a bunch of changes to the analysis code and a new FS content source, so it's taking longer to ship.

    Fixes WEB-137.

commit 75a7d1ea450cdaa629920464b509f3098997ae06
Author: Thomas Knickman <tom.knickman@vercel.com>
Date:   Thu Dec 1 11:40:15 2022 -0500

    fix(examples): cra pnpm fix (vercel/turborepo#2897)

* Merged main

* Reverting changes that snuck in

* Fixing tests

* Final fixes for tests

* Moving shim to crates/turborepo

* More refactoring

* First pass at splitting up shim and cli

* Fixing tests

* Added detection for help flag so users can get help outside of a valid repo

* Update crates/turborepo-lib/src/shim.rs

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* Update crates/turborepo/Cargo.toml

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>

* PR feedback and test fixing

* Set process's cwd

* Have to do inference even with TURBO_BINARY_PATH

* Comments

* PR feedback

* Moved single_package back to RunArgs

* Removed print

* Fixing bugs

* Fixing rust tests

* fixing bug with verbosity and Go tests

* add local turbo version checking

* remove ffi inclusion

* Fixed integration tests

* Linting fixes

* Integrated local_turbo_supports_skip_shim

* Fixed bug with cwd and restored yarn.lock

* Okay back to setting current_dir

* Fixed bug with canonicalization

* Removed print
starting

Co-authored-by: Chris Olszewski <chrisdolszewski@gmail.com>
Co-authored-by: Florentin / 珞辰 <ecklf@icloud.com>
Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
Co-authored-by: Thomas Knickman <tom.knickman@vercel.com>
Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
Co-authored-by: Yota Hada <hadayota33@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants