Commit graph

105 commits

Author SHA1 Message Date
Leah
ddc8f50d24
enable @vercel/og support for turbopack (#53917)
### What?

Now that we have wasm support (and support for `?module`) `@vercel/og` should be supported

### Turbopack updates

* https://github.com/vercel/turbo/pull/5677 
* https://github.com/vercel/turbo/pull/5660 

Closes WEB-138
2023-08-11 22:16:41 +00:00
Tobias Koppers
45576ae752
Turbopack: more tests and bugfixes for next.rs api (#53809)
### What?

* adds more HMR test cases
* fixes bugs found

### Why?

### Turbopack changes

* https://github.com/vercel/turbo/pull/5668 <!-- OJ Kwon - ci(test):
temporarily increase test timeout -->
* https://github.com/vercel/turbo/pull/5696 <!-- Tobias Koppers -
Cleanup minify -->
2023-08-11 10:29:36 +02:00
Tobias Koppers
9d1b3f43a1
Turbopack: add hmr test case and fix bugs (#53719)
### What?

test case for HMR

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5686 <!-- Tobias Koppers - remove
error in update -->
2023-08-08 17:07:24 +02:00
Alex Kirszenberg
589150184e
Turbopack: Hide Turbo Engine internals (#53007)
See https://github.com/vercel/turbo/pull/5584
2023-08-07 14:55:13 +00:00
Alex Kirszenberg
9483ff170a
Initial HMR Nexturbo API implementation (#52950)
This implements a MVP of HMR. HMR works similarly as in turbopack-dev-server, but instead of going through the router to retrieve output assets, output assets are eagerly stored into a global hash map, and retrieved directly from there (see `VersionedContentMap`).

This will require some more glue on the Next.js side in order to handle:
* RSC headers;
* handling Turbopack subscriptiob HMR events from the Next.js WS server, proxying them to `hmr_events`, and sending back the stream of updates.

There's currently no way to evict deleted output assets, nor to communicate these events to the client. @sokra mentioned the `VersionedContentMap` could store a list of assets per entrypoint, instead of having a top-level flat map.

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-08-07 10:37:57 +00:00
Will Binns-Smith
1d8a633595
Update to turbopack-230804.2 (#53588)
- vercel/turbo#5671
- vercel/turbo#5675
- vercel/turbo#5676
- vercel/turbo#5662
- vercel/turbo#5663
2023-08-04 21:51:35 +00:00
Tobias Koppers
94709ef1b9
update turbopack and update code for API changes (#53576)
* https://github.com/vercel/turbo/pull/5640
* https://github.com/vercel/turbo/pull/5661
2023-08-04 21:14:41 +02:00
Tobias Koppers
4ea1d8a45d
update turbopack (#53545)
* https://github.com/vercel/turbo/pull/5582 
* https://github.com/vercel/turbo/pull/5633 
* https://github.com/vercel/turbo/pull/5637 
* https://github.com/vercel/turbo/pull/5648 <!-- OJ Kwon - test(turbopack): run daily with --experimental  -->
* https://github.com/vercel/turbo/pull/5618 
* https://github.com/vercel/turbo/pull/5624 
* https://github.com/vercel/turbo/pull/5597 
* https://github.com/vercel/turbo/pull/5632 
* https://github.com/vercel/turbo/pull/5636 
* https://github.com/vercel/turbo/pull/5666
2023-08-04 07:19:20 +00:00
Tobias Koppers
60cee33fd6
update swc_core and sync deps (#53538)
### What?

sync deps with turbo

### Why?

`wat` and `swc_core` requires syncing deps

### How?
2023-08-03 17:55:45 +00:00
Donny/강동윤
c02dcd540c
Update swc_core to v0.79.38 (#53508)
### What?

Update `swc_core`

### Why?

To apply one more fix for the SWC minifier

 - https://github.com/swc-project/swc/pull/7743

### How?

Closes WEB-1340
2023-08-03 06:55:33 +00:00
Donny/강동윤
c017765ef2
Update swc_core to v0.79.36 (#53416)
### What?

Update `swc_core` to 383509fd9d

### Why?

To fix minifier regression.

### How?

 - Closes WEB-1326
 - Fixes #53151
 - Fixes #53286
 - Fixes #53273
2023-08-02 21:59:19 +00:00
JJ Kasper
e1a10c60f8
Revert "Update swc_core to v0.79.33 (#53308)" (#53381)
This reverts commit da043b5535.

x-ref: https://github.com/vercel/next.js/pull/53380
2023-07-31 06:35:38 -07:00
Donny/강동윤
da043b5535
Update swc_core to v0.79.33 (#53308)
### What?

Update `swc_core` to 00a0575408

### Why?

To fix minifier regression.

### How?

 - Closes WEB-1326
 - Fixes #53151
 - Fixes #53286
 - Fixes #53273
2023-07-29 07:58:03 +00:00
Tobias Koppers
3abaa85977
update turbopack (#53291)
* https://github.com/vercel/turbo/pull/5626 <!-- Tobias Koppers - remove
require.cache clear from chunk loading -->
2023-07-28 22:57:36 -07:00
Alex Kirszenberg
f8107f0abb
Turbopack: Update Turbopack (#53266)
* https://github.com/vercel/turbo/pull/5621 <!-- Tobias Koppers - fix
esm export in build runtime -->
* https://github.com/vercel/turbo/pull/5620 <!-- Tobias Koppers - Revert
"export namespace object instead commonjs interop object" -->
2023-07-27 12:00:13 -07:00
Tobias Koppers
a1adaf89ef
update turbopack (#53221)
* https://github.com/vercel/turbo/pull/5619 <!-- Tobias Koppers - export
namespace object instead commonjs interop object -->
2023-07-26 11:56:08 -07:00
OJ Kwon
974accc2c7
feat(turbopack): embed build time info, emits next features telemetry event (#53028)
### What?

closes WEB-1301. To collect some information inside of rust binary, embed it as build-time constant. It supersedes existing target triple embedding as well.
2023-07-26 17:49:34 +00:00
Tobias Koppers
c8eb7f3de0
update Turbopack (#53098)
* https://github.com/vercel/turbo/pull/5574
2023-07-24 07:18:27 +00:00
Tobias Koppers
1717d1e986
Turbopack: Refactoring module references (#52930)
### What?

see https://github.com/vercel/turbo/pull/5572

### Why?

### How?
2023-07-21 10:37:57 +00:00
Donny/강동윤
84820c900f
Update swc_core to v0.79.22 (#52945)
### What?

Update swc_core to `v0.79.22` and other SWC crates to the latest.
### Why?

This is for further next.js work: https://vercel.slack.com/archives/C02HY34AKME/p1689768597095499


### How?

Closes WEB-1299

turbopack counterpart: https://github.com/vercel/turbo/pull/5575

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-07-21 10:01:08 +00:00
Tobias Koppers
e88777267a
update Turbopack (#52986)
* https://github.com/vercel/turbo/pull/5567 <!-- Alex Kirszenberg -
Remove unnecessary ValueDebugFormat item, hide Vc field -->
* https://github.com/vercel/turbo/pull/5576 <!-- Alex Kirszenberg -
Extract shared HMR utils to their own modules/crates -->
* https://github.com/vercel/turbo/pull/5503 <!-- OJ Kwon -
feat(turbopack_core): define trait for diagnostics -->
* https://github.com/vercel/turbo/pull/5487 <!-- Will Binns-Smith -
turbopack-cli: modularize code to support turbopack build -->
* https://github.com/vercel/turbo/pull/5488 <!-- Will Binns-Smith -
turbopack-cli: implement `turbopack build` -->
* https://github.com/vercel/turbo/pull/5450 <!-- Leah - feat: async
modules / top level await -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-21 10:34:35 +02:00
Tobias Koppers
446b172780
update turbopack (#52899)
* https://github.com/vercel/turbo/pull/5563
2023-07-19 18:17:57 +00:00
Tobias Koppers
0aeda3aedc
Turbopack: ensure output assets reference only output assets (#52832)
### What?

refactoring see https://github.com/vercel/turbo/pull/5557

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5506 <!-- Leah -
feat(turbopack-ecmascript): implement acyclic SCC graph for ESM imports
-->
* https://github.com/vercel/turbo/pull/5557 <!-- Tobias Koppers - Ensure
output assets reference only output assets -->
2023-07-18 21:54:38 +02:00
Tobias Koppers
3f1b9178cc
Turbopack: move references() to specific traits (#52822)
### What?

refactoring

see https://github.com/vercel/turbo/pull/5555

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5544 <!-- Tobias Koppers - add
direct cycle detection -->
* https://github.com/vercel/turbo/pull/5547 <!-- Alex Kirszenberg - Add
missing feature to syn -->
* https://github.com/vercel/turbo/pull/5555 <!-- Tobias Koppers - move
references() to specific traits -->
2023-07-18 15:32:00 +02:00
Tobias Koppers
80572b373f
Turbopack: move Asset::ident to more specific traits (#52683)
### What?

see https://github.com/vercel/turbo/pull/5528

### Turbopack Changes
2023-07-17 17:07:05 +00:00
Alex Kirszenberg
dd56a77e91
Turbopack: Experimental dev app pages support (#52680)
This implements app pages and routes for the Nexturbo API.

## Turbopack updates

* https://github.com/vercel/turbo/pull/5527 <!-- Alex Kirszenberg -
AdjacencyMap::reverse_topological (+ fixes) -->
2023-07-17 18:03:14 +02:00
Alex Kirszenberg
5964b289e1
Turbopack: Vc<T> and Turbo Engine type system improvements (#51792)
This is the Next.js side of https://github.com/vercel/turbo/pull/4587, which makes changes to Turbo Engine to allow expressing value cells as `Vc<Type>` instead of `TypeVc`, leveraging the type system to bring a slew of other improvements to writing Turbo Engine code.

## Turbopack updates

* https://github.com/vercel/turbo/pull/4587
2023-07-16 13:56:20 +00:00
Tobias Koppers
ca1129c463
Turobpack: Next.rs API (part 1) (#52259)
### What?

Creates a NAPI api for Next.rs to be used in Next.js

### Why?

### How?



Co-authored-by: Alex Kirszenberg <1621758+alexkirsz@users.noreply.github.com>
2023-07-13 17:17:38 +00:00
Tobias Koppers
ee28f947fb
Turbopack: OutputAsset trait (#52606)
### What?

refactoring for cleaner typing of assets

see https://github.com/vercel/turbo/pull/5507
2023-07-13 13:26:15 +00:00
Alex Kirszenberg
38dafa1609
Turbopack: App Router build POC (#52036)
This PR adds proof-of-concept support for the App Router to `next build
--experimental-turbo`.

It introduces a new way to generate Next.js manifests in Turbopack.
Currently, in dev, we pass proxy objects in lieu of manifests, and rely
on the entries to know which chunks they need loaded on the client.
However, this can't work for builds because it requires control over
Next.js rendering, which is not compatible with a Next->Turbo approach.
We would need to modify Next.js to support these "lazy" entries. So for
now, we add well-known assets (`NextDynamicAsset`,
`NextServerComponentAsset`, `NextClientReferenceAsset`, etc.) to the
graph, which will get picked up when walking it during asset processing.
This lets us collect all possible entries before chunking.

This two-step process (collecting all entries, then chunking them) is
also a good first step towards production chunking.

## Turbopack updates

* https://github.com/vercel/turbo/pull/5494 <!-- Tobias Koppers - add
reporting of console messages -->
* https://github.com/vercel/turbo/pull/5448 <!-- Alex Kirszenberg -
Misc. changes to support App Router build -->
2023-07-12 11:26:48 +02:00
Tobias Koppers
56fcd7ac33
Turbopack: Source trait (#52511)
### What?

refactoring see https://github.com/vercel/turbo/pull/5483

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5483 <!-- Tobias Koppers - Source
trait -->
2023-07-11 12:34:32 +02:00
Tobias Koppers
8643014b13
turbopack: Module Trait (#52401)
### What?

refactoring see https://github.com/vercel/turbo/pull/5477

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-10 14:35:53 +02:00
Alex Kirszenberg
b8589dfdb0
Update Rust nightly toolchain (#51757)
Matching turbo PR: https://github.com/vercel/turbo/pull/5376

## Turbopack updates

* https://github.com/vercel/turbo/pull/5376 <!-- Alex Kirszenberg -
Update nightly toolchain -->
2023-07-07 18:17:07 -04:00
Donny/강동윤
d11aafb740
Update swc_core to v0.79.13 (#52371)
### What?

Update SWC crates to `v0.79.13`.

### Why?

 - Explicit resource management proposal is now fully implemented, although it's behind a parser flag because it's stage 3
 - Some bugs of `swcMinify` are fixed.

### How?

Closes WEB-1272

## Turbopack updates

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


Co-authored-by: Alex Kirszenberg <1621758+alexkirsz@users.noreply.github.com>
2023-07-07 19:37:05 +00:00
Alex Kirszenberg
ec19537127
Named page chunks (#51921)
Depends on https://github.com/vercel/turbo/pull/5398 (and downstack) on
the Turbo side.

This PR makes it so the output path of Node.js entry chunks for pages is
determined solely from the pathname. This isn't actually necessary for
pages, but it makes for easier debugging anyway. See the Turbo PR for
more details.

This also changes the page structure so it also works if there is no
`pages` directory. In this case, we still want to use pages' default
_app, _document, and _error pages, even with existing app routes. So an
empty page structure should still have an effect.

## Turbopack updates

* https://github.com/vercel/turbo/pull/5415 <!-- Will Binns-Smith -
Turbopack: Execution tests in node.js -->
* https://github.com/vercel/turbo/pull/5461 <!-- Tobias Koppers - use a
lock to ensure atomic invalidation from file changes -->
* https://github.com/vercel/turbo/pull/5398 <!-- Alex Kirszenberg -
Configure the path of the Node.js entry chunk -->
* https://github.com/vercel/turbo/pull/5469 <!-- Tobias Koppers - allow
hmr tests to correctly detect hmr event -->
2023-07-06 16:31:22 +02:00
Alex Kirszenberg
3406e13ab0
Update Turbopack (#52198)
## Turbopack updates

* https://github.com/vercel/turbo/pull/5457 
* https://github.com/vercel/turbo/pull/5458
2023-07-04 15:56:09 +00:00
Alex Kirszenberg
13cfc2bf4d
Update CustomModuleType import (#52133)
https://github.com/vercel/turbo/pull/5397

## Turbopack updates

* https://github.com/vercel/turbo/pull/5419 
* https://github.com/vercel/turbo/pull/5397
2023-07-04 12:39:41 +00:00
Tobias Koppers
532f779782
update turbopack (#52186)
* https://github.com/vercel/turbo/pull/5395 
* https://github.com/vercel/turbo/pull/5452
2023-07-04 11:54:40 +00:00
Jiachi Liu
cd9372c175
Reland "ReverseTopological -> AdjacencyMap"" (#52142)
Reverts vercel/next.js#52139
2023-07-03 19:13:50 +00:00
Jiachi Liu
4b4731dfbe
Revert "ReverseTopological -> AdjacencyMap" (#52139)
Reverts vercel/next.js#52032

Will reland after the release
2023-07-03 16:33:24 +00:00
Alex Kirszenberg
f6a152287a
ReverseTopological -> AdjacencyMap (#52032)
See https://github.com/vercel/turbo/pull/5430

## Turbopack changes

* https://github.com/vercel/turbo/pull/5430 <!-- Alex Kirszenberg -
ReverseTopological -> AdjacencyMap -->
2023-07-03 14:40:41 +02:00
Alex Kirszenberg
805bfa45e0
Remove EnvironmentIntention (#51965)
See https://github.com/vercel/turbo/pull/5420

# Turbopack changes

* https://github.com/vercel/turbo/pull/5420 
* https://github.com/vercel/turbo/pull/5387
2023-07-03 09:03:37 +00:00
Tobias Koppers
d443778163
Refactor ContentSources to RouteTree (#51660)
### What?

This fixes a performance problem when many pages are involved.

fixes WEB-1067

see also https://github.com/vercel/turbo/pull/5360

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5416 
* https://github.com/vercel/turbo/pull/5360
2023-06-30 16:03:24 +00:00
Leah
484bdebc24
Update turbopack and swc_core to v0.78.24 (#51943)
Reverts #51940

### What?

Update SWC crates and turbopack

### Turbopack Updates

* https://github.com/vercel/turbo/pull/5366 <!-- Justin Ridgewell - Fix
bug with `imports` field from a nested directory -->
* https://github.com/vercel/turbo/pull/5361 <!-- Tobias Koppers - update
for next.js changes to env vars -->
* https://github.com/vercel/turbo/pull/5311 <!-- OJ Kwon -
test(filetrace): skip failing tests -->
* https://github.com/vercel/turbo/pull/5402 <!-- Leah - reduce indent in
`analyze_ecmascript_module` by splitting the function up -->
* https://github.com/vercel/turbo/pull/5412 <!-- Leah - Update
`swc_core` to `v0.78.24` -->

Closes WEB-1174

Turbopack counterpart: https://github.com/vercel/turbo/pull/5412

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-29 15:11:57 +02:00
Leah
fd13fb5e64
Revert "Update swc_core to v0.78.24" (#51940)
Reverts vercel/next.js#51857

Because a turbopack update with the matching swc versions wasn't
included, this would increase the binary size
2023-06-28 19:35:04 +02:00
Donny/강동윤
e05c8c2d7e
Update swc_core to v0.78.24 (#51857)
### What?

Update SWC crates

### Why?

There were many fixes.

### How?

Closes WEB-1174


Turbopack counterpart: https://github.com/vercel/turbo/pull/5288
2023-06-28 16:04:35 +00:00
JJ Kasper
d457e989ff
Revert "Update swc_core to v0.78.15" (#51716)
Reverts vercel/next.js#51269

This is breaking some builds it looks like

x-ref: https://github.com/vercel/next.js/actions/runs/5357843108/jobs/9719367732
x-ref: https://github.com/vercel/next.js/actions/runs/5357843108/jobs/9719368519
2023-06-23 17:12:47 +00:00
Donny/강동윤
5f3d7c43ea
Update swc_core to v0.78.15 (#51269)
### What?

Update SWC crates to 8b765e6763

### Why?

There were many patches.

### How?

Closes WEB-1174

Turbopack counterpart: https://github.com/vercel/turbo/pull/5288
2023-06-23 11:40:11 +00:00
Tobias Koppers
5abeb99b49
add edge rendering for app dir for Turbopack (#51666)
relanding #50830 and #51631 

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5254 <!-- OJ Kwon - ci(workflow):
upload daily next.js test trace -->
* https://github.com/vercel/turbo/pull/5363 <!-- Tobias Koppers -
disable default features for turbopack-ecmascript-plugins -->
2023-06-23 07:08:17 +02:00
JJ Kasper
d0e7d04dc5
Revert "add edge rendering for app dir for Turbopack" (#51659)
Reverts vercel/next.js#51631

This breaks the windows builds

x-ref:
https://github.com/vercel/next.js/actions/runs/5344032749/jobs/9687974376
x-ref:
https://github.com/vercel/next.js/actions/runs/5344032749/jobs/9687973522
2023-06-22 08:49:50 -07:00