Commit graph

12562 commits

Author SHA1 Message Date
Tim Neutkens
629c7f584e
Clean up startTransition in Link (#40505)
- Use React.startTransition instead of useTransition
- Upgrade to latest React experimental
- Split router cache invalidate into separate function

Some minor cleanup while verifying behaviors.
2022-09-13 11:47:20 +00:00
Balázs Orbán
e6ed8ef56e
add Balázs as codeowner to /errors/ directory
Ref: #40501
2022-09-13 13:23:03 +02:00
Jan Klimo
c11310b0f1
Fix a typo in docs (#40501)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order 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 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 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.md#adding-examples)

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-09-13 13:22:25 +02:00
Balázs Orbán
baf6046bf3
chore: use link: instead of file: in CONTRIBUTING.md (#40510)
Closes #40497

Ref: https://pnpm.io/cli/link, https://stackoverflow.com/a/70266777

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-13 12:56:53 +02:00
JDansercoer
d0903a5c5b
Update semver of eslint-plugin-react (#40246)
`eslint-plugin-react` has a broken version between v7.31.2-6. Upping the version range ensure that only functioning packages get installed.

Fixes #40245



## Bug

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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-13 01:55:44 +00:00
Steven Tey
f33c23c144
Added "negative matcher" documentation (#40282)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order 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:
-->

## 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.md#adding-examples)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-12 18:26:40 -07:00
Victor Boucher
3f2b4bc904
docs(basic-features/script): update script version history (#40263)
Made an addition to the version history within the Script component
docs. In the docs there are examples where the Script component is being
used within a _document.js/tsx file, but it does not get mentioned that
this is only supported from version 12.2.2 onwards.

## Documentation / Examples 
- [x] Make sure the linting passes by running `pnpm lint`

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-12 18:06:58 -07:00
Ryan Parker
0a093c0e82
docs(errors/large-page-data): how to see data being passed to page (#40491)
## Summary

This PR adds a note about how to see the data that this error is complaining about:

```sh
Warning: data for page "/" is xxx which exceeds the threshold of 128 kB, this amount of data can reduce performance.
```

This debug trick was something I came across in a [discussion](https://github.com/vercel/next.js/discussions/39880) and I thought it would be helpful to others like it was for me.

## 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.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-13 00:44:43 +00:00
Malte Ubl
421029cf61
Don't execute prefetches for bot user agents (#40435)
Such bots typically navigate websites using hard navigations (as they
crawl one URL at a time). Respectively, they do not benefit from
prefetches at all, while increasing the cost of both the crawl and
operating the site.

<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order 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`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-09-12 17:27:43 -07:00
JJ Kasper
8bf6a87303
Rename allowDynamic to unstable_allowDynamic (#40496)
Follow-up to https://github.com/vercel/next.js/pull/39539 as discussed
this renames to `unstable_` prefix initially while we test this out
further.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-12 15:32:18 -07:00
Damien Simonin Feugas
97ac344468
feat(edge): allows configuring Dynamic code execution guard (#39539)
### 📖  What's in there?

Dynamic code evaluation (`eval()`, `new Function()`, ...) is not
supported on the edge runtime, hence why we fail the build when
detecting such statement in the middleware or `experimental-edge` routes
at build time.

However, there could be false positives, which static analysis and
tree-shaking can not exclude:
- `qs` through these dependencies (get-intrinsic:
[source](https://github.com/ljharb/get-intrinsic/blob/main/index.js#L12))
- `function-bind`
([source](https://github.com/Raynos/function-bind/blob/master/implementation.js#L42))
- `has`
([source](https://github.com/tarruda/has/blob/master/src/index.js#L5))

This PR leverages the existing `config` export to let user allow some of
their files.
it’s meant for allowing users to import 3rd party modules who embed
dynamic code evaluation, but do not use it (because or code paths), and
can't be tree-shaked.

By default, it’s keeping the existing behavior: warn in dev, fails to
build.
If users allow dynamic code, and that code is reached at runtime, their
app stills breaks.

### 🧪 How to test?

- (existing) integration tests for disallowing dynamic code evaluation:
`pnpm testheadless --testPathPattern=runtime-dynamic`
- (new) integration tests for allowing dynamic code evaluation: `pnpm
testheadless --testPathPattern=runtime-configurable`
- (amended) production tests for validating the new configuration keys:
`pnpm testheadless --testPathPattern=config-validations`

To try it live, you could have an application such as:
```js
// lib/index.js
/* eslint-disable no-eval */
export function hasUnusedDynamic() {
  if ((() => false)()) {
    eval('100')
  }
}

export function hasDynamic() {
  eval('100')
}

// pages/index.jsx
export default function Page({ edgeRoute }) {
  return <p>{edgeRoute}</p>
}

export const getServerSideProps = async (req) => {
  const res = await fetch(`http://localhost:3000/api/route`)
  const data = await res.json()
  return { props: { edgeRoute: data.ok ? `Hi from the edge route` : '' } }
}

// pages/api/route.js
import { hasDynamic } from '../../lib'

export default async function handle() {
  hasDynamic()
  return Response.json({ ok: true })
}

export const config = { 
  runtime: 'experimental-edge' ,
  allowDynamic: '/lib/**'
}
```

Playing with `config.allowDynamic`, you should be able to:
- build the app even if it uses `eval()` (it will obviously fail at
runtime)
- build the app that _imports but does not use_ `eval()`
- run the app in dev, even if it uses `eval()` with no warning

### 🆙 Notes to reviewers

Before adding documentation and telemetry, I'd like to collect comments
on a couple of points:
- the overall design for this feature: is a list of globs useful and
easy enough?
- should the globs be relative to the application root (current
implementation) to to the edge route/middleware file?
- (especially to @sokra) is the implementation idiomatic enough? I've
leverage loaders to read the _entry point_ configuration once, then the
ModuleGraph to get it back during the parsing phase. I couldn't re-use
the existing `getExtractMetadata()` facility since it's happening late
after the parsing.
- there's a glitch with `import { ServerRuntime } from '../../types'` in
`get-page-static-info.ts`
([here](https://github.com/vercel/next.js/pull/39539/files#diff-cb7ac6392c3dd707c5edab159c3144ec114eafea92dad5d98f4eedfc612174d2L12)).
I had to use `next/types` because it was failing during lint. Any clue
why?

### ☑️ Checklist

- [ ] 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`
- [x] Integration tests added
- [x] Documentation added
- [x] Telemetry added. In case of a feature if it's used or not.
- [x] Errors have helpful link attached, see `contributing.md`
2022-09-12 15:01:00 -07:00
Thomas Knickman
d83ceeec08
chore(examples): update turborepo examples link (#40487)
## Documentation / Examples

We now maintain a landing page of all monorepo examples with Next.js apps. We can point users here instead. 

- [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.md#adding-examples)
2022-09-12 18:46:16 +00:00
M.K. Safi
d6f5ebf773
Clarify use of loading property (#40488)
I was a little confused by the `loading` property having the value `<header />`. I think that property is meant to show a loading state while the file is being loaded? If my assumption is correct, I think this change makes sense.
2022-09-12 18:31:23 +00:00
JJ Kasper
2872deef64
v12.3.1-canary.1 2022-09-12 09:58:25 -07:00
Donny/강동윤
53ce3bf248
chore: Update swc (#40292)
This PR update swc crates to
4c078b0ac3

This PR applies
 - patches for the performance of minifier
 - https://github.com/swc-project/swc/pull/5796
   - Closes https://github.com/vercel/next.js/issues/40399
2022-09-12 09:36:44 -07:00
Đorđe Spasić
804dc6bd10
fix: eslint no-script-component-in-head error url (#40422)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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.md#adding-examples)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-12 16:15:33 +00:00
Balázs Orbán
735575708a
docs: move swcMinify: true out of "Experimental features" section (#40394)
See the blog post:
https://nextjs.org/blog/next-12-3##swc-minifier-stable

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-12 08:43:53 -07:00
Jiachi Liu
c7d3f9d413
Drop legacy RSC handling in client for pages (#40472)
Remove the unused RSC handling for pages in both server router and client side in favor of using RSC in app dir
2022-09-12 13:15:18 +00:00
Tim Neutkens
f92a4cee8a
Add failing case for location throw (#40445)
Found that the cause was that `React.useId()` returns the same value across requests whereas it was being used to create a unique key. On further inspection that code could be removed altogether as `id` was not used client-side and the `rscCache` map is no longer needed as the flight instance is already being created per request so it can live in the context of the request execution.


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-12 12:45:37 +00:00
Balázs Orbán
3851d9065f
docs(middleware): fix broken link 2022-09-12 13:13:09 +02:00
Lee Robinson
40fc066f09
Update Server Components documentation. (#40452)
This PR updates the server components documentation to make it more clear the benefit of server components and what their current status is inside Next.js.

It removes code snippets and CTAs for trying them out, as things have changed with the Layouts RFC since these docs were previously written. With the upcoming changes, server components will now be the default inside `app`. The list of supported and unsupported features was no longer accurate.

We will be providing more guidance as the layouts and routing changes are ready to be tested.

[Read the Layouts RFC](https://nextjs.org/blog/layouts-rfc) for more details.
2022-09-12 00:12:14 +00:00
JJ Kasper
fc3ef810ba
Update dev watcher to ignore more accurately (#40412)
This ensures we ignore all except the files/directories we are explicitly wanting to watch to prevent watching/considering directories with massive amounts of files slowing down startup.

## Bug

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

Fixes: https://github.com/vercel/next.js/pull/38483#issuecomment-1242154665
2022-09-11 18:39:32 +00:00
Balázs Orbán
8bc587aa30
feat(ts): expose AppType (#40391)
An alternative solution to #40371

Ref: #38867, https://github.com/t3-oss/create-t3-app/issues/412,
https://github.com/t3-oss/create-t3-app/pull/414

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-09 13:32:58 -07:00
Hannes Bornö
6fb1121e8c
Add missing trace for full reload event (#40393)
Added missing trace for `client-full-reload` event in hot reloader. Full
reload tests moved to hmr, think they make more sense there than on
their own.
2022-09-09 13:09:15 -07:00
Sukka
3d23c3d9ee
fix(#40388): next/dynamic should only add default loading without suspense (#40397)
The PR fixes #40388.

Currently, `next/dynamic` will try to provide a default `loading` to the
`loadableOptions` even when `suspense` is enabled, thus triggering the
incorrect warning. The PR fixes that. The corresponding integration test
case is also updated.

cc @huozhi 

## Bug

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

Co-authored-by: huozhi <inbox@huozhi.im>
2022-09-09 12:46:23 -07:00
Jiachi Liu
b09592e6ac
Bump styled-jsx for showing displayName (#40411)
x-ref: https://github.com/vercel/styled-jsx/pull/813
2022-09-09 12:31:36 -07:00
Andrew Johnson
38169e3385
Fix mdx docs (#40402)
## 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.md#adding-examples)

The MDX guide is missing `@mdx-js/react` as a required dependency in the
setup section.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-09 12:12:36 -07:00
Jiachi Liu
d64fc54507
Temporarily disable unstable app test (#40408)
Disable this test and investigate it later

x-ref:
https://github.com/vercel/next.js/runs/8270347830?check_suite_focus=true
x-ref:
https://github.com/vercel/next.js/runs/8270348185?check_suite_focus=true
2022-09-09 11:50:18 -07:00
Balázs Orbán
13e423ccf6
chore: fix examples (#40395)
Closes #40366

Rebass is not dependent on `styled-components` anymore. See:
https://rebassjs.org/migrating/#v4-breaking-changes

Closes #40367

Document has been converted (#39871) from class, so `this.props` threw
an error.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-09 15:35:37 +02:00
Tim Neutkens
a3a20dcbc1
Add template and error file types (#39808)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2022-09-09 14:44:12 +02:00
rubytree33
9ab5c012bf
Stop build warning about experimental: { esmExternals: 'loose' } (#40377)
Fixes #40368.

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] ~~Integration tests added~~ [none applicable]
- [ ] ~~Errors have helpful link attached, see `contributing.md`~~ [no new errors]
2022-09-09 02:35:33 +00:00
JJ Kasper
614f0d8e19
v12.3.1-canary.0 2022-09-08 15:18:23 -07:00
Wyatt Johnson
c6ef857d57
Subresource Integrity for App Directory (#39729)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order 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:
-->

This serves to add support for [Subresource
Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)
hashes for scripts added from the new app directory. This also has
support for utilizing nonce values passed from request headers (expected
to be generated per request in middleware) in the bootstrapping scripts
via the `Content-Security-Policy` header as such:

```
Content-Security-Policy: script-src 'nonce-2726c7f26c'
```

Which results in the inline scripts having a new `nonce` attribute hash
added. These features combined support for setting an aggressive Content
Security Policy on scripts loaded.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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.
- [x] Errors have 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.md#adding-examples)

Co-authored-by: Steven <steven@ceriously.com>
2022-09-08 15:17:15 -07:00
Jiachi Liu
1858fa966c
Fix page url for edge routes in app dir (#40361)
For edge routes in app dir, we passed the page name as url so that the
url will be incorrect:

* a non-dynamic route `/dashboard` will become `/dashboard/page`
* a dynamic route `/dynamic/[id]` with url `/dyanmic/123` will still hit
`/dynamic/page/[id]/page`

This PR uses normalized `params.page` with interoplated as correct
pathname for the page.
2022-09-08 14:57:56 -07:00
Kiko Beats
a234abfae6
docs: fix middleware path (#40340)
Hello,

Just update the docs to be aligned with the current middleware implementation 🙂

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-08 21:27:17 +00:00
Jasham
ea33b84089
docs: fix typos (#40342)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-08 20:38:26 +00:00
Shu Ding
a24872b4ab
Fix flight manifest to include all chunks (#40365)
When a client module is imported by both a module from an `app` entry and a module from `pages` entry, it is possible that it is included in the `pages` chunk eventually. The current check makes the manifest incomplete in that case.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-08 19:09:33 +00:00
Jiachi Liu
c8d3fa6a77
Update react-server-dom-webpack (#40356)
Bump `react-server-dom-webpack` for support of `experimental_use` API
2022-09-08 18:10:32 +00:00
JJ Kasper
ba4c575334
v12.3.0 2022-09-08 09:00:04 -07:00
JJ Kasper
9576a278b6
v12.2.6-canary.13 2022-09-08 08:48:54 -07:00
Leon Si
0376534a29
docs: fix typo (#40354)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order 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 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 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.md#adding-examples)
2022-09-08 08:44:58 -07:00
JJ Kasper
56c5abd3de
Remove warning for swcMinify being enabled (#40359)
This removes the warning for `swcMinify` as a release candidate as it is
now being marked as stable.

x-ref: [slack
thread](https://vercel.slack.com/archives/CGU8HUTUH/p1662647498560729)

## 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.md#adding-examples)
2022-09-08 08:43:20 -07:00
Carl von Buelow
75e5616ce4
Update onLoadingComplete for next/future/image to receive reference to <img> (#40326)
* fixes #18398
* fixes #38864

Co-authored-by: Steven <steven@ceriously.com>
2022-09-08 08:37:41 -07:00
Balázs Orbán
5793301c60
fix(lint): disable react/no-unknown-property (#40331)
~(PR https://github.com/jsx-eslint/eslint-plugin-react/pull/3377)
introduced a change in `eslint-plugin-react@7.31.2` that will now show
an error when unknown properties appear on elements. We can opt out of
this by overriding the default.~

As discussed internally, we are turning `react/no-unknown-property` off,
as it might be confusing even if different props are being used, (eg.:
`css` for `emotion`).

It's easy to fix
https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options,
but it might not be clear at first glance that Next.js is using
`eslint-plugin-react` internally.

If the user wants to enforce this rule, they can still add it to their
own `rules` config.

Fixes #40321, ref: https://github.com/vercel/next.js/discussions/40269,
https://github.com/vercel/next.js/issues/38333
2022-09-08 08:21:36 -07:00
Steven
712d98d3d7
Update docs for remotePatterns image config (#40350)
This updates the docs to favor `remotePatterns` image config (instead of `domains`)
2022-09-08 11:19:55 -04:00
Steven
66834d5c15
Fix image-component example types (#40352) 2022-09-08 11:09:46 -04:00
Henrik Wenz
2b9268a911
[Docs] Merge with-mobx-state-tree with with-mobx-state-tree-typescript example (#40306)
## Changes

see commits

## Context

As discussed in https://github.com/vercel/next.js/pull/40302#issuecomment-1239238966 we are going to merge the mobx examples.

#40302

## 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.md#adding-examples)
2022-09-08 12:56:12 +00:00
Henrik Wenz
b85fceac63
[Docs] Remove babel from custom-server-typescript example (#40309)
## 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.md#adding-examples)
2022-09-08 12:50:53 +00:00
S0UPernova
1aa341f635
added type to clientPromise in with-mongodb/lib (#40339)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have 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 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.md#adding-examples)
2022-09-08 12:44:38 +00:00
Balázs Orbán
45d68ae509
Update README.md
Closes #40336
2022-09-08 13:43:12 +02:00