Commit graph

9041 commits

Author SHA1 Message Date
vercel-release-bot
a3ef99acd9 v13.4.7-canary.1 2023-06-16 13:57:51 +00:00
Shu Ding
46981388aa
Fix bundling of Server Actions (#51367)
There're 3 layers in the RSC module graph: server → client → action. "Action" means that a Client Component re-enters the server layer by importing a file with `"use server"`, and it should behave the same as the server layer but you can't enter the client layer again (hence we have a 3rd layer name).

Since the action layer has the same behavior and module resolution rules, it should be bundled just like the server layer.

Closes #50658. Originally the issue was that `auth/next` isn't being bundled on the action layer, and it has the async local storage imported. Because of that, that storage comes from node_modules instead of the server bundle.
fix NEXT-1290
2023-06-16 13:47:48 +00:00
JJ Kasper
1528a49bf1
Revert "Route Module Updates Redux" (#51409)
This appears to still be hitting the previous issue mentioned in
https://github.com/vercel/next.js/pull/51322

Reverts vercel/next.js#51373
2023-06-16 05:44:03 -07:00
vercel-release-bot
cbb69b2cfc v13.4.7-canary.0 2023-06-16 01:02:52 +00:00
JJ Kasper
da98193602
Lock down server IPC address (#51378)
This attempts to avoid IPv6 and IPv4 resolve issues across network
setups by locking down our internal IPC requests to just one address for
consistency. This way there aren't issues when `localhost` resolves to
one or the other in different cases.

x-ref: https://github.com/vercel/next.js/issues/49677
2023-06-15 17:58:10 -07:00
Wyatt Johnson
ab3f707eff
Route Module Updates Redux (#51373)
Small QOL improvements to `RenderResult` and `RouteModule` setup.
2023-06-15 22:45:49 +00:00
vercel-release-bot
ce4aa787e8 v13.4.6 2023-06-15 21:21:35 +00:00
vercel-release-bot
019ed1c39b v13.4.6-canary.8 2023-06-15 20:08:03 +00:00
Shu Ding
7d7d5a762d
Fix shared layer bundling in Edge Runtime (#51348)
Our shared layer matcher doesn't contain `next/dist/esm`, which breaks Server Actions when there're cookie/header accesses.

Closes #50099. Fix NEXT-1229
2023-06-15 13:03:51 +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
vercel-release-bot
c59c39a431 v13.4.6-canary.7 2023-06-15 03:58:41 +00:00
JJ Kasper
bdcca0ccff
Fix CSS deploy id case (#51325)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04MEB9L9RQ/p1686787663510239?thread_ts=1686770561.895939&cid=C04MEB9L9RQ)
2023-06-14 20:28:18 -07:00
mknichel
1660fdfcbb
Update Next.js code owners (#51319)
This PR updates `.vercel.approvers` files to fix some validation errors
and to more closely match desired behavior for assigning and notifying
members of the team for reviews that was discussed on an internal Slack
thread.

- Owners files for `.cargo/` and `.config/` are moved to their
respective directories instead of being placed at the root.
- Fixes the `@vercel/next-js` team name (it uses a dash instead of a
period)
- Adds `:notify` to reviewers so that all of the people listed are
notified of the pull request, but only a single person would be
requested as a reviewer.
- `@vercel/web-tooling:optional` was made optional so that they are not
requested for any change to `pnpm-lock.yaml` but still have the ability
to approve PRs that modify it.

---------
2023-06-14 20:07:32 -07:00
JJ Kasper
f9ae5b7f31
Revert "test(next-dev): hard fail if next-dev runs with turbopack intenral flag" (#51327)
Reverts vercel/next.js#51308
2023-06-14 20:06:55 -07:00
OJ Kwon
a7c31cc509
test(next-dev): hard fail if next-dev runs with turbopack intenral flag (#51308)
<!-- 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 #

-->

### What?

WEB-1183

Context:
https://vercel.slack.com/archives/C04KC8A53T7/p1686768648161459?thread_ts=1686763527.218549&cid=C04KC8A53T7

We'd like to avoid false positives to the test cases if test supposed to
run turbopack (having __INTERNAL_ flags) but somehow test fixture does
not run turbopack correctly.
2023-06-14 19:29:59 -07:00
vercel-release-bot
dde67aec5a v13.4.6-canary.6 2023-06-15 01:39:48 +00:00
JJ Kasper
2e68ff7dc0
Revert "Route Module Cleanup" (#51322)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04MEB9L9RQ/p1686788708114089?thread_ts=1686770561.895939&cid=C04MEB9L9RQ)

Reverts vercel/next.js#50936
2023-06-14 18:30:14 -07:00
Shu Ding
38d1f1699d
Fix Server Actions compiler (#51318)
Make sure we are using `var` instead of `const` as we always put the new
appended statements to the end of the module body, but they can still be
referenced before in the HOC case in the runtime. This causes a runtime
error.

Tl;dr: `a = 1; var a` is fine, but `a; const a = ...` will result in a
compilation error.

Closes #49344.
2023-06-14 17:01:05 -07:00
JJ Kasper
409668107d
Revert "Prefer module fields for RSC server layer" (#51316)
Closes: https://github.com/vercel/next.js/issues/51309

Reverts vercel/next.js#51179
2023-06-14 16:55:38 -07:00
JJ Kasper
115b6ad953
Allow configuring analyzerMode in bundle-analyzer (#47468)
It's valid to want to output JSON instead of HTML for the bundle
analyzer so we can expose this specific config the same as
`openAnalyzer`. cc @mknichel
2023-06-14 16:33:39 -07:00
vercel-release-bot
40ce621901 v13.4.6-canary.5 2023-06-14 21:54:03 +00:00
Shu Ding
9a36f337da
Simplify server CSS handling (#51018)
Remove the Server CSS manifest and related logic, and use the chunkGroup
CSS files instead for each entry to inject stylesheet links.

Why was that manifest needed in the first place? When implementing CSS
collection for RSC and nested layout initially, we collect CSS imports
at each layer and create corresponding client entries. But then soon got
hit by the problem of duplication and improper tree-shaking. Two layers
can have the same CSS imported so we solved it in a way that "if an
upper layer imports this module, skip it in child layers". Note that
this is deduped by module, so we need to keep the information of "layer
(entry) → CSS modules" somewhere, in a manifest.

Another reason is that we create the client entry before Webpack
optimizes modules, so we can inject the client entry into the same
compilation. But that means the collected client modules from the server
layer are not properly optimized (DCE). **This is a general issue at the
moment that's not specifically related to CSS, although using that
manifest to collect DCE'd info and join the original collected CSS files
with that info temporarily solved it.** That's why I disabled some tests
related to font CSS collection and want to improve it in a more general
way.

Why is that not needed anymore? Main reason is to keep a good balance
between duplication and number of chunks, and delegate the decision to
Webpack's splitChunks plugin. It is not possible to get to a point of 0
duplication unless we ship every CSS module as a single chunk. And since
in #50406 we made the duplication better but at the chunk asset level,
instead of the original module level.

Prior work: #50406, #50610.
2023-06-14 14:43:08 -07:00
mPaella
d492b937e2
fix: Incorrect build size outputs for app dir (#50768)
### What?
Fixes https://github.com/vercel/next.js/issues/50129

### Why?
The current denormalization of app dir paths doesnt account for the
normalization done in `normalizeAppPath`, causing build log outputs for
certain paths such as anything under a route groups to be incorrect

### How?
There's 2 ways this could be fixed:

1.) Denormalize the app dir paths by reading the
`app-path-routes-manifest.json` and mapping back to the original file
path
2.) (what I chose to do) Normalize the keys of `appBuildManifest`

### Result

App dir paths, including route groups, now have their correct output
size

<img width="494" alt="image"
src="https://github.com/vercel/next.js/assets/93682696/0eee79b8-7d60-4c88-b07a-dfb750aa9592">

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-14 14:24:57 -07:00
bri
c76653f2f7
chore: update next/font/google font list (#49969)
Ran script `update-google-fonts`, adding these fonts to `next/font/google`:

- [Instrument Sans](https://fonts.google.com/specimen/Instrument+Sans)
- [Noto Sans Nag Mundari](https://fonts.google.com/noto/specimen/Noto+Sans+Nag+Mundari)
- [Wix Madefor Display](https://fonts.google.com/specimen/Wix+Madefor+Display)
- [Wix Madefor Text](https://fonts.google.com/specimen/Wix+Madefor+Text)

and updating these fonts:
- [Radio Canada](https://fonts.google.com/specimen/Radio+Canada) (added `canadian-aboriginal` subset)

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-06-14 21:03:44 +00:00
tom
d4c2335b0f
chore: add dark mode for dev overlay (#48601)
This PR adds a dark mode to the error overlay which respects the browsers color scheme.
I just did this because I was blinded by the dev overlay a lot today and thought this change might be appreciated.

Screenshot (dark mode):
<img width="2056" alt="image" src="https://user-images.githubusercontent.com/17279485/233201837-0d005e10-d73f-4ddd-9f4a-285829ec63b1.png">
 
Screenshot (retained light mode):
<img width="1064" alt="image" src="https://user-images.githubusercontent.com/17279485/233202019-83ec79d8-d2ca-44c8-bc0a-7696355dfe72.png">


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-06-14 20:33:07 +00:00
JJ Kasper
916d2aa4d5
Validate i18n locale domain (#50220)
The `domain` value is meant to be a hostname and not include `http` or
port so this ensures we validate it doesn't contain `:` unexpectedly
causing invalid behavior.

Closes: https://github.com/vercel/next.js/issues/49656
x-ref:
https://github.com/vercel/next.js/issues/24991#issuecomment-870418366

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2023-06-14 11:07:58 -07:00
Wyatt Johnson
616ae108d9
Route Module Cleanup (#50936)
This cleans up some setup functions within the route modules, improves logic around headers, and handles the case where the URL is invalid better for routes using the request adapters.
2023-06-14 17:54:23 +00:00
OJ Kwon
2761cf34fa
feat(turbopack): enable sassOptions (#51259)
### What?

Minor fix to remove guards to the config since turbopack have this feature enabled.
2023-06-14 17:27:04 +00:00
Shu Ding
754c6480cb
Invalidate client cache when cookies have changed in Server Actions (#51290)
Similar to tags and paths, when `cookies().set()` is called we have to
invalidate the client router cache as well so routes with
`cookies().get()` will not holding the stale data. This is critical for
auth and other scenarios.

In the future we can have an optimization to only invalidate routes that
actually rely on cookies, similar to paths.
2023-06-14 17:26:27 +02:00
Jimmy Lai
c6c4a3d3eb
app router: fix double fetch on prefetch={false} (#51292)
This PR fixes a few reports that we were double fetching when navigating via a link that had prefetch false.

## Context

The bug was happening because we were inadvertently eagerly fetching even if we potentially bailed out of the optimistic navigation, which would then trigger another fetch from going through the regular navigation path.

There's potentially another bug here where we should potentially not bail out of optimistic navigation in the cases reported but we can fix that later.



fix #49844
link NEXT-1287
2023-06-14 13:42:14 +00:00
vercel-release-bot
cbeecba83b v13.4.6-canary.4 2023-06-14 11:21:24 +00:00
Tim Neutkens
dd937bde09
Remove edge functions tracking in dev server (#51122)
## What?

While looking at the CPU profile of booting up Vercel's site I noticed
that we call `getPageStaticInfo` a lot. Looking into this more it turns
out `getPageStaticInfo` is currently called for all routes, `pages` and
`app`, even though the data is only being used to keep track of which
routes are edge functions, however, this is already tracked as part of
the build output so this didn't make sense to me. First I tried
commenting out this entire block and all tests were passing, so I
removed it except for middleware as middleware can provide a `matcher`
which does need to be known before compiling the file as of right now.

After that change a different set of tests started failing, specifically
the one that checks if we warn correctly. Interestingly by fixing
`getPageStaticInfo` being called early and for all routes it also caused
these warnings to no longer trigger as there was a case in the manifest
plugin that called `getPageStaticInfo` with less information. Calling
`getPageStaticInfo` there was not needed either as we call
`getPageStaticInfo` at the beginning of the build for each entrypoint so
we already have the information required, it just had to be passed down
so that the manifest plugin could use it.

For Vercel's site this change improves booting the dev server by over 1
second.

Related to #48748

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

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

-->

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2023-06-14 13:17:16 +02:00
vercel-release-bot
c8f65ede87 v13.4.6-canary.3 2023-06-14 06:52:30 +00:00
JJ Kasper
f676d001b6
Correct build workers perf issue (#51271)
This continues off of https://github.com/vercel/next.js/pull/49937 and
https://github.com/vercel/next.js/pull/50194 ensuring we don't regress
on build perf due to reducing the amount of workers being used in
parallel.

Fixes: https://github.com/vercel/next.js/issues/51201
Fixes: https://github.com/vercel/next.js/issues/50555
2023-06-13 23:23:50 -07:00
Joost De Cock
667a90262b
[docs] Clarify .md handling with @next/mdx (#49785)
…iles as MDX

I got bitten by this passage because it reads as if merely changing the
`extension` setting will cause `.md` files to be loaded as MDX.

See: https://github.com/mdx-js/mdx/issues/2302

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

-->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 22:53:04 -07:00
Riqwan Thamir
825eefe7c0
Add mikroORM to external package list (#50487)
### What?

Adds mikroORM to external package list

### Why?

To prevent developers using
[MedusaJS](https://github.com/medusajs/medusa) modules with NextJS from
having to add this in their next config.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 22:49:50 -07:00
Choi Sumin
8ac9b342e3
chore(router): fix typo in comment (#50581)
<!-- 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 #

-->


### What?

fix typo in comment (withRoute -> withRouter)
2023-06-13 21:10:36 -07:00
Baffin Lee
2bd76827f0
Fix build error about trace file and edge route (#50808)
<!-- 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 #

-->

### What?

Error occurs when processing trace file rules of edge route.

### Why?

Edge routes have no trace files, so we don't need to process exclude and
include rules about it's trace file.

### How?

Fixes https://github.com/vercel/next.js/issues/50791

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 21:04:10 -07:00
Zack Tanner
3427d324d8
fix: app router hash scrolling should respect scroll-padding (#51268)
When navigating to a route with a hash parameter, the layout router
jumps to the element by scrolling to the node's `offsetTop` value.
However, this will ignore `scroll-padding`, which deviates from browser
behavior.

It looks like this isn't an issue in the pages router which currently
makes use of
[`scrollIntoView`](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/router/router.ts#L2262).

Closes NEXT-1171
Fixes #49612

---------
2023-06-13 20:50:51 -07:00
Baffin Lee
4ef3982f62
chore: remove useless duplicate code (#50705)
<!-- 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 #

-->

## What?

Remove useless duplicate code in `next-server.ts`, there are exactly the
same code in next lines.

## Why?

That code have no side effect, run it twice won't make any difference,
seems like someone forgot to delete it.


![image](https://github.com/vercel/next.js/assets/17738556/848d4b03-78cd-40a4-ae8b-a3126101efac)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 20:38:01 -07:00
Willem-Jaap
0bda6287b6
fix(cli): add all available options to cli commands, format them consistently (#48708)
### What?
Add all available options to cli commands
Consistent formatting for all options

### Why?
Options were not consistent across all commands, some were missing



Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-06-14 02:36:08 +00:00
Michael Novotny
94accfacf1
Adds homepage to eslint-config-next package (#51059)
Fixes (partially) #50843.

---------

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 11:22:05 -07:00
Delba de Oliveira
3d41ccb916
Update codeowners (#51250)
Tweak code owners after some testing and feedback. 

- Move the Next.js team up to be optional global code owners (so that everyone can review but are not tagged for review). Global individuals should still be tagged if there are no specific `.vercel.approvers` files in subdirectories.
- Adds @vercel/devex to image files so there's coverage on those files for the docs
- Target specific folder and files for Styfle to get notified
- Deletes some rules in the old GitHub codeowners
2023-06-13 17:47:12 +00:00
Will Binns-Smith
8f4ae065e0
Turbopack: remove __internal_nextjs_integration_test compile-time feature (#51204)
This removes the `__internal_nextjs_integration_test` compile-time feature. This would end up requiring an additional set of build targets for running integration tests was only used for two cases:

* Determining whether to read from an env var to load mocked Google fonts responses in next/font/google tests. This now uses the presence of this variable to determine whether to use mocked responses.
* Enabling the `next-dev/serializable` feature. This is now set directly instead.

Test Plan:
* Integration tests with Turbopack.
* Manual test of next/font/google with Turbopack
2023-06-13 16:26:44 +00:00
Jiachi Liu
6e5169b17a
Add buildId into RSC payload (#50974)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2023-06-13 17:58:07 +02:00
Shu Ding
9ffea84080
Simplify the client manifest structure (#51183)
Both of our bundlers won't split different exports of a module into different chunks, we can rely on https://github.com/facebook/react/pull/26624 to simplify the structure. This reduces the size of the client reference manifest by ~70%.
2023-06-13 15:25:39 +00:00
Sora Morimoto
0840793abf
Fix all 404 links (#51209)
I found some 404 links in jsdoc, so I used ripgrep to find and fix all the broken links to fix all the other links in this PR.
2023-06-13 14:25:40 +00:00
vercel-release-bot
b80dc83b23 v13.4.6-canary.2 2023-06-13 13:13:56 +00:00
vercel-release-bot
6e9113fe59 v13.4.6-canary.1 2023-06-12 22:32:21 +00:00
Jiachi Liu
9d0129c635
Fix standalone not found (#51172)
Fixes #50232

Passing down the private env into `'render-server'` module to pick up the proper react with require-hook in standalone server
fix NEXT-1260
2023-06-12 21:14:32 +00:00