Commit graph

17779 commits

Author SHA1 Message Date
Ryan LaBarre
b436589ff8
Maintenance: minor example dep bumps to fix moderate vulns (#56375)
### What?
Merged a bunch of dependabot alerts in my own canary branch, mainly
postcss patch updates, and one graphql minor update, to fix moderate
security vulnerabilities in examples. Spot checked most and look good
still. EDIT: also one in scripts/send-trace-to-jaeger

### Why?
Because safety

### How?
Dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Steven <steven@ceriously.com>
2023-10-04 11:18:54 -04:00
vercel-release-bot
28767ad96a v13.5.5-canary.1 2023-10-04 13:17:50 +00:00
Shu Ding
bfee8eaa6e
Move Edge SSR event waitUntil into the handler (#56404)
Fixes the code added in #56381 where the event isn't passed to the outer function, but the adapter inside.
2023-10-04 13:13:18 +00:00
Viktor
2c5a8b1abb
Update redirect.mdx (#56414)
Add link to streaming doc
2023-10-04 13:01:10 +00:00
JJ Kasper
af04ef353b
Ensure loader generated export default has name (#56388)
When the function name is omitted webpack generates a name from the loader config which can be really long un-necessarily. Providing a name for the default function alleviates this. cc @shuding who found this
2023-10-04 09:28:07 +00:00
Yagiz Nizipli
a46c5afa60
fix: use fs.existsSync to avoid race condition (#56387)
Using `await fs.access` has couple of downsides. It creates unnecessary
async contexts where async scope can be removed. Also, it creates the
possibility of race conditions such as `Time-of-Check to Time-of-Use`.

It would be nice if someone can benchmark this. I'm rooting for a
performance improvement.

Some updates from Node.js land:

- There is an open pull request to add V8 Fast API to `existsSync`
method - https://github.com/nodejs/node/pull/49893
- Non-existing `existsSync` executions became 30% faster -
https://github.com/nodejs/node/pull/49593

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-04 00:19:10 +02:00
Josh Story
09b0ca42fb
App Router - preinitialize chunks during SSR (#54752)
Today when we hydrate an SSR'd RSC response on the client we encounter import chunks which initiate code loading for client components. However we only start fetching these chunks after hydration has begun which is necessarily after the initial chunks for the entrypoint have loaded.

React has upstream changes that need to land which will preinitialize the rendered chunks for all client components used during the SSR pass. This will cause a `<script async="" src... />` tag to be emitted in the head for each chunk we need to load during hydration which allows the browser to start fetching these resources even before the entrypoint has started to execute.

Additionally the implementation for webpack and turbopack is different enough that there will be a new `react-server-dom-turbopack` package in the React repo which should be used when using Turbopack with Next.

This PR also removes a number of patches to React src that proxy loading (`__next_chunk_load__`) and bundler requires (`__next_require__`) through the `globalThis` object. Now the react packages can be fully responsible for implementing chunk loading and all Next needs to do is supply the necessary information such as chunk prefix and crossOrigin attributes necessary for this loading. This information is produced as part of the client-manifest by either a Webpack plugin or Turbopack.

Additionally any modifications to the chunk filename that were previously done at runtime need to be made in the manifest itself now. This means we need to encode the deployment id for skew protection and encode the filename to make it match our static path matching (and resolutions on s3) when using `[` and `]` segment characters.

There are a few followup items to consider in later PRs
1. we currently bundle a node and edge version of react-server-dom-webpack/client. The node version has an implementation for busboy whereas the edge version does not. Next is currently configured to use busboy when handling a fetch action sent as multipart with a node runtime. Ideally we'd only bundle the one platform we are buliding for but some additional refactoring to support better forking is possibly required here

This PR also updates react from 09285d5a7 to d900fadbf.

### React upstream changes

- https://github.com/facebook/react/pull/27439
- https://github.com/facebook/react/pull/26763
- https://github.com/facebook/react/pull/27434
- https://github.com/facebook/react/pull/27433
- https://github.com/facebook/react/pull/27424
- https://github.com/facebook/react/pull/27428
- https://github.com/facebook/react/pull/27427
- https://github.com/facebook/react/pull/27315
- https://github.com/facebook/react/pull/27314
- https://github.com/facebook/react/pull/27400
- https://github.com/facebook/react/pull/27421
- https://github.com/facebook/react/pull/27419
- https://github.com/facebook/react/pull/27418
2023-10-03 21:40:25 +00:00
vercel-release-bot
e34fdf2890 v13.5.5-canary.0 2023-10-03 21:23:02 +00:00
Shu Ding
b7c85b8778
Expose util internally for debugging (#56381)
This PR exposes a temporary `__next_private_global_wait_until__` globally for Edge SSR's function context to do `waitUntil`.
2023-10-03 21:04:16 +00:00
Leah
515784c277
chore: pass defineEnv from next.js to rust directly (#56216)
### What?

Deduplicates our env var injection between the JS and rust side

Closes WEB-937

---------

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2023-10-03 22:43:21 +02:00
Michael Novotny
f77f222d4f
Updates MDX docs (#56378)
When trying to update my own website to use App Router, I found the current Next.js Docs were missing specifics to get it working (most notably, no mention of `pageExtensions`). Coupled with community feedback, we decided to revisit and rework the entire page.

The page has been walked through and tested on brand new create-next-app projects for both App and Pages Routers to ensure completeness.

Closes [DX-2095](https://linear.app/vercel/issue/DX-2095/improve-nextjs-mdx-docs)

Rendered pages while running locally, in case they are more helpful in seeings the changes and different between routers.

### App Router 

![localhost_3332_docs_pages_building-your-application_configuring_mdx (1)](https://github.com/vercel/next.js/assets/446260/2a2b1a66-c794-4831-ab89-a6a61d02eb84)

### Pages Router

![localhost_3332_docs_pages_building-your-application_configuring_mdx](https://github.com/vercel/next.js/assets/446260/cc60a8a2-a931-4033-aaba-e989a719692d)
2023-10-03 19:32:58 +00:00
Syphini
ef440d40b6
add digest property to error prop (#56339)
Matching the conventions laid out in https://nextjs.org/docs/app/api-reference/file-conventions/error
2023-10-03 14:21:30 +00:00
Wyatt Johnson
0eb71b6f07
Misc Typescript and export updates (#55841)
This refactors a bit of the typescript types around the export and build pipelines. This does not introduce any new functionality.


Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-10-03 14:11:09 +00:00
JJ Kasper
aa3377edec
Fix code freeze disable handling (#56340)
Fixes: https://github.com/vercel/next.js/actions/runs/6388368482
2023-10-03 13:54:46 +00:00
Shu Ding
8469d0ac27
Add test case for the permalink option of useFormState (#56329)
Ref: https://github.com/facebook/react/pull/27372.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-10-03 13:47:03 +02:00
Tim Neutkens
b79a11f6ad
Fix mjs import for Turbopack test (#56354)
Turbopack currently supports fully-specified `.mjs` imports. Double
check with @sokra to verify if this is correct.

<!-- 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-10-03 13:33:04 +02:00
JJ Kasper
11b01e06df
Update parallelizing tasks with webpackBuildWorker config (#56287)
This updates to make build/server tracing parallelized with our webpack
compilations so that it can start right after the server compilation is
finished instead of after all compilations are finished. This
parallelizing requires the `experimental.webpackBuildWorker` config be
enabled and doesn't change behavior without it.

Part of this also cleans up our plugin state restoring/handling to use
serializable structures instead of serializing/deserializing manually.
2023-10-02 20:49:36 -07:00
vercel-release-bot
1e8dca4a87 v13.5.4 2023-10-03 01:40:53 +00:00
vercel-release-bot
9e24d6ff3b v13.5.4-canary.11 2023-10-03 00:36:26 +00:00
Jiachi Liu
281ae41896
Fix build output logging order (#56335)
Closes NEXT-1671 

Move "Finalizing" to the bottom, and print tree view after file tracing
spinner

### After
```
 ✓ Generating static pages (5/5)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

Route (app)                              Size     First Load JS
┌ ○ /                                    133 B            80 kB
└ ○ /_not-found                          876 B          80.8 kB
+ First Load JS shared by all            79.9 kB
  ├ chunks/main-app-f7da6251716e8121.js  78.2 kB
  └ chunks/webpack-bf1a64d1eafd2816.js   1.66 kB
```

### Before

```
 ✓ Generating static pages (5/5)
 ✓ Finalizing page optimization

   Collecting build traces  .Route (app)                              Size     First Load JS
┌ ○ /                                    133 B            80 kB
└ ○ /_not-found                          876 B          80.8 kB
+ First Load JS shared by all            79.9 kB
  ├ chunks/main-app-f7da6251716e8121.js  78.2 kB
  └ chunks/webpack-bf1a64d1eafd2816.js   1.66 kB


○  (Static)  automatically rendered as static HTML (uses no initial props)

 ✓ Collecting build traces
 ```
2023-10-02 17:29:55 -07:00
JJ Kasper
d7626ffb79
Revert "misc: shortcut styled-jsx in external resolution (#56291)" (#56334)
We can't resolve the exact URL in externals otherwise when you move from
one path to another.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1696291412072799?thread_ts=1695906014.899719&cid=C04KC8A53T7)

This reverts commit dba978f4ba.

<!-- 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-10-02 17:22:22 -07:00
vercel-release-bot
db48052a5e v13.5.4-canary.10 2023-10-02 23:23:48 +00:00
Jiachi Liu
7df92b868a
test: add flaky turbopack integration tests to manifest (#56309) 2023-10-03 00:53:09 +02:00
Alexandre Baizeau
eeb9b3325d
fix: Invalid URL (404) provided on server actions error (#56323)
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2023-10-03 00:32:43 +02:00
Omar McIver
3172cfedc8
fix: support both decoded and encoded url requests of conventioned files (#56187)
Co-authored-by: Omar McIver <omar.mciver@mode3cloud.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2023-10-03 00:02:49 +02:00
Boris Besemer
a2f9ef5a34
fix(next/client): keep hash when navigating from app to pages router (#56223)
### What?

Fixes the pages router not receiving a hash when being linked from the
app router.

### Why?

The hash being removed breaks sites that rely on it for client side
features.

### How?

The hash gets omitted from the URL when used as a key for the
preflightCache. Once it's clear that it's an external URL and that it's
not empty we can use the initial href to send the hash as well.

Not completely sure if there's an edge case that might break, I added an
extra check for when the hash is only used to scroll the page.

This might need an additional test case just for
`navigate-reducer.test.tsx`.

Fixes #56212

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-10-02 14:43:04 -07:00
JJ Kasper
a970f28439
Add code freeze GitHub actions for releasing (#56325)
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2023-10-02 23:10:40 +02:00
Jimmy Lai
5fbc23e7b2
misc: fix instrumentation with bundled server (#56318)
This PR fixes an issue with the instrumentation hook breaking with the
bundled server. I'll follow up with a better test setup for the bundled
server in a follow up (tomorrow).

<!-- 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-10-02 11:50:30 -07:00
Tim Neutkens
98432a4630
Remove buildId test as it's no longer relevant (#56316)
Follow-up to #56310.
2023-10-02 18:20:47 +00:00
Sukka
86274e68aa
fix(#53190): add missing crossOrigin to assetsPrefix resources (#56311)
Fixes #53190.

Next.js App Router comprises two categories of resources, same-origin ones (RSC payload, in the form of inline `<script />`) and possibly third-party ones (chunks that respect the `assetPrefix`). The latter should also respect the `crossOrigin` option from `next.config.js`.

Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-10-02 17:21:49 +00:00
Zack Tanner
e970e050a9
Reland static prefetches & fix prefetch bailout behavior (#56228)
Reland #54403

Also modifies the implementation of #55950 to not change the prefetch behavior when there is flight router state - we should only check the entire loader tree in the static prefetch case, otherwise we're inadvertently rendering the component tree for prefetches that match the current flight router state segment. ([slack x-ref](https://vercel.slack.com/archives/C03S8ED1DKM/p1695862974745849))

This includes a few other misc fixes for static prefetch generation:
- `next start` was not serving them (which also meant tests weren't catching a few small bugs)
- the router cache key casing can differ between build and runtime, resulting in a bad cache lookup which results suspending indefinitely during navigation
- We cannot generate static prefetches for pages that opt into `searchParams`, as the prefetch response won't have the right cache key in the RSC payload
- Layouts that use headers/cookies shouldn't use a static prefetch because it can result in unexpected behavior (ie, being redirected to a login page, if the prefetch contains redirect logic for unauthed users)

Closes NEXT-1665
Closes NEXT-1643
2023-10-02 17:12:55 +00:00
Hamir Mahal
be952fbb31
fix: typo in with-stripe-typescript example (#56274)
fixes #56273.
2023-10-02 16:47:23 +00:00
Tim Neutkens
7f60cc8b0f
Support serverRuntimeConfig and publicRuntimeConfig in Turbopack (#56310)
Allows `publicRuntimeConfig` / `serverRuntimeConfig` to be set.
2023-10-02 16:40:58 +00:00
Tobias Koppers
8d18ad60d7
update webp crate (#56307)
### What?

update dependencies

Closes WEB-1696
2023-10-02 16:16:26 +00:00
Jiachi Liu
ac95a20276
Fix flaky test for size output (#56303)
x-ref: https://github.com/vercel/next.js/actions/runs/6380869104/job/17316148085?pr=56187

Tune the regex that match the correct number but without leading zero
2023-10-02 15:47:09 +00:00
Jimmy Lai
dba978f4ba
misc: shortcut styled-jsx in external resolution (#56291)
This PR just shortcuts the styled-jsx resolution to tell webpack to
compile it immediately. I noticed this could cause an issue if
`config.experimental.bundlePagesExternals` was enabled.

<!-- 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-10-02 17:02:52 +02:00
Jimmy Lai
458dab83ca
misc: update code owners (#56290)
Adding myself to the build folder config

<!-- 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-10-02 17:02:28 +02:00
Daigo Shitara
5254aaecf6
Update image.mdx (#56266)
fix link

Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-10-02 14:29:18 +00:00
Daigo Shitara
0d4859b247
Update image.mdx (#56269)
add closing `'`.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-10-02 14:06:23 +00:00
Tim Neutkens
59bda2d818
More Turbopack fixes (#56299)
Skips additional production-only tests.

Follow-up to #56089.

In this PR I went through all of `test/integration` looking for `nextBuild(` and added the skipping logic.
2023-10-02 13:55:23 +00:00
Jimmy Lai
ecd94c1a4d
misc: enable source maps for bundled runtime (#56289)
This PR enables the generation of source maps for the bundled runtimes. This is fast enough that we can just use the optimal source map option directly. This is useful if you're having some errors in Next.js itself.
2023-10-02 10:05:27 +00:00
vercel-release-bot
033e8a5c87 v13.5.4-canary.9 2023-10-02 09:02:04 +00:00
Tobias Koppers
488fc1c003
clear require cache only when needed (#56198)
### What?

clear require cache only when there has been changes

Before we cleared the require.cache after every ensurePage call. This is
too much. The new approach compares the hashes of all emitted files with
the previous hashes and only clears require.cache when they differ.

### Why?

reloading a page and client navigation is slow due the re-requiring
server files


Closes WEB-1686
2023-10-02 10:57:35 +02:00
Tim Neutkens
2cf8e6c863
More Turbopack fixes (#56275)
Skips additional production-only tests.

Follow-up to https://github.com/vercel/next.js/pull/56089

<!-- 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-10-02 09:42:32 +02: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
Tobias Koppers
b8a63f44dd
update test mainfest (#56214)
Closes WEB-1687
2023-10-02 08:45:50 +02:00
Donny/강동윤
83c18deafe
Pass same mangling option as terser to SWC minifier (#56281)
### What?

Pass `keep_classnames: true` to the SWC minifier, as we are passing it to `terser`.

### Why?

5f7faac1e6/packages/next/src/build/webpack-config.ts (L953-L958)

### How?

Closes WEB-1676
Fixes #55682
2023-10-02 04:38:13 +00:00
Tim Neutkens
5f7faac1e6
More Turbopack test fixes (#56248)
Skips additional production tests.

Follow-up to #56089

<!-- 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-10-01 17:50:03 +02:00
Zack Tanner
cb8b3a21e5
only override NODE_EXTRA_CA_CERTS when using experimental https flag (#56252)
This was unintentionally preventing this flag from being sent on `process.env` even if you weren't using `--experimental-https`. 

[x-ref](https://github.com/vercel/next.js/pull/55775#issuecomment-1741870873)
2023-09-30 23:43:03 +00:00
Imamuzzaki Abu Salam
3b8a8f5cfd
docs(sharp-missing-in-production.mdx): update standalone command (#56239) 2023-09-30 15:26:02 +00:00