Commit graph

966 commits

Author SHA1 Message Date
vercel-release-bot
e9148eda2a v13.5.3-canary.0 2023-09-21 09:07:13 +00:00
vercel-release-bot
aea80aa53f v13.5.2 2023-09-20 16:19:18 +00:00
vercel-release-bot
0afffdd024 v13.5.2-canary.2 2023-09-20 15:29:17 +00:00
vercel-release-bot
72434c2737 v13.5.2-canary.1 2023-09-20 12:53:30 +00:00
Balázs Orbán
38877dda37
chore: bump @vercel/og and satori (#55654)
### What?

Bump these packages to their latest. (Bumped `satori` too to avoid multiple versions in the repo)

### Why?

Follow-up of https://github.com/vercel/next.js/pull/55187

### How?

Updated the original package applying the changes from #55187

Closes NEXT-1639
Fixes #55604

[Slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1695169119558899)
2023-09-20 12:16:49 +00:00
vercel-release-bot
ac1c062f4f v13.5.2-canary.0 2023-09-20 10:49:22 +00:00
Zack Tanner
bb13bb4799
Update React from d6dcad6a8 to 2807d781a (#55590)
Update React from d6dcad6a8 to 2807d781a.

### React upstream changes

- https://github.com/facebook/react/pull/27387
- https://github.com/facebook/react/pull/27386
- https://github.com/facebook/react/pull/27385
- https://github.com/facebook/react/pull/27379
- https://github.com/facebook/react/pull/27382

Closes NEXT-1637
2023-09-20 00:09:34 +00:00
vercel-release-bot
0c1c7f847e v13.5.1 2023-09-19 17:20:54 +00:00
vercel-release-bot
974428583e v13.5.1-canary.1 2023-09-19 16:31:03 +00:00
vercel-release-bot
c652dc8811 v13.5.1-canary.0 2023-09-19 16:10:26 +00:00
vercel-release-bot
ffafad2c35 v13.5.0 2023-09-19 15:36:42 +00:00
vercel-release-bot
4a589ed83d v13.4.20-canary.41 2023-09-19 13:56:12 +00:00
vercel-release-bot
d01ab6165e v13.4.20-canary.40 2023-09-18 23:29:58 +00:00
vercel-release-bot
41c89f0cd8 v13.4.20-canary.39 2023-09-18 20:12:27 +00:00
Steven
e4439b1430
chore(third-parties): replace rimraf with rm.mjs (#55547)
- Follow up to https://github.com/vercel/next.js/pull/55544
- Same pattern from https://github.com/vercel/next.js/pull/49529
2023-09-18 19:57:45 +00:00
Tobias Koppers
0338dcdf2c
fix next.js own build on windows (#55544)
### What

allow to build next.js on windows

Closes WEB-1597

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-09-18 14:21:51 -05:00
vercel-release-bot
4f98dc6f26 v13.4.20-canary.38 2023-09-18 19:09:41 +00:00
vercel-release-bot
36e12a7415 v13.4.20-canary.37 2023-09-18 14:05:39 +00:00
vercel-release-bot
b2facf5811 v13.4.20-canary.36 2023-09-18 12:03:44 +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
vercel-release-bot
096d910423 v13.4.20-canary.35 2023-09-18 09:27:39 +00:00
vercel-release-bot
8fd2ad27b9 v13.4.20-canary.34 2023-09-18 06:25:35 +00:00
vercel-release-bot
981e8fa945 v13.4.20-canary.33 2023-09-16 10:38:10 +00:00
vercel-release-bot
e262627bd9 v13.4.20-canary.32 2023-09-15 19:55:16 +00: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
vercel-release-bot
15292da332 v13.4.20-canary.31 2023-09-15 06:05:22 +00: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
vercel-release-bot
18d703e0b7 v13.4.20-canary.30 2023-09-14 21:50:52 +00:00
vercel-release-bot
be38d02349 v13.4.20-canary.29 2023-09-14 20:56:41 +00:00
Andrew Clark
6f2e9aec21
Update React from dd480ef92 to d6dcad6a8. (#55399)
### React upstream changes:

- https://github.com/facebook/react/pull/27374
- https://github.com/facebook/react/pull/27369
- https://github.com/facebook/react/pull/27372
- https://github.com/facebook/react/pull/27371
- https://github.com/facebook/react/pull/27370
- https://github.com/facebook/react/pull/27321
- https://github.com/facebook/react/pull/27368
- https://github.com/facebook/react/pull/27367
- https://github.com/facebook/react/pull/27366
- https://github.com/facebook/react/pull/27360
- https://github.com/facebook/react/pull/27361
- https://github.com/facebook/react/pull/27357
- https://github.com/facebook/react/pull/27359
- https://github.com/facebook/react/pull/27358
- https://github.com/facebook/react/pull/27330
- https://github.com/facebook/react/pull/27347
- https://github.com/facebook/react/pull/27307
- https://github.com/facebook/react/pull/27346
- https://github.com/facebook/react/pull/27342
- https://github.com/facebook/react/pull/27340
- https://github.com/facebook/react/pull/27328
- https://github.com/facebook/react/pull/27327
- https://github.com/facebook/react/pull/27325
- https://github.com/facebook/react/pull/27337
- https://github.com/facebook/react/pull/27336
- https://github.com/facebook/react/pull/27323
- https://github.com/facebook/react/pull/27320
- https://github.com/facebook/react/pull/27317
- https://github.com/facebook/react/pull/27318
- https://github.com/facebook/react/pull/27316
- https://github.com/facebook/react/pull/27313
- https://github.com/facebook/react/pull/27309
- https://github.com/facebook/react/pull/27302
- https://github.com/facebook/react/pull/27297
- https://github.com/facebook/react/pull/27295
- https://github.com/facebook/react/pull/27305
- https://github.com/facebook/react/pull/27215
- https://github.com/facebook/react/pull/27304
- https://github.com/facebook/react/pull/27067
- https://github.com/facebook/react/pull/27179
- https://github.com/facebook/react/pull/27278
- https://github.com/facebook/react/pull/27277
- https://github.com/facebook/react/pull/27282
- https://github.com/facebook/react/pull/27230
- https://github.com/facebook/react/pull/27260
- https://github.com/facebook/react/pull/27270
- https://github.com/facebook/react/pull/27273
- https://github.com/facebook/react/pull/27268
- https://github.com/facebook/react/pull/27269
2023-09-14 17:42:33 +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
vercel-release-bot
800fdc11ae v13.4.20-canary.28 2023-09-13 22:47:32 +00:00
Mayank
f94d4f93e4
fix: upgrade listr2 from 5.0.5 to 5.0.8 (#55223)
upgrade listr2 from 5.0.5 to 5.0.8.





Co-authored-by: Snyk bot <19733683+snyk-bot@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-09-13 21:02:14 +00:00
vercel-release-bot
32e066ff6c v13.4.20-canary.27 2023-09-13 17:38:35 +00:00
vercel-release-bot
366885f387 v13.4.20-canary.26 2023-09-12 13:20:27 +00:00
vercel-release-bot
8e1626851e v13.4.20-canary.25 2023-09-12 10:34:24 +00:00
OJ Kwon
92e1b3fef9
test(fixture): improve finding ports to reduce flaky (#55151)
### What

Found a flaky test like https://github.com/vercel/next.js/actions/runs/6125719281/job/16628276301?pr=55118#step:29:174, `get-port` throws by port is not available. Peeking bit, there seems an upstream fix hope to improve the situation but unfortunately it happened after get-port switched to native esm only, so bumping is non trivial work. Instead adapting get-port-please as a replacwement but leave get-port as fallback for a while to verify its stability. Once we are certain, we can remove old get-port entirely.
2023-09-11 21:48:29 +00:00
vercel-release-bot
476fe4a1f6 v13.4.20-canary.24 2023-09-11 20:24:23 +00:00
vercel-release-bot
c6ce87f021 v13.4.20-canary.23 2023-09-08 21:41:11 +00:00
vercel-release-bot
d61c6ba4aa v13.4.20-canary.22 2023-09-08 21:10:48 +00:00
Jimmy Lai
5217e7eb06
server: re-land bundled runtimes (#55139)
see https://github.com/vercel/next.js/pull/52997

also added a fix by @jridgewell to fix turbopack





Co-authored-by: Justin Ridgewell <112982+jridgewell@users.noreply.github.com>
2023-09-08 16:05:29 +00:00
vercel-release-bot
904d8eed39 v13.4.20-canary.21 2023-09-07 23:18:04 +00:00
JJ Kasper
7267538e00
Revert "perf: add bundled rendering runtimes (#52997)" (#55117)
This reverts commit a5b7c77c1f.

Our E2E tests are failing with this change this reverts to allow investigating async 

x-ref: https://github.com/vercel/next.js/actions/runs/6112149126/job/16589769954
2023-09-07 21:07:53 +00:00
Balázs Orbán
068002bb3a
chore: upgrade to TypeScript 5.2.2 (#55105)
### What?

Upgrade TypeScript to the latest version as of this PR. **This does not affect users, as the change is only for our repository.**

### Why?

Part of some upcoming PRs to try to clean up cookie handling, now that `getSetCookie` is available. Since we use `undici`, which [implements it](https://github.com/nodejs/undici/pull/1915), we can get rid of some code to rely more on the platform.

This PR is needed to get the types for `Headers#getSetCookie` which was added in 5.2

### How?

I needed to update some dependency types to get build to pass, but other than that, only needed to bump from `5.1.6` to `5.2.2`, so hopefully all is fine.
2023-09-07 18:46:05 +00:00
vercel-release-bot
3062462156 v13.4.20-canary.20 2023-09-07 16:06:41 +00:00
Jimmy Lai
a5b7c77c1f
perf: add bundled rendering runtimes (#52997)
## What?

In Next, rendering a route involves 3 layers:
- the routing layer, which will direct the request to the correct route to render
- the rendering layer, which will take a route and render it appropriately
- the user layer, which contains the user code 

In #51831, in order to optimise the boot time of Next.js, I introduced a change that allowed the routing layer to be bundled. In this PR, I'm doing the same for the rendering layer. This is building up on @wyattjoh's work that initially split the routing and the rendering layer into separate entry-points.

The benefits of having this approach is that this allows us to compartmentalise the different part of Next, optimise them individually and making sure that serving a request is as efficient as possible, e.g. rendering a `pages` route should not need code from the `app router` to be used.

There are now 4 different rendering runtimes, depending on the route type:
- app pages: for App Router pages
- app routes: for App Router route handlers
- pages: for legacy pages
- pages api: for legacy API routes

This change should be transparent to the end user, beside faster cold boots.

## Notable changes

Doing this change required a lot of changes for Next.js under the hood in order to make the different layers play well together.

### New conventions for externals/shared modules

The big issue of bundling the rendering runtimes is that the user code needs to be able to reference an instance of a module/value created in Next during the render. This is the case when the user wants to access the router context during SSR via `next/link` for example; when you call `useContext(value)` the value needs to be the exact same reference to one as the one created by `createContext` earlier.

Previously, we were handling this case by making all files from Next that were affected by this `externals`, meaning that we were marking them not to be bundled.

**Why not keep it this way?**

The goal of this PR as stated previously was to make the rendering process as efficient as possible, so I really wanted to avoid extraneous fs reads to unoptimised code. 

In order to "fix" it, I introduced two new conventions to the codebase:
- all files that explicitly need to be shared between a rendering runtime and the user code must be suffixed by `.shared-runtime` and exposed via adding a reference in the relevant `externals` file. At compilation time, a reference to a file ending with this will get re-written to the appropriate runtime.
- all files that need to be truly externals need to be suffixed by `.external`. At compilation time, a reference to it will stay as-is. This special case is needed mostly only for the async local storages that need to be shared with all three layers of Next.

As a side effect, we should be bundling more of the Next code in the user bundles, so it should be slightly more efficient.

### App route handlers are compiled on their own layer

App route handlers should be compiled in their own layer, this allows us to separate more cleanly the compilation logic here (we don't need to run the RSC logic for example).

### New rendering bundles

We now generate a prod and a dev bundle for:
- the routing server
- the app/pages SSR rendering process
- the API routes process

The development bundle is needed because:
- there is code in Next that relies on NODE_ENV
- because we opt out of the logic referencing the correct rendering runtime in dev for a `shared-runtime` file. This is because we don't need to and that Turbopack does not support rewriting an external to something that looks like this `require('foo').bar.baz` yet. We will need to fix that when Turbopack build ships.

### New development pipeline

Bundling Next is now required when developing on the repo so I extended the taskfile setup to account for that. The webpack config for Next itself lives in `webpack.config.js` and contains the logic for all the new bundles generated.

### Misc changes

There are some misc reshuffling in the code to better use the tree shaking abilities that we can now use.

fixes NEXT-1573

Co-authored-by: Alex Kirszenberg <1621758+alexkirsz@users.noreply.github.com>
2023-09-07 15:51:49 +00:00
vercel-release-bot
9bb9f07e82 v13.4.20-canary.19 2023-09-07 06:36:23 +00:00
Ryota Murakami
7decb13000
chore(ci): bump pnpm v8.6.11 to v8.7.1 (#54873)
My "pnpm@v8.7.0" was not working and I noticed it by accident and sent a PR.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-09-06 00:39:44 +00:00
vercel-release-bot
cdfb9de498 v13.4.20-canary.18 2023-09-05 22:49:40 +00:00
vercel-release-bot
1b844600ce v13.4.20-canary.17 2023-09-05 18:20:51 +00:00