Commit graph

12808 commits

Author SHA1 Message Date
Shu Ding
b0db95ffc6
Update error message for invalid react-dom/server imports (#41582)
Related discussion:
https://vercel.slack.com/archives/C043ANYDB24/p1666208186363099?thread_ts=1664676119.265829&cid=C043ANYDB24.

Tl;dr: RSC already renders and serializes things dynamically, there is
no need to manually do that in RSC and embed them via
dangerouslySetInnerHTML.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-19 17:56:14 -07:00
Marcial Cambronero
cec9d02dee
Small change to note <Link /> executes server methods (#41577)
I stumbled upon a lack of clarity when using `<Link />` where I believed it didn't execute the server methods before navigation. This change makes it a bit more clear

## Documentation / Examples

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


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-10-20 00:51:51 +00:00
Shu Ding
4adab6a61e
Improve server bundling strategy (#41584)
This PR adds a list of popular packages that should always opt-out
bundling in the server layer.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-19 17:45:37 -07:00
Shu Ding
bad909e4d1
Update page config APIs (#41580)
This PR updates app configurations from `export const config = { ... }`
to be directly exported.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

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

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-20 02:39:25 +02:00
Tim Neutkens
d261e7cd25
Add back() and forward() to new router (#41575)
Adds `router.back()` and `router.forward()`.
<!--
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 that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-19 17:35:43 -07:00
JJ Kasper
2551978fa4
Increase timeout-minutes for dev jobs 2022-10-19 17:04:41 -07:00
Jaril
008a962df8
Run all dev tests with replay on retry (#41168)
<!--
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 that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

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

@ijjk WIP here.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-19 15:15:36 -07:00
JJ Kasper
d76d8270d6
Update RSC detection in minimal mode and fix config collection (#41541)
Updates our RSC detection for revalidation in minimal mode and also ensures we await import promises when collecting app dir config. 

x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1666202250144319)
x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1666125853222599?thread_ts=1666122861.189349&cid=C035J346QQL)
2022-10-19 21:38:54 +00:00
Shu Ding
f055b167a5
Add TypeScript plugin (#41569)
This PR implements the TypeScript plugin (only applied to the app directory), and it will be automatically added to tsconfig.json when running the CLI. Due to how TS plugins work (a package name is required to specify), hence we can't use a subpath import like `next/typescript` for the plugin. To avoid installing a separate dependency, here I propose to reuse the `next` package: if the default export is called with the TypeScript option, we can say it's being used as a plugin. There is also environment variables we can check here, however it's specifically for VS Code (`VSCODE_CLI=1`) where this plugin should be working with other editors too.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-19 20:59:39 +00:00
Steven
fe762d329f
Fix next/image svg blur placeholder with fill (#41573)
This PR fixes two bugs:

- Fixes #40419 
- Fixes #41393 

The first is when the aspect ratio of the `width` and `height` does not
match the aspect ratio of the `blurDataURL` provided. This can result in
artifacts around the edges. The solution is to add
`preserveAspectRatio="none"`.

The second is when there is no `width` or `height` provided (which is
normal when using `fill`) so the viewBox was undefined. This can also
cause artifacts around the edges. The solution is to change the blur
technique from gaussian to css filter, similar to `next/legacy/image`.

Note: css blur might be [slower in
firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=925025) which is
why we'll only use it for this corner case.
2022-10-19 13:21:41 -07:00
Balázs Orbán
422ccb98b8
fix: allow user directory with styled-jsx prefix in next dev (#41484)
Fixes #41476, ref #40679

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-19 19:01:48 +00:00
Tim Neutkens
4ba1002175
Create hash digest for errors in app in production (#41559) 2022-10-19 19:56:55 +02:00
Shu Ding
fda355daa2
Improve type checking (#41427)
This PR implements the process of generating strict "type guard" files,
to ensure that all entrypoints have the correct export types. The type
checking process happens automatically during `next build`.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

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

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2022-10-19 18:28:36 +02:00
Jiachi Liu
897af6238e
Upgrade react-server-dom-webpack and precompiled assets (#41547)
Upgrade `react-server-dom-webpack` for exports renaming purpose

x-ref: https://github.com/facebook/react/pull/25504
2022-10-19 15:09:49 +00:00
Steven
6d088205b3
Fix docs typo in next/image sizes using fill prop (#41560)
Fix typo mentioned in
https://github.com/vercel/next.js/pull/41434#issuecomment-1283855509
2022-10-19 09:53:03 -04:00
Seiya Nuta
3f7e922a40
Docs for request headers overrides in middleware (#41546)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-10-19 15:46:03 +02:00
Tim Neutkens
d27185bb9a v12.3.2-canary.32 2022-10-19 13:29:32 +02:00
Tim Neutkens
4e40ba8488
Fix case where dispatch was missing (#41553) 2022-10-19 13:28:24 +02:00
Balázs Orbán
9ac231a0b4
chore(examples): upgrade Stripe example (#41550) 2022-10-19 11:22:50 +02:00
Jiachi Liu
2d1f72995b v12.3.2-canary.31 2022-10-18 21:19:01 -07:00
Jiachi Liu
5d532afa71
Mark styled-jsx as client-only package (#41414)
For css-in-js libs like styled-jsx we don't recommend to use on server side since it will blow up the rsc payload during navigation. This upgration of styled-jsx includes `client-only` as dependency so that it will throw when it's been used on serevr layer

x-ref: https://github.com/vercel/styled-jsx/pull/816
2022-10-19 03:52:33 +00:00
Donny/강동윤
7bde099a43
chore: Update swc_core to v0.39.7 (#41544)
This PR updates swc crates to 287c2f2941


- Closes https://github.com/vercel/next.js/issues/41527.
2022-10-19 03:04:32 +00:00
Steven
cff9fc9d74
BREAKING CHANGE: Remove browsersListForSwc and change default to legacyBrowsers: false (#41529)
Remove `browsersListForSwc` since it is enabled by default now, and disable `legacyBrowsers` by default.

This PR also bumps the default browserslist to the following:

- Chrome 64+
- Edge 79+
- Firefox 67+
- Opera 51+
- Safari 12+

See related RFC:
- Closes #33227 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-10-19 01:38:39 +00:00
JJ Kasper
3e2aec5e76
Fix E2E deploy test for API bodies (#41542)
Fixes:
https://github.com/vercel/next.js/actions/runs/3275381974/jobs/5390966319
2022-10-18 18:07:39 -07:00
Jiachi Liu
bc335d7ef7
Prebundle react for appDir (#41337)
Inline a react and react-dom for app dir, when `appDir` flag is enabled
opt into the built-in version for all.

For server layer react, use the react share subset for server
components.
For all server side of react-dom usage, use the server-rendering-stub.

Co-authored-by: Shu Ding <g@shud.in>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-18 16:32:23 -07:00
Steven
17773a1cf3
Fix links to next/legacy/image demo (#41539)
This PR fixes links to `next/legacy/image` (demo, deploy, etc)
2022-10-18 16:09:43 -07:00
JJ Kasper
cf1c0b6075
v12.3.2-canary.30 2022-10-18 09:54:31 -07:00
Shu Ding
761d7646cc
Fix next-app-loader bug in windows (#41520)
There is this `createAbsolutePath` function that concatenates a virtual
route and a dir path. The virtual route uses the posix separator `/` but
the dir path uses `\` in Windows.

Here's an example of the error:

```
error - ./node_modules/.pnpm/next@12.3.2-canary.29_ikefsjgelhtr3cq7h24gohqzbe/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%
2Fpage.tsx&appDir=E%3A%5CWorkSpace%5C2022%5Csongbook.studio%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!
Module parse failed: Octal literal in strict mode (9:41)
```

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-18 09:53:08 -07:00
Steven
9c5bb5bfe9
BREAKING CHANGE: Remove target: serverless (#41495)
The `target: serverless` config was deprecated a year ago starting in
[Next.js 12](https://nextjs.org/blog/next-12).

Tests were disabled in #41252 so we can now remove `target: serverless`
and all usage of `target` in `next.config.js`.

Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-18 09:47:13 -07:00
Kiko Beats
ebae05eeed
Update edge runtime to 1.1.0-beta.40 (#41513)
changes: https://github.com/vercel/edge-runtime/compare/edge-runtime@1.1.0-beta.39...edge-runtime@1.1.0-beta.40
2022-10-18 13:57:11 +00:00
Steven
9775111ab6
Add swcMinify to the Upgrade Guide (#41521)
Follow up to:

- #41506
2022-10-18 13:29:08 +00:00
Balázs Orbán
a36798968f
fix(ts): Cookies -> NextCookies (#41491) 2022-10-18 15:13:42 +02:00
JJ Kasper
df0e61b023
Fix app sc_client componet HMR server-side (#41510)
This ensures we properly clear the `sc_client` component cache from
`react-server-dom-webpack` in development so that HMR works properly
after a refresh.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

Fixes: [slack
thread](https://vercel.slack.com/archives/C043ANYDB24/p1666051202574509)
2022-10-18 00:48:27 -07:00
Jiachi Liu
fcac2e2b8a
Move fetch revalidate config under next options (#41505)
x-ref:
[slack-thread](https://vercel.slack.com/archives/C035J346QQL/p1665425741387879)
2022-10-18 00:44:30 -07:00
Anish Paudel
1e47930d5f
[docs] fix grammatical error #41507 (#41508)
Closes: https://github.com/vercel/next.js/issues/41507
2022-10-18 06:47:34 +00:00
JJ Kasper
45c36e66d8
Enable swcMinify by default (#41506)
x-ref: [slack
thread](https://vercel.slack.com/archives/CGU8HUTUH/p1666067928896099?thread_ts=1666066448.770739&cid=CGU8HUTUH)
2022-10-17 23:33:04 -07:00
Tim Neutkens
c5896f2850
Add vary header to fix incorrectly caching RSC as HTML response (#41479)
Add failing test for the back button download bug. Created it as a new
app given that adding it to the existing `app` suite did not reproduce
the issue for some reason.

The underlying reason is that we need to add `Vary: __rsc__,
__next_router_prefetch__` to ensure Chrome does not cache the response
and serve it on back button.

The download was caused by the `application/octet-stream` content type,
but that was just a consequence of serving the wrong response.

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

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

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

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-17 22:34:29 -07:00
Lee Robinson
6101bf69ad
Add remotePatterns link to next-image-unconfigured-host (#41504)
Didn't realize the `remotePatterns` usage was already in here (not live
yet, but merged into `canary`) - so just also added on this link for the
end 👍
2022-10-17 22:06:50 -07:00
Seiya Nuta
366da263df
Append the fragment in NextUrl.toString() (#41501)
<!--
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 that you're making:
-->

Consider the following middleware which redirects to
`/path/to#fragment`.

```ts
import { NextResponse } from 'next/server';

export async function middleware(request) {
  const url = new URL('/path/to#fragment', request.url);
  return NextResponse.redirect(url);
}
```

However, it actually redirects to `/path/to`, namely it discards the
fragment part in the destination URL `#fragment`. This is because
`NextURL.toString()` does not append that part. This PR fixes the bug.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-17 21:56:28 -07:00
Shu Ding
c5c2c9d38b
Fix global css being marked as side effect free (#41481)
It’s possible that global CSS imports, that come from node_modules, are
marked as side effect free because of possible `sideEffects: false` in
the external package's package.json. In that case, we still need to
handle global CSS imports as side effects on the server because we need
to collect them and avoid tree-shaking for these modules.

You can take a look at the test case to see what exactly happened.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-17 21:34:47 -07:00
Shu Ding
0c2c48e536
Avoid using the CSS href as the link tag key (#41493)
There is no need to use the href as key in our case because it's pure
during SSR and it won't re-order on the client. By using `index` we can
avoid some duplicate bytes here:

![CleanShot 2022-10-18 at 00 21
20@2x](https://user-images.githubusercontent.com/3676859/196295175-c5b437f7-0ae9-4d89-9d96-9594686168ae.png)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-17 21:30:23 -07:00
Tonye Jack
3a19b8ae05
chore(examples): fix typo (#41496)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-18 04:10:33 +00:00
Tim Neutkens
f260328900
BREAKING CHANGE: Enable newNextLinkBehavior (#41459)
- Enable newNextLinkBehavior. See #36436 
- Run next/link codemod on test suite

Note that from when this lands on apps trying canary will need to run
the new-link codemod in order to upgrade.
Ideally we have to detect `<a>` while rendering the new link and warn
for it.

Co-authored-by: Steven <steven@ceriously.com>
2022-10-17 21:20:28 -04:00
Alexander Sviridov
f5cb7bd829
fix(41456): check src/app folder too in getHasAppDir (#41458)
fixes https://github.com/vercel/next.js/issues/41456

When we check if app folder exists, check for src/app path too

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

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

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-17 15:32:44 -07:00
Felipe Barso
6249307b75
fix(stream): Allows body larger than 16 KiB with middleware (#41270)
Fixes #39262

The solution is to call `stream.push(null)` to trigger the `end` event
which allows `getRawBody` to run completely.

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

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-10-17 15:26:16 -07:00
Charly POLY
ec94e68cc7
examples(with-routes-graphql): update GraphQL Yoga to v3 (#41478)
Update the `with-routes-graphql` example to [GraphQL Yoga](https://www.the-guild.dev/graphql/yoga-server/) new major ([migration guide](https://www.the-guild.dev/graphql/yoga-server/v3/migration/migration-from-yoga-v2)).
2022-10-17 17:13:48 +00:00
Tim Neutkens
ce60157b1b
Fix useSearchParams comment (#41483)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-10-17 19:07:07 +02:00
Donny/강동윤
7a8c58fedd
chore: Update swc_core to v0.38.22 (#41477) 2022-10-17 17:08:14 +02:00
Steven
df35cf32d4
Update docs with minimum node version 14.x (#41482)
- Follow up to https://github.com/vercel/next.js/pull/41150
2022-10-17 11:06:05 -04:00
Steven
e2f16f96c2
Update next/image docs and examples (#41434)
This PR updates the docs for the following code change:

- #41399

There are a few updates here:

- [x] Update docs
- [x] Update links to docs inside component
- [x] Update examples
- [x] Fix corner cases in codemod
2022-10-17 10:41:35 -04:00