Commit graph

989 commits

Author SHA1 Message Date
vercel-release-bot
e18c9dde3f v13.5.4-canary.6 2023-09-28 15:00:44 +00:00
vercel-release-bot
49f646da14 v13.5.4-canary.5 2023-09-28 13:48:17 +00:00
Jimmy Lai
c2fd08063c
perf: replace zod with superstruct (#56083)
This PR replaces the usage of Zod in the App Router in favour of a smaller validation library. We don't use much of zod's more advanced capabilities so it doesn't make sense to import all of it on the server at the moment.

Also added some unit tests.

This results in a 44kb win, which will impact cold boot

Before:
<img width="594" alt="CleanShot 2023-09-27 at 13 34 09@2x" src="https://github.com/vercel/next.js/assets/11064311/43cc7687-947d-40a1-9e1e-c2a60caf53c0">
After:
<img width="564" alt="CleanShot 2023-09-27 at 13 34 48@2x" src="https://github.com/vercel/next.js/assets/11064311/c3d3f5d6-e1f6-4969-bd11-dcd191d34ce6">


<!-- 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

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Adding or Updating 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-09-28 11:05:36 +02: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
vercel-release-bot
f5ac079e54 v13.5.4-canary.4 2023-09-27 23:17:38 +00:00
vercel-release-bot
2ff2c0b4b2 v13.5.4-canary.3 2023-09-27 21:43:46 +00:00
Steven
12c800e35c
chore: remove chalk in favor of picocolors (#55992)
Similar to PR https://github.com/vercel/next.js/pull/53115, this PR removes `chalk` in favor of `picocolors`
2023-09-27 21:00:52 +00:00
Will Binns-Smith
ad63effbc7
Remove unneeded next-dev js in next-core (#56039)
x-ref:
https://github.com/vercel/next.js/pull/55983#issuecomment-1734766241


Closes WEB-1661
2023-09-27 21:00:51 +02:00
vercel-release-bot
778a3c55cf v13.5.4-canary.2 2023-09-27 17:29:49 +00: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
Sukka
f3cb952873
fix(worker): pass env to build worker w/ config.experimental.workerThreads (#55257)
**TL; DR**

The PR updates the `jest-worker` to the latest `@27` (which is `jest-worker@27.5.1`) and pre-compile.

---

I use `config.experimental.workerThreads` for my personal website built with Next.js, and I noticed that the react alias (from `require-hook`) is not working, causing `react-dom-server-webpack/client.edge` to fail to resolve.

So I modify the `node_modules/next/dist/build/worker.js` in my personal website project folder to print `process.env.__NEXT_PRIVATE_PREBUNDLED_REACT`:

<img width="761" alt="image" src="https://github.com/vercel/next.js/assets/40715044/f22d72f8-ffd4-49d0-831a-ee3bfd0513ca">

To my surprise, the `process.env.__NEXT_PRIVATE_PREBUNDLED_REACT` prints `undefined` with `config.experimental.workerThreads: true`:

<img width="760" alt="image" src="https://github.com/vercel/next.js/assets/40715044/ad8add14-7ac3-45f5-8f1e-2fec18397410">

But If I disable worker threads with `config.experimental.workerThreads: false`, the `process.env.__NEXT_PRIVATE_PREBUNDLED_REACT` is passed down correctly.

So I dig a little deeper. It turns out to be an old issue of `jest-worker` and has been fixed in https://github.com/jestjs/jest/pull/12069 (in that PR, the custom `env` was passed down to `jest-worker`'s `forkOption`). The bugfix was released in `jest-worker@27.4.0`, but Next.js is still using `jest-worker@27.0.0-next.5`, hence the issue.
2023-09-27 04:41:26 +00:00
vercel-release-bot
e3a2805151 v13.5.4-canary.1 2023-09-26 13:31:19 +00:00
Shu Ding
974e41ccbb
Update vendored React (#56012)
### React upstream changes

- https://github.com/facebook/react/pull/27417
- https://github.com/facebook/react/pull/27408
- https://github.com/facebook/react/pull/27409
- https://github.com/facebook/react/pull/27405
- https://github.com/facebook/react/pull/27375
- https://github.com/facebook/react/pull/27407
- https://github.com/facebook/react/pull/27365
- https://github.com/facebook/react/pull/27399
- https://github.com/facebook/react/pull/27395
- https://github.com/facebook/react/pull/27394
- https://github.com/facebook/react/pull/27397
- https://github.com/facebook/react/pull/26992
- https://github.com/facebook/react/pull/27388
- https://github.com/facebook/react/pull/27373
- https://github.com/facebook/react/pull/27332
2023-09-26 12:39:09 +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
vercel-release-bot
df3980da88 v13.5.4-canary.0 2023-09-25 21:03:03 +00:00
vercel-release-bot
76e06d55a8 v13.5.3 2023-09-25 14:24:47 +00:00
vercel-release-bot
b98ebb2806 v13.5.3-canary.4 2023-09-25 13:16:18 +00:00
vercel-release-bot
ec671bb5f5 v13.5.3-canary.3 2023-09-23 02:02:57 +00:00
vercel-release-bot
c923257c1b v13.5.3-canary.2 2023-09-22 19:42:08 +00:00
Tim Neutkens
b5c399698d
Remove next-typescript check in webpack config (#55819)
This package has been legacy for multiple years and has been marked
deprecated, this check is no longer useful.

<!-- 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

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating 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-09-22 19:43:16 +02:00
Leah
7fa1618ef7
chore: update turbopack to turbopack-230922.2 (#55828) 2023-09-22 18:52:18 +02:00
vercel-release-bot
0d6f3ac36b v13.5.3-canary.1 2023-09-21 23:58:45 +00:00
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