Commit graph

138 commits

Author SHA1 Message Date
Tobias Koppers
df228500f1
fix error handling and hanging problems (#47457)
### What?

see https://github.com/vercel/turbo/pull/4324
2023-03-24 23:37:32 +00:00
Tobias Koppers
3b1aaa2686
improve source mapping of console output and errors (#47388)
### What?

* see https://github.com/vercel/turbo/pull/4284
* also adds a test case
* fixes some bugs with app dir (e. g. fixes https://github.com/vercel/turbo/issues/2496)

### Why?

* Stack traces pointing to generated code are not very useful

### How?

* Source Maps
* Code context
* Replacing magic identifiers

fixes WEB-745
2023-03-23 12:43:22 +00:00
Justin Ridgewell
a5dfe46cca
turbopack: Implement streamed middleware (#47264)
Fun! This depends on https://github.com/vercel/turbo/pull/4251 to
implement streamed Node evaluations, giving us the ability to support
streamed middleware responses.

This is just the first step to supporting RSC streaming in Turbopack. I
chose to start with this because it requires all the same base logic,
and I understand the full router->middleware->HTTP server code path, so
it's a lot easier to work on.

Fixes WEB-738
2023-03-22 21:04:33 -07:00
Alex Kirszenberg
8195e1947b
Refactor ES chunk evaluate logic into a Runtime trait (#47116)
This is the Next.js side of https://github.com/vercel/turbo/pull/4141
2023-03-22 10:28:49 +00:00
Alex Kirszenberg
ed539c5dca
Update Turbopack to turbopack-230321.1 (#47342)
Updates Turbopack to latest nightly and fix build errors.

# New features

* https://github.com/vercel/turbo/pull/4198

# Bug Fixes

* https://github.com/vercel/turbo/pull/4241

# Misc.

* https://github.com/vercel/turbo/pull/4249

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-21 11:48:48 +00:00
LongYinan
509ed00fc1
Calling turbopack from the next build CLI (#46602)
Close WEB-661
2023-03-21 10:25:08 +00:00
Tobias Koppers
6eb33b7e68
update turbopack (#47205)
## Features

* https://github.com/vercel/turbo/pull/4208

## Testing

* https://github.com/vercel/turbo/pull/4211


Co-authored-by: Justin Ridgewell <112982+jridgewell@users.noreply.github.com>
2023-03-17 08:41:32 +00:00
Justin Ridgewell
875ddea183
next-swc: Switch to testing::fixture (#47183)
The old `test_generator::test_resources` could only find resources relative to the project root, and not relative to the test file. Because of the new nextpack directory structure, this causes all kinds of headaches between running in nextpack and running in turbo (`next.js/packages/next-swc` vs `nextpack/next.js/packages/next-swc`).
2023-03-17 06:18:25 +00:00
Leah
dbdf47cf61
fix build issue and future incompatibility (#47176)
It was complaining about having 2 versions of sentry for some reason
2023-03-16 19:29:24 +00:00
Will Binns-Smith
67aceea72b
Align on next-transform-font (#47179)
fix NEXT-827 ([link](https://linear.app/vercel/issue/NEXT-827))

This aligns use of the next/font transform across the workspace under a
single crate, now called `next-transform-font`.
2023-03-16 16:33:04 +01:00
Justin Ridgewell
02125cf3b1
Implement custom Turbopack Next transformers (#47137)
Builds on https://github.com/vercel/turbo/pull/4202 to implement custom Next.js Transformers in Turbopack.

This is the final piece to moving the `next-*` crates to Next. While we've _technically_ moved everything, Turbopack didn't support running custom transformers. So we're actually stuck on the last version we cut before deleting the next crates, running the transformers that exist in the turbopack repo. With the new support, we're almost back to the tip of main branch (there's still some snafu with `swc_core` upgrading that I'm working on).

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-03-15 19:10:59 +00:00
Tobias Koppers
c27b546908
re-enable next-dev-tests (#47087)
### What?

enables the next-dev-tests crate integration tests from trubopack

### Why?

to unblock the move PR we temporarily disabled the tests

### How?

Fix the new location and fix the expect dependency

Fixes WEB-708

---------

Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2023-03-14 16:05:19 +01:00
Justin Ridgewell
8ae2df0f10 Integrate next-* crates from Turbopack (#47019)
Update workspace cargo deps
Update cargo deps to point to local workspace
Ignore too-many-arguments warnings
Fix clippy errors
Update pnpm workspaces
exclude integration tests from unit tests CI
rust-analyzer settings
add rust flags and env vars
2023-03-13 14:33:17 +01:00
Tobias Koppers
7e5881b72a
update turbopack (#46994)
# Bugfixes

* https://github.com/vercel/turbo/pull/4149
* https://github.com/vercel/turbo/pull/4151

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-10 17:59:48 +01:00
Justin Ridgewell
8e14b672cc
Update Turbopack to 230309.2 (#46971)
# New Features
- https://github.com/vercel/turbo/pull/3975

# Bug Fixes
- https://github.com/vercel/turbo/pull/4129
- https://github.com/vercel/turbo/pull/4134
- https://github.com/vercel/turbo/pull/4062

# Performance
- https://github.com/vercel/turbo/pull/4093
2023-03-09 13:24:24 -08:00
Justin Ridgewell
612d578188
Update Turbopack to 230308.3 (#46935)
# Bug Fixes
- https://github.com/vercel/turbo/pull/4121
- https://github.com/vercel/turbo/pull/4111
2023-03-08 11:25:23 -08:00
Donny/강동윤
37b0349731
Update turbopack to 230308.1 (#46909)
## Bugfixes

 - https://github.com/vercel/turbo/pull/3526
 - https://github.com/vercel/turbo/pull/4084
 - https://github.com/vercel/turbo/pull/4083
 - https://github.com/vercel/turbo/pull/4067
 - https://github.com/vercel/turbo/pull/3959
 - https://github.com/vercel/turbo/pull/4060
 - https://github.com/vercel/turbo/pull/4081
 - https://github.com/vercel/turbo/pull/4103
 - https://github.com/vercel/turbo/pull/4100
 - https://github.com/vercel/turbo/pull/4108
 - https://github.com/vercel/turbo/pull/4101
 - https://github.com/vercel/turbo/pull/4112
 - https://github.com/vercel/turbo/pull/3956
 - https://github.com/vercel/turbo/pull/4118
 - https://github.com/vercel/turbo/pull/4117

## Feature

 - https://github.com/vercel/turbo/pull/4058
  - https://github.com/vercel/turbo/pull/4013
  - https://github.com/vercel/turbo/pull/4005
  - https://github.com/vercel/turbo/pull/4001
  - https://github.com/vercel/turbo/pull/3839
  - https://github.com/vercel/turbo/pull/4017
  - https://github.com/vercel/turbo/pull/4086
  - https://github.com/vercel/turbo/pull/4067

## Performance

  - https://github.com/vercel/turbo/pull/4040
  - https://github.com/vercel/turbo/pull/4110

## Refactor

 - https://github.com/vercel/turbo/pull/4098
2023-03-08 13:51:28 +00:00
Shu Ding
7e933a094c
Revert "Revert "Update vendored React"" (#46881)
Reverts vercel/next.js#46861. This requires
https://github.com/vercel/turbo/pull/4102 to be released and bindings to
be updated first.

~Also depends on #46896 to be merged first, and conflicts to be
resolved.~
2023-03-07 13:04:08 -08:00
JJ Kasper
0f621cb133
Revert "Update vendored React" (#46861)
Reverting temporarily as this breaks turbopack support for app dir 

x-ref:
https://github.com/vercel/next.js/actions/runs/4349458918/jobs/7600147372
x-ref:
https://github.com/vercel/next.js/actions/runs/4349607013/jobs/7600148420

Reverts vercel/next.js#46826
2023-03-06 21:17:15 -08:00
Shu Ding
003b3af700
Update vendored React (#46826)
This PR updates vendored React to the latest `@next` version, as well as
corresponding changes to the manifest and module reference generation
code.

The new React version includes the following upstream changes:

- 49f741046 Fix: Infinite act loop caused by wrong shouldYield (#26317)
(Andrew Clark)
-  106ea1c58 Support Iterables in Flight (#26313) (Sebastian Markbåge)
- f905da227 [Flight] Send server reference error chunks to the client
(#26293) (Hendrik Liebau)
- e0241b660 Simplify Webpack References by encoding file path + export
name as single id (#26300) (Sebastian Markbåge)
- 25685d8a9 Codemod tests to waitFor pattern (9/?) (#26309) (Andrew
Clark)
- 64dde7082 Codemod tests to waitFor pattern (8/?) (#26308) (Andrew
Clark)
- 3cb5afb82 Codemod tests to waitFor pattern (7/?) (#26307) (Andrew
Clark)
- e98695db9 Codemod tests to waitFor pattern (6/?) (#26305) (Andrew
Clark)
- 9a52cc8bc Convert ReactLazy-test to waitFor pattern (#26304) (Andrew
Clark)
- 03462cfc7 [Fizz] External runtime: fix bug in processing existing
elements (#26303) (mofeiZ)
- faacefb4d Codemod tests to waitFor pattern (4/?) (#26302) (Andrew
Clark)
- 06460b6fb Remove unnecessary (and incorrect) code for compatibility
with Paper in the Fabric version of GlobalResponderHandler (#26290)
(Rubén Norte)
- e64a8f403 Codemod tests to waitFor pattern (3/?) (#26299) (Andrew
Clark)
- ce8a72fd4 Codemod tests to waitFor pattern (2/?) (#26296) (Andrew
Clark)
- 1f1f8eb55 [Float][Fizz][Fiber]: Refactor <style> Resource
implementation to group on flush (#26280) (Josh Story)
- 5c633a48f Add back accidentally deleted test comments (#26294) (Andrew
Clark)
- b073104c2 [DevTools] improve troubleshooting in README (#26235)
(Mengdi Chen)
- fcf218791 [DevTools] Remove renderer.js from extension build (#26234)
(Mengdi Chen)
- b72ed698f Fixed incorrect value returned as public instance from
reconciler (#26283) (Rubén Norte)
- 25a8b9735 Codemod tests to waitFor pattern (1/?) (#26288) (Andrew
Clark)
- e52446733 New internal testing helpers: waitFor, waitForAll,
waitForPaint (#26285) (Andrew Clark)
- d49e0e0be Removed unused imperative events implementation from React
Native renderer (#26282) (Rubén Norte)

---------
2023-03-06 16:51:10 -08:00
Alex Kirszenberg
111ef3951c
build(cargo): update turbopack (#46685)
# New Features
*  https://github.com/vercel/turbo/pull/4011

# Performance Improvements
* https://github.com/vercel/turbo/pull/3955
* https://github.com/vercel/turbo/pull/4018

# Bug Fixes
* https://github.com/vercel/turbo/pull/4037
* https://github.com/vercel/turbo/pull/4028

# Other
* https://github.com/vercel/turbo/pull/3974
* https://github.com/vercel/turbo/pull/4015
* https://github.com/vercel/turbo/pull/3999
* https://github.com/vercel/turbo/pull/4026
* https://github.com/vercel/turbo/pull/4053
* https://github.com/vercel/turbo/pull/3891

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-03-02 09:08:12 -08:00
Justin Ridgewell
9b6ede295c
build(cargo): update turbopack (#46581)
# New Features
- https://github.com/vercel/turbo/pull/3930

# Misc Changes
- https://github.com/vercel/turbo/pull/3944
- https://github.com/vercel/turbo/pull/3774
2023-02-28 21:36:17 -08:00
Tobias Koppers
d070b02601
update turbopack (#46297)
# Features

* https://github.com/vercel/turbo/pull/3923

# Bug Fixes

* https://github.com/vercel/turbo/pull/3931
* https://github.com/vercel/turbo/pull/3933
2023-02-23 13:31:08 +00:00
Will Binns-Smith
7c5aa66a92
Update Turbopack to turbopack-230222.3 (#46278)
Update Turbopack to turbopack-230222.3

## Features
*
01a004e3f6

## Performance Improvements
*
e575eb95a2

## Misc
*
a6f92743c3
2023-02-22 17:50:59 -08:00
Tobias Koppers
3d73366ad9
update turbopack (#46253
# Features

* https://github.com/vercel/turbo/pull/3897
* https://github.com/vercel/turbo/pull/3670

# Bug Fixes

* https://github.com/vercel/turbo/pull/3894
* https://github.com/vercel/turbo/pull/3910
* https://github.com/vercel/turbo/pull/3895
* https://github.com/vercel/turbo/pull/3912
* https://github.com/vercel/turbo/pull/3805

# Performance Improvements

* https://github.com/vercel/turbo/pull/3836
2023-02-22 10:43:50 -08:00
Will Binns-Smith
4bfb923c46
Update Turbopack to turbopack-230221.3 (#46209
# Performance Improvements:
* https://github.com/vercel/turbo/pull/3849
* https://github.com/vercel/turbo/pull/3878
* https://github.com/vercel/turbo/pull/3864

# Misc:
* https://github.com/vercel/turbo/pull/3847
* https://github.com/vercel/turbo/pull/3865
* https://github.com/vercel/turbo/pull/3850
* https://github.com/vercel/turbo/pull/3861
* https://github.com/vercel/turbo/pull/3823
* https://github.com/vercel/turbo/pull/3882

# Contributing
* Update profiling instructions for macOS
([#3837](https://github.com/vercel/turbo/pull/3837))
2023-02-21 15:53:33 -08:00
Justin Ridgewell
a1abeaf67b
build(cargo): update turbopack (#46013)Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
# New Features
- https://github.com/vercel/turbo/pull/3771
- https://github.com/vercel/turbo/pull/3690

# Performance
- https://github.com/vercel/turbo/pull/3768

# Fixes
- https://github.com/vercel/turbo/pull/3795
- https://github.com/vercel/turbo/pull/3746
- https://github.com/vercel/turbo/pull/3832
- https://github.com/vercel/turbo/pull/3827
- https://github.com/vercel/turbo/pull/3847

# Other
- https://github.com/vercel/turbo/pull/3803
- https://github.com/vercel/turbo/pull/3685
- https://github.com/vercel/turbo/pull/3848

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-02-21 19:44:53 +01:00
LongYinan
e3843c9712
Upgrade turbopack (#45861)
The `experimental.turbotrace.memoryLimit` is not actually working, we
need to use `turbo_malloc` as the global allocator to make it work.

~~Block by:~~
- https://github.com/swc-project/swc/pull/6940
- https://github.com/vercel/turbo/pull/3772

## This PR also upgrades `turbopack-230213.2` to `turbopack-230214.1`

- https://github.com/vercel/turbo/pull/3767
- https://github.com/vercel/turbo/pull/3772
- https://github.com/vercel/turbo/pull/3762
- https://github.com/vercel/turbo/pull/3741
- https://github.com/vercel/turbo/pull/3796
2023-02-14 18:51:15 +01:00
Justin Ridgewell
3b1aa1c941
build(cargo): update turbopack (#45863)
# New Features
- https://github.com/vercel/turbo/pull/3695
- https://github.com/vercel/turbo/pull/3696

# Performance
- https://github.com/vercel/turbo/pull/3738
- https://github.com/vercel/turbo/pull/3714
- https://github.com/vercel/turbo/pull/3739

# Fixes
- https://github.com/vercel/turbo/pull/3718
- https://github.com/vercel/turbo/pull/3618
- https://github.com/vercel/turbo/pull/3736

# Other Changes
- https://github.com/vercel/turbo/pull/3731
- https://github.com/vercel/turbo/pull/3733
- https://github.com/vercel/turbo/pull/3629
- https://github.com/vercel/turbo/pull/3769
- https://github.com/vercel/turbo/pull/3707
- https://github.com/vercel/turbo/pull/3737
- https://github.com/vercel/turbo/pull/3770

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-02-13 14:40:58 -08:00
LongYinan
946ccb00fc
Update turbopack to 230209.02 (#45776)Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
# New Features
- https://github.com/vercel/turbo/pull/3540
- https://github.com/vercel/turbo/pull/3549
- https://github.com/vercel/turbo/pull/3465
- https://github.com/vercel/turbo/pull/3550
- https://github.com/vercel/turbo/pull/3495
- https://github.com/vercel/turbo/pull/3624
- https://github.com/vercel/turbo/pull/3600
- https://github.com/vercel/turbo/pull/3676
- https://github.com/vercel/turbo/pull/3689

# Fixes

- https://github.com/vercel/turbo/pull/3437
- https://github.com/vercel/turbo/pull/3542
- https://github.com/vercel/turbo/pull/3531
- https://github.com/vercel/turbo/pull/3552
- https://github.com/vercel/turbo/pull/3551
- https://github.com/vercel/turbo/pull/3597
- https://github.com/vercel/turbo/pull/3644
- https://github.com/vercel/turbo/pull/3623
- https://github.com/vercel/turbo/pull/3634
- https://github.com/vercel/turbo/pull/3574
- https://github.com/vercel/turbo/pull/3673
- https://github.com/vercel/turbo/pull/3675
- https://github.com/vercel/turbo/pull/3723
- https://github.com/vercel/turbo/pull/3677
- https://github.com/vercel/turbo/pull/3717
- https://github.com/vercel/turbo/pull/3701

# Performance Improvements

- https://github.com/vercel/turbo/pull/3361 
- https://github.com/vercel/turbo/pull/3619

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-10 17:40:19 +01:00
LongYinan
221692b32e
build(cargo): update turbopack to turbopack-230201.1 (#45454)
### Features
- https://github.com/vercel/turbo/pull/3514
- https://github.com/vercel/turbo/pull/3530
- https://github.com/vercel/turbo/pull/3510
- https://github.com/vercel/turbo/pull/3497

### Bug fixes
- https://github.com/vercel/turbo/pull/3545
- https://github.com/vercel/turbo/pull/3522
- https://github.com/vercel/turbo/pull/3525
- https://github.com/vercel/turbo/pull/3518
- https://github.com/vercel/turbo/pull/3501
2023-02-01 16:36:43 +01:00
Will Binns-Smith
806c9eeb6c
build(cargo): update turbopack to turbopack-230126.1 (#45322)
**Note**: This requires https://github.com/vercel/next.js/pull/45314,
otherwise the following error is shown, but does not block builds:

```
error - [build] examples/create-app
  Error evaluating Node.js code
  TypeError: makeResolver is not a function
    at getResolveRoute (path/to/next.js/examples/create-app/.next/build/chunks/router.js:21:18)
    at async Module.route (path/to/next.js/examples/create-app/.next/build/chunks/router.js:24:36)
    at async Module.run (path/to/next.js/examples/create-app/.next/build/chunks/[turbopack-node]_ipc_evaluate.ts.js:19:39)
```

### Features

- https://github.com/vercel/turbo/pull/3446
- https://github.com/vercel/turbo/pull/3396
- https://github.com/vercel/turbo/pull/3499

### Bug fixes

- https://github.com/vercel/turbo/pull/3433

### Misc

- https://github.com/vercel/turbo/pull/3479
2023-01-26 14:42:48 -08:00
Will Binns-Smith
3e0231735b
build(cargo): update turbopack to turbopack-230125.1 (#45283) 2023-01-25 19:38:38 -08:00
LongYinan
53be72be37
build(cargo): update turbopack (#45126)
### Features
- https://github.com/vercel/turbo/pull/3409

### Bug Fixes
- https://github.com/vercel/turbo/pull/3399
- https://github.com/vercel/turbo/pull/3412

### Chore
- https://github.com/vercel/turbo/pull/3398
- https://github.com/vercel/turbo/pull/3391
- https://github.com/vercel/turbo/pull/3350
2023-01-21 12:11:12 +00:00
Justin Ridgewell
6294e6aa6b
build(cargo): update turbopack (#45109)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-20 12:24:33 -08:00
JJ Kasper
9db8145858
Update swc_core to v0.56.0 (#44792)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2023-01-20 10:34:09 -08:00
JJ Kasper
fd873a610a
Revert "chore: Update swc_core to v0.53.0" (#44760) 2023-01-10 16:49:32 -08:00
Donny/강동윤
477d081341
chore: Update swc_core to v0.53.0 (#44707)
This PR updates SWC crates to
a225efe363


Blocked by https://github.com/vercel/turbo/pull/3210
2023-01-10 16:37:58 -08:00
Tobias Koppers
6349db80d6
update turbopack for bugfixes (#44251) 2022-12-22 05:08:48 +00:00
OJ Kwon
152411ca6c
build(cargo): update turbopack (#44241)
This PR bumps up turbopack to latest release candidate. Requires https://github.com/vercel/next.js/pull/44223.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-12-21 21:26:49 +00:00
OJ Kwon
1f8dbf20c1
build(cargo): bump up turbopack (#44206)
This PR bumps up turbopack for the next canary release.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-12-20 21:08:23 +00:00
LongYinan
38165640fd
Fix crash in GraalVM (#44176)
Refs:
- https://github.com/oracle/graal/issues/5581
- https://github.com/oracle/graal/issues/5582
- https://github.com/napi-rs/napi-rs/issues/1392
2022-12-20 07:39:15 +00:00
OJ Kwon
e8dc27bb02
build(cargo): update turbopack (#44167)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-12-19 23:18:16 +00:00
OJ Kwon
3dd9af785c
build(cargo): fix turbopack + next-swc build (#43983)
Fixes WEB-301. 

This PR fixes build failure with latest turbopack, also update necessary
dependencies.

---

Edit by @kdy1:
 - Closes https://github.com/vercel/next.js/issues/43052
2022-12-19 13:10:02 -08:00
OJ Kwon
b45c81577c
refactor(next-swc): introduce next-binding to consolidate dependencies. (#43473)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

Partial solutions for WEB-225.

One of the issue we want to improve is version bump process across
multiple dependencies sharing same transitive dependencies. There were
known cases of last-minute build failures of next-swc due to this. The
biggest thing is we have lot of dependenceis rely on swc_core, and
consolidating it altogether is tricky.

PR introduces `next-binding`, which reexports all the related
dependencies that next-swc and turbopack commonly uses. Unfortunately,
this is not a complete solution, but at least it'll make `upfront` cost
to turbopack when it try to update swc_core and others, so by the time
upgrading it in next-swc we expect minimal friction. Note not 0
friction: due to how cargo behaves for the merging all of the features,
there's still chances to have some build failures but meaningfully less
I believe.

I think the easiest way to describe before / after is having some
diagrams. This is rather simplified to illustrate problems easily, i.e
when it comes to actual build if there are same version of deps cargo
will dedupe, so below illustaration only would occur for non-compatible
version cases, etcs.

**Before**
```mermaid
graph TD
    A[next-swc] --> B(next-dev)
    A --> C(swc_core)
    A --> D(swc_emotion)
    D --> E(swc_core)
    A --> F(styled_jsx)
    F --> E
    A --> G(mdxrs)
    G --> H(swc_core)
    B --> I(swc_core)
    B --> J(swc_emotion)
    J --> K(swc_core)
```

**After**
```mermaid
graph TD
    A[next-swc] --> B(next-binding)
    B --> C[swc_core]
    B --> D[swc_emotion]
    D --> I[swc_core]
    B --> H[styled_jsx]
    B --> F[next-dev]
    B --> J[node-file-trace]
    F --> C
    H --> I
    B --> E(mdxrs)
    E --> G(swc_core)
 ```

You can see repeated dependencies (`swc_core`, `swc_emotion`) occurs lot more in next-swc in `before`, including next-swc top level direct import itself. In result, update process have to align between next-swc, turbopack, swc-plugins and others.

With newly proposed changes, `next-swc` no longer directly owns deps reduces those repetaed deps. At the moment of version bump, only `next-binding` need to be updated.

This brings small caveat however : next-swc does not directly update `swc_core`, but have to bump turbopack and its transitive dependencies. Given our bump process usually requires to bump up turbopack anyway, I wouldn't consider this as hard blocking though.
2022-12-16 11:47:56 -08:00
OJ Kwon
f144c39ca4
build(cargo): bump up swc_core, turbopack (#43652)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

Fixes WEB-166.

This supersedes https://github.com/vercel/next.js/pull/43449, updating
swc_core and turbopack both with its transitive dependencies. Version
bump includes one important build side issues to having circular
dependencies.
2022-12-08 12:58:48 -08:00
OJ Kwon
55232c2d0d
fix(next-swc): aarch64 build (#43275)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-11-22 21:02:01 -08:00
OJ Kwon
0d6e689e3d
build(cargo): bump up turbopack (#43273)
This PR bumps up turbopack to latest version.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-11-23 02:22:14 +00:00
Donny/강동윤
3d62f467cf
chore: Update swc_core to v0.43.23 (#42977)
This PR updates swc crates to
a4ed624f81

---

 - Closes https://github.com/vercel/next.js/issues/42978
 - Closes https://github.com/vercel/next.js/issues/42801

<img width="1840" alt="image"
src="https://user-images.githubusercontent.com/29931815/202788043-4ba0c3a4-b4c5-43e7-8eb3-42b8341e5d5f.png">

 - Closes https://github.com/vercel/next.js/issues/43027
<img width="1840" alt="image"
src="https://user-images.githubusercontent.com/29931815/202788522-e4884f91-c83c-45e8-983a-f210144effef.png">

 - Closes https://github.com/vercel/next.js/issues/43042
<img width="1840" alt="image"
src="https://user-images.githubusercontent.com/29931815/202788866-2c319588-5a01-4628-95cc-47bb51e19153.png">

 - Closes https://github.com/vercel/next.js/issues/43060

<img width="1840" alt="image"
src="https://user-images.githubusercontent.com/29931815/202789993-2bf3af55-9752-4aa8-bcc2-98f08ecd47b7.png">


 - Closes https://github.com/vercel/next.js/issues/42852

<img width="1840" alt="image"
src="https://user-images.githubusercontent.com/29931815/202804509-88bb3d55-182d-457d-b59e-d12b30c52100.png">
2022-11-19 18:18:31 -08:00
OJ Kwon
784d9a73d8
build(next-swc): update turbopack to latest (#42733) 2022-11-10 11:52:48 +01:00