Commit graph

277 commits

Author SHA1 Message Date
Justin Ridgewell
2af1e784c2
turbopack: Chunking Refactor Step 2 (#56504)
### What?

The second step in our chunking refactoring, this removes our use of Module::as_chunk and Module::as_root_chunk. Instead, the only way to generate a chunk is directly from a root ChunkItem.

### Why?

In the end we want to avoid creating chunks from modules directly, but enforce everything going through the ChunkingContext to be chunked. This allows us to replace the existing chunking algorithm with a much more efficient one that avoid duplication between chunks in first place and doesn't require a post-chunking optimization.

### How?

https://github.com/vercel/turbo/pull/6120

Re: https://github.com/vercel/next.js/pull/56467
Closes WEB-1721

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-10-06 06:29:14 +00:00
Tobias Koppers
666ce7bd8b
Chunking Refactor Step 1 (#56467)
### What?

This change moves a few methods around.

Module::as_chunk is moved to ChunkItem::as_chunk as temporary intermediate state.
EcmascriptPlaceable::as_chunk_item is moved to ChunkableModule::as_chunk_item. This generalizes the concept of converting a Module into a ChunkItem


### Why?

This is the first step of refactoring the chunking. In the end we want to avoid creating chunks from modules directly, but enforce everything going through the ChunkingContext to be chunked. This allows us to replace the existing chunking algorithm with a much more efficient one that avoid duplication between chunks in first place and doesn't require a post-chunking optimization.

### How?

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

Closes WEB-1715

Co-authored-by: Justin Ridgewell <112982+jridgewell@users.noreply.github.com>
2023-10-05 20:05:05 +00:00
Justin Ridgewell
feca3ce21c
Turbopack: Implement Server Actions (#53890)
### What?

This implements Server Actions inside the new Turbopack next-api bundles.

### How?

Server Actions requires:
1. A `.next/server/server-reference-manifest.json` manifest describing what loader module to import to invoke a server action
2. A "loader" entry point that then imports server actions from our internal chunk items
3. Importing the bundled `react-experimental` module instead of regular `react`
4. A little 🪄 pixie dust
5. A small change in the magic comment generated in modules that export server actions

I had to change the magic `__next_internal_action_entry_do_not_use__` comment generated by the server actions transformer. When I traverse the module graph to find all exported actions _after chunking_ has been performed, we no longer have access to the original file name needed to generate the server action's id hash. Adding the filename to comment allows me to recover this without overcomplicating our output pipeline.

Closes WEB-1279
Depends on https://github.com/vercel/turbo/pull/5705

Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-10-04 23:33:21 +00:00
Tobias Koppers
e043e1f1c6
update turbopack (#56285)
* https://github.com/vercel/turbo/pull/6062 
* https://github.com/vercel/turbo/pull/6061 
* https://github.com/vercel/turbo/pull/6045 

Closes WEB-1695
2023-10-02 07:38:44 +00:00
Donny/강동윤
bf35b47bb4
Update swc_core to v0.83.28 (#56134)
### What?

 - Use better implementation for `react-remove-properties` and `remove-conosle`.

### Why?


I concluded `react-remove-properties` and `remove-conosle` deserve official plugins, so I promoted them.

 - https://github.com/swc-project/plugins/pull/213
 - https://github.com/swc-project/plugins/pull/215


### How?



 - Closes WEB-1638
 - Closes WEB-1633
 - Closes NEXT-1657
 - Closes #55679

---

# Turbopack changes


* https://github.com/vercel/turbo/pull/6003
2023-09-29 13:08:26 +00:00
Tobias Koppers
d75110529b
update turbopack (#56197)
* https://github.com/vercel/turbo/pull/6051 <!-- Tobias Koppers -
Performance Improvements (1) -->
* https://github.com/vercel/turbo/pull/6053 <!-- Tobias Koppers -
Performance Improvements (2) -->
* https://github.com/vercel/turbo/pull/6055 <!-- Tobias Koppers -
Performance Improvements (4) -->

Closes WEB-1684
2023-09-29 10:59:01 +02:00
Will Binns-Smith
741114adea
Turbopack: add support for an assetPrefix and basePath (#56058)
Depends on vercel/turbo#6036

This constructs a general asset prefix (depending on if basePath and/or assetPrefix is defined), and sets it on Next's and Turbopack's chunking context.

Test Plan: Use a `create-next-app` with corresponding Next.js PR and basePath and assetPrefix specified.

Tested:
- Browser (async) chunk loading
- Static asset loading on server and browser

Closes WEB-1666
2023-09-29 01:43:29 +00:00
Tobias Koppers
cd70065bad
Fixes performance problems due to TaskScopes (#55721)
### What?

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

### Turobopack changes

* https://github.com/vercel/turbo/pull/6009 <!-- OJ Kwon - ci(workflow):
update test filter -->
* https://github.com/vercel/turbo/pull/6026 <!-- Will Binns-Smith -
Remove next-dev references and benchmarks -->
* https://github.com/vercel/turbo/pull/6038 <!-- Tim Neutkens - Remove
test-prod action -->
* https://github.com/vercel/turbo/pull/6039 <!-- Tim Neutkens - Fix
action dependency -->
* ~https://github.com/vercel/turbo/pull/6036~ <!-- Will Binns-Smith -
Turbopack: add support for an asset prefix (and basePath in Next.js) -->
* https://github.com/vercel/turbo/pull/5992 <!-- Tobias Koppers -
refactor TaskScopes to use an aggregation tree -->


Closes WEB-1622
2023-09-28 09:40:21 +02:00
Tobias Koppers
a751bbf642
Revert "Update swc_core to v0.83.26" (#56077)
Reverts vercel/next.js#55780

This should not merge this a Cargo.toml pointing to a branch

@kdy1 

Closes WEB-1669
2023-09-27 11:55:00 +02:00
Donny/강동윤
81d2926e19
Update swc_core to v0.83.26 (#55780)
### What?

 - Use better implementation for `react-remove-properties` and `remove-conosle`.

### Why?


I concluded `react-remove-properties` and `remove-conosle` deserve official plugins, so I promoted them.

 - https://github.com/swc-project/plugins/pull/213
 - https://github.com/swc-project/plugins/pull/215


### How?



 - Closes WEB-1638
 - Closes WEB-1633
 - Closes NEXT-1657
 - Closes #55679
2023-09-27 09:47:57 +00:00
Will Binns-Smith
9ac463b218
Remove next-dev and its test suite and benchmarks (#55983)
We've rearchitected Next.js+Turbopack so Turbopack does not run
reimplement pieces of Next.js in its devserver. This:

- Removes the `next-dev` binary, which is no longer reachable through
`next --turbo`.
- Removes its test suite, as much of it is tested (and often more
thoroughly) by the Next.js test suite
- Removes its benchmark suite, which should be covered by
`Turbopack-bench` by
https://github.com/vercel/turbo/tree/main/crates/turbopack-bench

Test Plan: CI


Closes WEB-1652
2023-09-26 05:22:39 +02:00
Will Binns-Smith
816033a679
Update rust toolchain to nightly-2023-09-21 (#55774)
This:

- Updates to the latest api change for `StdError` in `error_generic_member_access` rust-lang/rust#99301
- Updates `pathfinder_simd` for compatiblity


Closes WEB-1636
2023-09-22 19:12:25 +00:00
Leah
7fa1618ef7
chore: update turbopack to turbopack-230922.2 (#55828) 2023-09-22 18:52:18 +02:00
OJ Kwon
a429e04fec
test(turbopack) migrate api tests, few image tests (#55552)
### What?

PR migrates next-dev's api tests to use next.js integration tests, as well as enabling few more image tests.

Closes WEB-1599
2023-09-19 20:14:53 +00:00
Tobias Koppers
eaa4d02ac9
update turbopack (#55515)
And sync deps so they don't conflict

* https://github.com/vercel/turbo/pull/5959 <!-- Tobias Koppers - reduce
number of task in async_module -->
* https://github.com/vercel/turbo/pull/5960 <!-- Tobias Koppers - reduce
unneccessary fs tasks -->
* https://github.com/vercel/turbo/pull/5955 <!-- Tobias Koppers -
bumping minor or major should reset patch/minor -->

Closes WEB-1592

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-18 11:48:36 +02:00
Donny/강동윤
ad79325a9f
Update swc_core to v0.83.12 (#55216)
### What?

I made `styled-jsx` configurable. It uses `swc_css` by default, and with
`useLigntningcss: true`, it uses it.

https://github.com/swc-project/plugins/pull/207

### Why?

### How?

Closes NEXT-
Fixes #



Closes WEB-1532
2023-09-15 17:41:05 +02:00
Justin Ridgewell
d2641bd072
Update turbopack (#55402)
* https://github.com/vercel/turbo/pull/5952 
* https://github.com/vercel/turbo/pull/5938 

Closes WEB-1566
2023-09-14 22:11:12 +00:00
Tobias Koppers
129f56d3e7
more turbopack HMR fixes and test case (#55368)
### What?

improve test case to check HMR
reenable deduplication for server side hmr events
add aggregation of client side HMR events

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5936 <!-- Will Binns-Smith -
Update http mock and clap -->
* https://github.com/vercel/turbo/pull/5948 <!-- Tobias Koppers - CSS
HMR fixes -->



Closes WEB-1557

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-14 15:50:59 +02:00
Will Binns-Smith
8f30255922
Revert swc versions to one that doesn't use lightningcss (#55148)
Using lightningcss results in a breaking change to Next.js, so let's revert swc for now.


Closes WEB-1526
2023-09-08 20:02:51 +00:00
Leah
b5d752667a
feat(turbopack): add dynamic metadata support (#54995)
Closes NEXT-1435
Closes WEB-1435
2023-09-08 18:25:13 +00:00
Justin Ridgewell
2b9ffb009c
Update turbopack (#54909)
Minor update that includes changes necessary to get HMR errors working.

Closes WEB-1494
2023-09-02 10:45:49 +00:00
Donny/강동윤
a5c180388a
Update swc_core to v0.82.11 (#54653)
### What?

Update swc crates to
44de87f481

### Why?

To use `import with` and etc...

### How?

Closes WEB-1460
Fixes #

---

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

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-09-01 15:35:04 +02:00
Tobias Koppers
523d376ae3
update turbopack (#54768)
* https://github.com/vercel/turbo/pull/5793 <!-- Alex Kirszenberg -
Automatically derive ValueDefault for primitive value types -->
* https://github.com/vercel/turbo/pull/5784 <!-- Tobias Koppers - make
swc comments immutable -->
* https://github.com/vercel/turbo/pull/5627 <!-- Tobias Koppers - avoid
unnessecary indirection in async modules -->
* https://github.com/vercel/turbo/pull/5822 <!-- Tobias Koppers -
continue on failing test steps -->
* https://github.com/vercel/turbo/pull/5814 <!-- Justin Ridgewell -
Update HMR for next-api -->
* https://github.com/vercel/turbo/pull/5821 <!-- Tobias Koppers - avoid
cloning a large list of task ids -->

Closes WEB-1473
2023-08-30 13:55:51 +02:00
Tobias Koppers
08d3258762
update turbopack (#54558)
* https://github.com/vercel/turbo/pull/5723 <!-- Alex Kirszenberg - Misc
comments in turbo_tasks -->
* https://github.com/vercel/turbo/pull/5714 <!-- OJ Kwon - test(ci):
update datadog-ci -->
* https://github.com/vercel/turbo/pull/5705 <!-- Justin Ridgewell -
Transformation code necessary to support Server Actions -->
* https://github.com/vercel/turbo/pull/5739 <!-- Justin Ridgewell -
Update rust toolchain -->
* https://github.com/vercel/turbo/pull/5785 <!-- Tobias Koppers - add
evaluatables to chunk list ident -->
* https://github.com/vercel/turbo/pull/5783 <!-- Tobias Koppers -
Tracing improvements -->
* https://github.com/vercel/turbo/pull/5738 <!-- Alex Kirszenberg -
Generic types over Vcs -->
* https://github.com/vercel/turbo/pull/5795 <!-- Leah - fix: snapshot
test path canonicalization -->
* https://github.com/vercel/turbo/pull/5794 <!-- Tobias Koppers - fix
"any" context condition implementation -->
* https://github.com/vercel/turbo/pull/5800 <!-- Tobias Koppers - add
middleware entry type -->
* https://github.com/vercel/turbo/pull/5786 <!-- Tobias Koppers -
perform invalidation directly on writes -->

Closes WEB-1446
2023-08-25 16:22:35 +02:00
Donny/강동윤
c792baa7ce
Update swc_core to v0.79.70 (#54368)
### What?

Update swc_core to `v0.79.70`

### Why?

To apply https://github.com/swc-project/swc/pull/7839

### How?

Closes WEB-1420
Fixes #54192
2023-08-22 20:46:00 +00:00
Donny/강동윤
d2a8d4fa2d
Update swc_core to v0.79.69 (#54190)
### What?

Update swc crates to becea47a2d

### Why?

x-ref: https://vercel.slack.com/archives/C02HY34AKME/p1692293544442219

### How?

Closes WEB-1410
2023-08-20 10:55:41 +00:00
Justin Ridgewell
11dfdf8d7a
Turbopack: Strip relative path prefix when generating PageLoaderAsset (#54040)
### What?

Strip the relative path prefix (`_next/`) when generating the `PageLoaderAsset`. This is necessary because the page loader will internally use `__turbopack_load__`, which prepends the prefix back onto the path.

### Why?

Without this, we'd try loading `_next/_next/path/to/file.js`, because we'd prepend the prefix onto a path that already contains it.

### How?

When generating the page loader asset, we "proxy" the `OutputAsset` onto a path which has the prefix removed.

~~Depends on https://github.com/vercel/turbo/pull/5717~~

Closes WEB-1377
2023-08-17 17:29:30 +00:00
Donny/강동윤
bc76784bcb
Update swc_core to v0.79.59 (#54082)
### What?

Update swc crates to 023042dfb9

### Why?

To apply https://github.com/swc-project/swc/pull/7813

### How?

Closes WEB-1396
Fixes #54054
2023-08-16 13:07:57 +00:00
Will Binns-Smith
bd8ab094e5
Turbopack: fix hiding node_modules warnings in error overlay. (#54022)
This regressed in vercel/turbo#5661 when `context` was renamed `file_path`.
2023-08-14 21:38:52 +00:00
Donny/강동윤
c802075827
Update swc_core to v0.79.55 (#53831)
### What?

Update swc crates to 54f38cb47e

### Why?

To apply minifier bugfixes.

### How?

Closes WEB-1358
Fixes #53723

---

turbopack counterpart: https://github.com/vercel/turbo/pull/5699
2023-08-11 22:38:44 +00:00
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
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
Tobias Koppers
99ec3057d7
add edge rendering for app dir for Turbopack (#51631)
## What

* reland #50830 
* remove Object.hasOwn
* fix CSS chunks in edge runtime

## Turbopack Changes

* https://github.com/vercel/turbo/pull/5253 <!-- OJ Kwon -
fix(turbopack): enable runtime flag -->
* https://github.com/vercel/turbo/pull/5295 <!-- Will Binns-Smith -
remove `__internal_nextjs_integration_test` compile-time feature -->
* https://github.com/vercel/turbo/pull/4362 <!-- Donny/강동윤 - Make build
faster -->
* https://github.com/vercel/turbo/pull/5352 <!-- Tobias Koppers - only
wait for JS chunks in none runtime backend -->
2023-06-22 11:43:59 +02:00
Alex Kirszenberg
c6313606c9
Next Build Turbo POC (2) (#51546)
Another attempt at getting https://github.com/vercel/next.js/pull/49942 in.

This time, the mold install step is gated to Linux.
2023-06-22 08:03:44 +00:00
Tobias Koppers
a806f1ad84
Update turbopack (#51336)
### What?

update Turbopack and sync dependencies with turbo

### Turbopack changes

* https://github.com/vercel/turbo/pull/5303
2023-06-15 09:39:17 +00:00
Tobias Koppers
6b0a6f0c25
add turbopack integration tests to CI (#50904)
### What?

* enable turbopack tests in new CI
* split pre-build step into native and JS builds to allow to start
native tests faster
* update swc_core to sync with turbo
* update turbopack

### Why?

Running our test suite is still important as long we don't have the full
integration test suite enabled.

### Turbopack updates

* https://github.com/vercel/turbo/pull/5215 <!-- OJ Kwon - ci(workflow):
upload benchmark results to datadog -->
* https://github.com/vercel/turbo/pull/5239 <!-- OJ Kwon -
fix(swc_plugin): use shared runtime -->
* https://github.com/vercel/turbo/pull/3090 <!-- CHEN Yuan - Docs: prior
to run testcases, add guides to install dependencies for testcases. -->
* https://github.com/vercel/turbo/pull/5264 <!-- Tobias Koppers - update
test runner -->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-12 07:47:43 -07:00
JJ Kasper
22ea7d9909
Revert "Revert "update turbopack"" (#50947)
Fixed in https://github.com/vercel/next.js/pull/50946

Reverts vercel/next.js#50942
2023-06-08 04:02:03 +00:00
JJ Kasper
2a62513ecd
Revert "update turbopack" (#50942)
The builds are failing 

x-ref:
https://github.com/vercel/next.js/actions/runs/5206362546/jobs/9392872573
x-ref:
https://github.com/vercel/next.js/actions/runs/5206362546/jobs/9392873009
x-ref:
https://github.com/vercel/next.js/actions/runs/5206362546/jobs/9392873120

Reverts vercel/next.js#50819
2023-06-07 19:02:29 -07:00
Leah
0d46361f8e
update turbopack (#50819)
### Turbopack Updates
* https://github.com/vercel/turbo/pull/5156 
* https://github.com/vercel/turbo/pull/5159 
* https://github.com/vercel/turbo/pull/5162 
* https://github.com/vercel/turbo/pull/5161 

* https://github.com/vercel/turbo/pull/5174 
* https://github.com/vercel/turbo/pull/5178 
* https://github.com/vercel/turbo/pull/5121 
* https://github.com/vercel/turbo/pull/5200 
* https://github.com/vercel/turbo/pull/5207 
* https://github.com/vercel/turbo/pull/5211 
* https://github.com/vercel/turbo/pull/5210 
* https://github.com/vercel/turbo/pull/5221 
* https://github.com/vercel/turbo/pull/5218 
* https://github.com/vercel/turbo/pull/5226 
* https://github.com/vercel/turbo/pull/5139 
* https://github.com/vercel/turbo/pull/5227 
* https://github.com/vercel/turbo/pull/5189
2023-06-08 01:23:14 +00:00
OJ Kwon
78ed08d88e
fix(next-swc): reenable filesystem cache (#50651)
### What?

Quick fix for the regressions that next.js cannot load plugin due to missing filesystem cache.
2023-06-05 15:42:13 +00:00
Leah
eb85e79941
fix @vercel/turbopack-node types (and more turbopack updates) (#50605)
for #50557 

## Turbopack Updates

* https://github.com/vercel/turbo/pull/5131 <!-- Tobias Koppers - sync
dependencies with next.js -->
* https://github.com/vercel/turbo/pull/5138 <!-- Justin Ridgewell - Fix
`vdbg!` depth and JSON error messages -->
* https://github.com/vercel/turbo/pull/5141 <!-- Leah - fix
`@vercel/turbopack-node` types by adding reference to compiled package
-->
2023-06-01 15:27:13 +00:00
Tobias Koppers
0539b9c96e
update swc_core and turbopack (#50519)
## What

* updates swc_core
* updates turbopack

# Turbopack Changes

* https://github.com/vercel/turbo/pull/5050 
* https://github.com/vercel/turbo/pull/5107 
* https://github.com/vercel/turbo/pull/5094
2023-05-30 15:46:46 +00:00
Donny/강동윤
8dba9a7084
chore: Update swc_core to v0.76.37 (#50311)
### What?

This PR updates `swc_core` from
ed9d316833
to
ad8e6a006c

### Why?

The main goal is to reduce build time. I expect
https://github.com/swc-project/swc/pull/7442 to have a huge effect on
the build time.

### How?

Closes WEB-1107

---

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

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-30 14:58:19 +02:00
Tobias Koppers
fe6bb0ace9
Refactor internal modules (#50338)
### What?

create internal modules via `context.process` with
`ReferenceType::Internal`

### Why?

We need this for future refactoring where we want to the internal
modules with transitions.

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5095 <!-- Tobias Koppers - allow
to create internal modules via AssetContext -->
* https://github.com/vercel/turbo/pull/5104 <!-- Alex Kirszenberg -
Stable chunk list ident -->
* https://github.com/vercel/turbo/pull/5106 <!-- Tobias Koppers -
followup fix -->

---------

Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
2023-05-27 08:22:15 +02:00
Alex Kirszenberg
62af2007ce
Next.js Turbo build: turbopack-ecmascript-runtime and ChunkData (#50375)
This PR is extracted from https://github.com/vercel/next.js/pull/49942
and mostly contains changes necessary after the Turbopack PR adding the
Node.js production runtime https://github.com/vercel/turbo/pull/4998,
without any of the actual Next Build stuff, in order to be able to merge
both quickly.

* ChunkData moved from tp-dev to tp-core, the ES-serializable part moved
to tp-ecmascript;
* all runtime types moved to tp-ecmascript-runtime

This also upgrades Turbopack to turbopack-230526.2:

* https://github.com/vercel/turbo/pull/5102 <!-- Donny/강동윤 - refactor:
Fix binary bloat caused by `ValueDebugFormat` impl -->
* https://github.com/vercel/turbo/pull/4998 <!-- Alex Kirszenberg -
Node.js production runtime POC -->
2023-05-26 13:38:25 +02:00
Tobias Koppers
33b8e6157f
change static path to /_next/static/media (#50207)
### What?

align output path of turbopack and webpack

### Why?

passing test cases

### Turbopack Changes

* https://github.com/vercel/turbo/pull/5072 <!-- Tobias Koppers -
improve asset path -->
2023-05-23 18:39:27 +02:00
Tobias Koppers
3d40cb01ab
refactor webpack loaders (#49535)
### What?

* allow to apply existing pipeline
* change webpack loader key to glob for more flexibility
* add test cases
* add special error message when using the old config syntax

Old config:

```js
experimental: {
 turbo: {
  loaders: {
   ".mdx": ["mdx-loader"]
  }
 }
}
```

New config

``` js
experimental: {
 turbo: {
  rules: {
   // key is a glob now
   // normal syntax will treat the result as ecmascript code
   "*.mdx": ["mdx-loader"],
   // glob allows more advanced matching
   "./images/**/*.png": {
    loaders: ["image-optimize-loader"],
    // result of loader will be handled in other steps
    // under the same name/path (here .png)
    // This will use the existing .png pipeline (static asset)
    // It might also use other rules matching .png.
    as: "*"
   },
   "*.generate-image.js": {
    loaders: ["image-generation-loader"],
    // It also possible to pass this under a different name
    // into the pipeline. Here it will treat the result as png image
    as: "*.png"
   }
  }
 }
}
```

### Why?

More flexibility and allowing to use the builtin module handling over
non-js types.

fixes WEB-1009

### Turbopack changes

* https://github.com/vercel/turbo/pull/4955 <!-- OJ Kwon -
refactor(turbopack-ecmascript): deprecate enable_emotion, enable_styled*
-->
* https://github.com/vercel/turbo/pull/4880 <!-- Tobias Koppers -
refactor webpack loader execution -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-23 17:21:25 +02:00
Tobias Koppers
df85ad1ec0
add tracing for turbopack (#49920)
### What?

adds `NEXT_TURBOPACK_TRACING` env var to enable tracing. Writes into `.next/trace.log`

There are 4 presets:

* `NEXT_TURBOPACK_TRACING=overview` gives a overview of requests and modules processed.
* `NEXT_TURBOPACK_TRACING=next` above plus details for next.js
* `NEXT_TURBOPACK_TRACING=turbopack` above plus details for turbopack
* `NEXT_TURBOPACK_TRACING=turbo-tasks` above plus details for turbo-tasks

Published release builds will only allow `overview` to work, since all detailed instrumentation is statically disabled.

see https://github.com/vercel/turbo/pull/4966 for more details

### Why?

get more insight into build times

### Turbopack changes

* https://github.com/vercel/turbo/pull/4995 
* https://github.com/vercel/turbo/pull/5049 
* https://github.com/vercel/turbo/pull/5053 
* https://github.com/vercel/turbo/pull/4966
2023-05-23 05:25:56 +00:00
Donny/강동윤
a5af56eda1
Update swc_core to v0.76.18 (#50137)
### What?

This PR disables `tracing/max_level_info`.

### Why?

Requested at
https://vercel.slack.com/archives/C03EWR7LGEN/p1683789628715199?thread_ts=1683738076.476839&cid=C03EWR7LGEN


### How?

Closes WEB-1080
Fixes #49949

Turbopack counterpart: https://github.com/vercel/turbo/pull/5049
2023-05-22 11:05:17 +02:00
Justin Ridgewell
448b74291e
[turbopack]: Update renamed SubpathValue (#49636)
https://github.com/vercel/turbo/pull/4895 renamed `ExportsValue` into
`SubpathValue`

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-19 18:46:10 +02:00
OJ Kwon
eb2650ae68
build(cargo): update turbopack (#50013)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

This PR updates turbopack to the latest.
2023-05-19 02:03:18 +00:00
Alex Kirszenberg
051c90d43c
Introduce NextMode (#49852)
This introduces a `NextMode` enum that controls which mode Next.js Turbo
is currently running in:
* `NextMode::Development`: `next dev`
* `NextMode::Build`: `next build`

Requires https://github.com/vercel/turbo/pull/4972

This also update Turbopack to `turbopack-230517.2` with the following
changes:

* https://github.com/vercel/turbo/pull/4972 <!-- Alex Kirszenberg -
Configure React development flag, inherit NODE_ENV from execution
context -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-17 16:22:50 +02:00
Donny/강동윤
e5ad96edd5
chore(turbopack): Update swc_core to v0.76.6 (#49792)
### What?

Updates `swc_core` to `v0.76.x`, which adds support for `Explicit Resource Management` (stage 3)

### Why?

It's stage 3

### How?

Closes WEB-1040


---

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

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
2023-05-16 05:08:17 +00:00
Leah
aeed1c770a
add support for globally providing mdx components to turbopack (#49818)
### What?

Adds support for `mdx-components` at the root/src directory.
This is a feature `next-mdx` already has:
https://github.com/vercel/next.js/tree/canary/packages/next-mdx#usage-1

Fixes WEB-1012

Depends on https://github.com/vercel/turbo/pull/4944

### Turbopack updates

* https://github.com/vercel/turbo/pull/4949 <!-- OJ Kwon -
refactor(turbopack): deprecate single react_refresh options -->
* https://github.com/vercel/turbo/pull/4944 <!-- Leah - add mdx
`providerImportSource` option -->
2023-05-16 00:45:08 +00:00
OJ Kwon
a7601213ab
refactor(next-core): consolidate react_refresh options (#49822)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change



### Why?

### How?

Closes NEXT-
Fixes #

-->

### What?

WEB-1049. Removes separate enable_refresh options.
2023-05-15 19:31:42 +00:00
Leah
138a795263
turbo-binding -> turbopack-binding (#49816) 2023-05-15 17:02:25 +00:00
OJ Kwon
cad6d3aa22
refactor(next-core): deprecate custom_ecmascript_transforms (#49629)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change



### Why?

### How?

Closes NEXT-
Fixes #

-->



### What?

WEB-1031.

Deprecate old custom_ecmascript_transforms, consolidate to use
ecmatransforms_plugin instead.
Requires https://github.com/vercel/turbo/pull/4886 .

---------

Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
Co-authored-by: Leah <github.leah@hrmny.sh>
2023-05-12 19:43:25 +00:00
Tim Neutkens
684abdc5ce
Add trace-to-jaeger to workspace (#49692)
## What?

I wasn't able to `cargo run` in trace-to-jaeger because it wasn't in the
workspace.

<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-05-12 12:28:41 +02:00
Alex Kirszenberg
34f551d9b7
Rename Turbopack/tasks crates to common prefixes (#49446)
See https://github.com/vercel/turbo/pull/4866

This also updates Turbopack to turbopack-230511.2 with the following
changes:

* https://github.com/vercel/turbo/pull/4636 <!-- Alex Kirszenberg - Add
support for logging events and intervals in the macOS profiler -->
* https://github.com/vercel/turbo/pull/4793 <!-- OJ Kwon - ci(workflow):
enable more test -->
* https://github.com/vercel/turbo/pull/4886 <!-- OJ Kwon -
refactor(ecmascript-plugins): update serverdirective signature -->
* https://github.com/vercel/turbo/pull/4866 <!-- Alex Kirszenberg -
Rename Turbopack/tasks crates to common prefixes -->
2023-05-11 11:34:36 +00:00
OJ Kwon
1ed7544696
refactor(next-core): remove ast cloning in custom transform (#49560)
### What?

- closes WEB-1024.

Minor refactoring to avoid explicit AST cloning. Still visitors are
using fold though.

### Turbopack changes

* https://github.com/vercel/turbo/pull/4869
* https://github.com/vercel/turbo/pull/4879
* https://github.com/vercel/turbo/pull/4881
2023-05-10 11:07:40 +02:00
OJ Kwon
71d8064b3d
feat(next-core): relay transform plugin (#48899)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### Why?

### How?

Closes NEXT-
Fixes #

-->

#### What
Part 1 for WEB-848. 

This PR implements initial path to enable relay compiler option in
Turbopack. PR is based on approach WEB-955, that passing custom plugin
transform itself instead of trying to pass down configuration into
turbopack. In result, this PR requires counterpart turbopack PR at
https://github.com/vercel/turbo/pull/4721.

PR also refactors next-shared's transform bit, as we have grown number
of custom transforms.

Unfortunately there are some runtime errors with this transforms, so it
is not possible to use relay actually yet. WEB-956 tracks this.
(https://github.com/swc-project/plugins/pull/179)

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-05-09 11:09:34 -07:00
Tobias Koppers
e96fce41c4
render app pages with original url (#49198)
### What?

Use pre-rewrite URL for rendering

### Why?

Rendering app pages needs the original user facing URL.

### Turbopack changes

* https://github.com/vercel/turbo/pull/4818 <!-- Tobias Koppers - pass
original url with content source data -->
* https://github.com/vercel/turbo/pull/4817 <!-- Tobias Koppers - avoid
errors in computing issue details -->
2023-05-04 15:46:36 +02:00
Tobias Koppers
d908bd89bf
update turbopack (#49196)
* https://github.com/vercel/turbo/pull/4815 <!-- Tobias Koppers - fix
CSS HMR -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-05-04 14:24:36 +02:00
Alex Kirszenberg
7092266076
Add support for app global and segment 404 pages (#49085)
See https://github.com/vercel/turbo/pull/4776

This adds support for:

* Default and custom global app 404 pages (`app/not-found`).
* Segment-level 404 pages (`app/segment/not-found`).

This also updates Turbopack:

* https://github.com/vercel/turbo/pull/4787 <!-- Tobias Koppers -
Bugfixes for free var and binding replacement -->
* https://github.com/vercel/turbo/pull/4789 <!-- Alex Kirszenberg -
Print a warning when importing Sass files -->
* https://github.com/vercel/turbo/pull/4776 <!-- Alex Kirszenberg -
Leave pathname formatting up to the caller -->
* https://github.com/vercel/turbo/pull/4790 <!-- Tobias Koppers - remove
inital compilation message by default -->

## TODO:

- [ ] ~~The dev overlay shows up when `notFound()` is called, it should
be hidden~~ (moved to WEB-980)
- [ ] ~~Navigating to the global 404 page doesn't work~~ (this is a bug
in Next.js, see NEXT-963)
- [x] Tests.

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-03 18:10:17 +00:00
Tobias Koppers
194da0b3e3
add test case for non-enumerable exports (#49106)
### What?

test case for https://github.com/vercel/turbo/pull/4783
2023-05-03 04:23:41 +00:00
Tobias Koppers
fe38369618
add test cases for error handling (#49093)
### What?

test cases for https://github.com/vercel/turbo/pull/4779
2023-05-02 22:09:55 +02:00
Tobias Koppers
90153ffd8d
update turbopack (#49071)
* https://github.com/vercel/turbo/pull/4691 
* https://github.com/vercel/turbo/pull/4765 
* https://github.com/vercel/turbo/pull/4772
2023-05-02 08:19:30 +00:00
Tobias Koppers
dbccc794e3
fix GlobalError interop and add test case (#49033)
### What?

fixes handling of GlobalError interop
adds a test case for client component bug

### Why?

app dir client component interop is broken

### Turbopack changes

* https://github.com/vercel/turbo/pull/4597 <!-- Tobias Koppers - add
rspack to our benchmark suite -->
* https://github.com/vercel/turbo/pull/4761 <!-- Tobias Koppers - Do not
use interop logic on proxy modules -->
2023-05-01 14:51:37 +02:00
Alex Kirszenberg
3362851b92
More fluent GraphTraversal API (#49028)
See https://github.com/vercel/turbo/pull/4598

### Turbopack changes

* https://github.com/vercel/turbo/pull/4754 <!-- Justin Ridgewell -
Match TS's extends resolution algorithm -->
* https://github.com/vercel/turbo/pull/4598 <!-- Alex Kirszenberg - More
fluent GraphTraversal API -->

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-01 14:08:25 +02:00
Donny/강동윤
7e0a6f83f6
chore: Update swc_core to v0.75.41 (#48982)
### What?

Update swc_core and `@swc/core`.

### Why?

https://github.com/vercel/turbo/issues/4747 seems like a critical issue.

### How?

 - Fix WEB-969

### Turbopack changes

* https://github.com/vercel/turbo/pull/4688 <!-- OJ Kwon - ci(workflow):
add appdir underscore test to subset -->
* https://github.com/vercel/turbo/pull/4751 <!-- Justin Ridgewell -
Cleanup "started server on" message -->
* https://github.com/vercel/turbo/pull/4756 <!-- Donny/강동윤 - chore:
Update `swc_core` to `v0.75.41` -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-05-01 13:15:24 +02:00
Alex Kirszenberg
7b348fa0f2
Use ProxiedAsset instead of css_chunk_root_path to expose RSC CSS chunks (#48946)
See https://github.com/vercel/turbo/pull/4740

This enables RSC CSS HMR. The `css_chunk_root_path` way somehow broke
the propagation of invalidation for CSS chunks.

This also updates Turbopack with the following changes:

* https://github.com/vercel/turbo/pull/4738 <!-- Tobias Koppers -
improve commonjs esm interop and node ESM -->
* https://github.com/vercel/turbo/pull/4740 <!-- Alex Kirszenberg -
Replace css_chunk_root_path with ProxiedAsset -->
* https://github.com/vercel/turbo/pull/4741 <!-- Tobias Koppers - add
svg size extraction -->

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2023-04-28 20:37:34 +02:00
Justin Ridgewell
a2a3f5e378
turbopack: parse and propagate output: 'export' (#48046)
Depends on https://github.com/vercel/turbo/pull/4491

This adds support for the new `output: 'export'` configuration, and
propagates the value through to our Node.js rendering code to render.
Unfortunately, we don't support page-level configs at the moment, so we
can't set a `export const config = { dynamic: 'force-dynamic' }` and
test that the export value is being received (I've manually verified it,
though).

Fixes WEB-842
2023-04-28 06:36:32 +00:00
Alex Kirszenberg
3ed412a308
Selectively load runtime CSS modules to avoid rule duplication (#48866)
See https://github.com/vercel/turbo/pull/4695

### Turbopack changes

* https://github.com/vercel/turbo/pull/4683 <!-- Alex Kirszenberg -
Update benchmark data -->
* https://github.com/vercel/turbo/pull/4695 <!-- Alex Kirszenberg -
Selectively load runtime CSS modules to avoid rule duplication -->

---------

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-27 13:47:36 +02:00
Tobias Koppers
219d1d49c7
update turbopack (#48893)
### What?

* https://github.com/vercel/turbo/pull/4700 <!-- Tobias Koppers - update
deps -->
* https://github.com/vercel/turbo/pull/4706 <!-- Tobias Koppers - make
library code less verbose in stack traces -->
* https://github.com/vercel/turbo/pull/4705 <!-- Tobias Koppers -
improve error handling in update stream -->
* https://github.com/vercel/turbo/pull/4667 <!-- Caleb Webber - remove
box_syntax -->
* https://github.com/vercel/turbo/pull/4714 <!-- Tobias Koppers - chunk
hash need to include availability root -->
* https://github.com/vercel/turbo/pull/4709 <!-- Alex Kirszenberg -
Allow the dev server socket to be reused immediately -->
* https://github.com/vercel/turbo/pull/4716 <!-- Tobias Koppers - errors
lead to consistent exit code in issue detail -->
2023-04-27 00:46:04 +02:00
OJ Kwon
f3d5c2fe9e
refactor(next-swc): turbopack_ecmascript_plugins (#48671)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change


### Why?

### How?

Closes NEXT-
Fixes #

-->

### What?

This PR is necessary changes to apply
https://github.com/vercel/turbo/pull/4662. Need turbopack bump to make
CI pass.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-26 15:55:53 +02:00
Tobias Koppers
5a46b01ab9
update turbopack (#48846)
* https://github.com/vercel/turbo/pull/4692 
* https://github.com/vercel/turbo/pull/4595 
* https://github.com/vercel/turbo/pull/4690 
* https://github.com/vercel/turbo/pull/4663
2023-04-26 06:55:37 +00:00
Alex Kirszenberg
7fdcb172f9
Lazy DevHtmlAsset chunk generation (#48768)
This fixes a perf regression introduced in the chunking refactor, where
we would be eagerly generating all assets from the web entry and
fallback sources.

See https://github.com/vercel/turbo/pull/4679

This also brings the following updates from vercel/turbo:

* https://github.com/vercel/turbo/pull/4669 <!-- Tobias Koppers - make
the invalidation reason easier to read -->
* https://github.com/vercel/turbo/pull/4670 <!-- Tobias Koppers -
dev-server content might change any time, we can't cache them -->
* https://github.com/vercel/turbo/pull/4653 <!-- OJ Kwon -
fix(ecmascript): displayname for styled_components -->
* https://github.com/vercel/turbo/pull/4679 <!-- Alex Kirszenberg - Lazy
DevHtmlAsset chunk generation --> (this change)
2023-04-24 12:11:24 +02:00
Tobias Koppers
ec385decd3
replace defined values and add __NEXT_HAS_REWRITES define (#48628)
### What?

This fixes a problem when the router fails to load the correct JS file
from the page_loader and opts out to full refresh

### Why?

The router behaves incorrect when `__NEXT_HAS_REWRITES` is missing in
turbopack

### How?

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

### Turbopack changes

* https://github.com/vercel/turbo/pull/4650 <!-- Tobias Koppers - reduce
size of TypeType from 32bytes to 16bytes -->
* https://github.com/vercel/turbo/pull/4648 <!-- Tobias Koppers - handle
chunk register in the sync runtime.none correctly -->
* https://github.com/vercel/turbo/pull/4609 <!-- OJ Kwon -
fix(ecmascript): eval assignop to the ident -->
* https://github.com/vercel/turbo/pull/4652 <!-- Tobias Koppers - allow
to pass constant values to free var references -->
* https://github.com/vercel/turbo/pull/4649 <!-- Tobias Koppers - Image
processing improvements -->
2023-04-20 20:02:39 +02:00
Tobias Koppers
189e6a3687
use structured images with metainfo (blur placeholder) (#48531)
### What?

add support for blur placeholder generation to turbopack

add `StructuredImageModuleType` which is used with `ModuleType::Custom`
to allow importing an image as `{ url, width, height, blurDataURL,
blurWidth, blurHeight }`

in contrast to next.js with webpack this will also generate blur
placeholder in development instead of using a _next/image reference.
This should lead to more production-like experience (at the cost of a
little bit of compilation time).

turbo PR: https://github.com/vercel/turbo/pull/4621

### Why?

Turbopack was crashing on `placeholder="blur"` before.

fixes WEB-534

### Turbopack changes

* https://github.com/vercel/turbo/pull/4521 <!-- OJ Kwon -
feat(contextcondition): support InPath contextcondition -->
* https://github.com/vercel/turbo/pull/4601 <!-- Alex Kirszenberg -
Chunking Context Refactor pt. 3: Address PR comments from pt. 2 -->
* https://github.com/vercel/turbo/pull/4623 <!-- Tobias Koppers -
exclude turborepo from turbopack bench tests -->
* https://github.com/vercel/turbo/pull/4399 <!-- Leah - support
require.context -->
* https://github.com/vercel/turbo/pull/4610 <!-- OJ Kwon - test(subset):
add mdx test into subset -->
* https://github.com/vercel/turbo/pull/4624 <!-- Tobias Koppers - run
benchmarks on windows and macOS too -->
* https://github.com/vercel/turbo/pull/4620 <!-- Alex Kirszenberg - Make
ContainmentTree fully generic -->
* https://github.com/vercel/turbo/pull/4600 <!-- Tobias Koppers - add
getChunkPath method -->
* https://github.com/vercel/turbo/pull/4621 <!-- Tobias Koppers - add
turbopack-image -->
* https://github.com/vercel/turbo/pull/4639 <!-- Tobias Koppers -
restrict snapshot path for windows path length limit -->
* https://github.com/vercel/turbo/pull/4641 <!-- Tobias Koppers - put
webp behind a feature flag -->
2023-04-20 02:18:59 +02:00
OJ Kwon
9f5463dc9a
build(cargo): move workspaces manifest to top level (#48198)
<!-- 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(s) that you're making:

## For Contributors

### Improving Documentation or adding/fixing Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

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



## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change


### How?

Closes NEXT-
Fixes #

-->

### What?
This PR changes to the `root` of the cargo workspace to the root of repo
itself, allows next-swc and other rust codebase can use repo root as
workspace root.

### Why?
Currently cargo manifest for the next-swc is not placed under the root
of the repo, which makes invocation to the tool requires to change cwd /
or set cwd. Similarly needs to open editor to the root of the cargo
manifest separately to able to utilize language server kicks in. Moving
manifest to the root consolidates those, so can invoke either cli / or
editor to the same root of the repo.
2023-04-19 18:38:36 +02:00
Renamed from packages/next-swc/Cargo.toml (Browse further)