Commit graph

8569 commits

Author SHA1 Message Date
Peter Mekhaeil
005a6e4c85
chore: Add Alex to lint documentation (#26354)
This Pull Request adds [Alex](https://alexjs.com/) to our documentation. It catches insensitive, inconsiderate writing. 

The original PR (https://github.com/vercel/next.js/pull/25821) is too large so I have decided to break it down into smaller PRs. This PR is the first part. Then I will continue to add the rest of the documentation in smaller PRs.

## More Information on Alex:
https://alexjs.com/
https://github.com/get-alex/alex

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-22 16:03:12 +00:00
Jiachi Liu
fb5fb7f21f
fix: ignore invalid accept-language header (#26476)
Fixes #22329

## Bug

- [x] Related issues linked using fixes #22329
- [x] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-22 15:05:54 +00:00
Sam Robbins
fc67fc737c
Add module.exports to security headers documentation (#26466)
Without `module.exports`, the provided code won't work if just pasted into `next.config.js`

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-22 08:54:53 +00:00
Vitaly Baev
562640dbb4
(examples/with-webassembly) fixed for webpack 5 (#26440)
## Documentation / Examples

- [x] Make sure the linting passes

Fixes #26436

As mention in #25854 `with-webassembly` example doesn't work anymore after switching to webpack 5.
This PR adds webpack experimental configuration.
2021-06-21 16:45:16 +00:00
Tim Neutkens
4d13d671aa
Add check for startLatency in fast refresh (#26417) 2021-06-21 16:28:09 +02:00
Tim Neutkens
075139a23d v11.0.1-canary.6 2021-06-21 13:32:34 +02:00
JJ Kasper
2b761a9e47
docs(router.md) Add note about page state and navigation (#26320)
This adds a note to the router doc explaining that page state is not reset by default when updating the URL but staying on the same page as this has come up in a few issues. 


## Documentation / Examples

- [x] Make sure the linting passes

x-ref: https://github.com/vercel/next.js/issues/26270
2021-06-21 09:09:50 +00:00
Lee Robinson
ad5e9bd644
Remove period for ESLint passHref docs link. (#26402)
Due to the period at the end of this sentence, when clicking on the link it would 404. This PR simply removes the period from the message.
2021-06-20 22:55:03 +00:00
Lee Robinson
eac0374e45
Update with-eslint example. (#25817) 2021-06-20 16:16:34 -05:00
Guilherme Araújo
2a5db0b58c
Docs: Add Prettier section on ESLint page (#26347)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-20 21:00:57 +00:00
Akash Patel
d88f484e89
add missing closing bracket (#26375)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-20 17:30:09 +00:00
Lee Robinson
afa86cc5bb
Improve the next/script documentation. (#26325)
* Improve the `next/script` documentation.

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-18 15:36:51 -05:00
Paco
d0f41f3b49
Update create-next-app template favicons (#26289) 2021-06-18 15:29:11 -05:00
JJ Kasper
94f7bfca99
v11.0.1-canary.5 2021-06-18 15:00:12 -05:00
Lee Robinson
ffaa4813b6
Add docs on adding HTTP security headers. (#25833) 2021-06-18 12:34:32 -05:00
Tim Neutkens
88ed5269b5
Add runtime to hotUpdateMainFilename (#26256)
Updates the hotUpdateChunk to include `[runtime]` for web workers support.

Fixes #26152
Fixes #19865
Fixes #26144

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-18 17:12:20 +00:00
Joe Bell
98acfaf8cc
Extend disclaimer for dynamic image imports (#26241)
* docs: extend disclaimer for dynamic image imports

* docs: extend guidance on blurDataURL

* Update docs/api-reference/next/image.md

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-06-18 16:21:12 +02:00
Luke Ingalls
67f5830acc
docs: fixed typo (#26311) 2021-06-18 15:20:37 +02:00
Houssein Djirdeh
ce4f1e889e
[ESLint] Adds --quiet flag, TypeScript resolver and bug fixes (#26280) 2021-06-18 15:17:53 +02:00
JJ Kasper
b4e0eb0bc4
v11.0.1-canary.4 2021-06-17 20:08:52 -05:00
Steven
c35b01a631
Omit svg static imports if custom webpack config is defined (#26281)
This PR does a couple things:

1. Omit svg static imports if the user has defined custom webpack config with svg rule
2. Change TS type to `any` for svg imports to avoid conflicts with other plugins

The idea is that some users want to use `next/image` with static imports for most image types but not for svg and instead inline those images with a plugin.

- Fixes #25950  
- Fixes #26130 
- Fixes #26176 
- Fixes #26196 
- Fixes #26067 


## Bug

- [x] Related issues linked using Fixes #26130 
- [x] Integration tests added
2021-06-18 00:40:22 +00:00
Gerald Monaco
14f01a1af2
Automatically use createRoot for React@>=18 (#26279)
Also logs a message when defaulting, and a warning when using a prerelease build of `react-dom` (e.g. the React 18 alpha) which are not officially supported.

Note: I've done this in `webpack-config.ts` instead of the Next.js config, as we don't actually want you to be able to opt-out *without* downgrading back to React 17, and so it ought to be entirely removed from the config eventually.
2021-06-17 23:59:28 +00:00
JJ Kasper
76f0b3585f
Update to latest TypeScript version and de-dupe versions (#26285)
* Update to latest TypeScript version and de-dupe versions

* Update version test
2021-06-17 17:43:25 -05:00
Taehun Jeong
51022d5819
Fix Show error when user put wrong values in width or height (#26166)
## Bug

- [x] Related issues linked using `fixes #26135 `
- [x] Integration tests added

fixes #26135

## 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 #26135 `
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-17 20:17:31 +00:00
neb
8a76cad98f
Fix closing tag in Script docs (#26276)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-17 18:13:21 +00:00
JJ Kasper
a403c4cf95
v11.0.1-canary.3 2021-06-17 12:44:11 -05:00
Michael McQuade
2a9e29f635
Correct Next.js 9 upgrade instructions (#26271)
The upgrade instructions from version 9 to version 10 still had the `@latest` tag. This PR changes it to use `@10`
2021-06-17 17:35:12 +00:00
Choi Sumin
ab4ac8ad5c
docs: remove duplicated --ts, --typescript from Options (#26252)
## Documentation / Examples
https://nextjs.org/docs/api-reference/create-next-app#options
In Options, `--ts, --typescript` is duplicated! so i removed it 😃

- [x] Make sure the linting passes
2021-06-17 17:28:58 +00:00
Shubhan Chemburkar
6fd207f5ce
Examples: Fixed the example path to correct value (#26255)
## Documentation / Examples

- [x] Make sure the linting passes

Changes in readme.md:

The path to the example in ```create-next-app``` command was incorrectly specified as ```api-routes``` by the example author. 
Fixed this value to ```api-routes-rate-limit``` as well as app name to ```api-routes-rate-limit-app``` make this consistent with other examples.

No other changes made to example.
2021-06-17 17:23:32 +00:00
Pavel Mineev
9785ba8eca
(examples/with-lingui): update example (#26076)
Fixes one of the items from #25854

## Documentation / Examples

- [x] Make sure the linting passes
- [x] Add the StackBlitz button
- [x] [Live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/with-lingui-update/examples/with-lingui)
2021-06-17 16:29:58 +00:00
JJ Kasper
ef379f1500
Ensure has query encoding is normalized (#25732)
* Ensure has query encoding is normalized

* fix type error
2021-06-17 10:52:11 -05:00
Levinson D'Souza
b3fad232bd
Updating Typescript to recommended minimum 4.3.2 (#26267)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-17 14:33:32 +00:00
Rishabh Poddar
4132b80735
Update with-supertokens example (#26266)
This PR updates the `package.json` dependency for `with-supertokens` example to use the latest version of our library.
2021-06-17 14:20:31 +00:00
Tim Neutkens
72743bcea8
Update next/script docs to clear up confusion around next/head and client-side JS (#26253) 2021-06-17 15:46:55 +02:00
Duc Le
4f3674cc37
Correct the word "remove" (#26258) 2021-06-17 13:47:02 +02:00
JJ Kasper
598b1ef11b
Fix long URLs causing 400s with dynamic routes/rewrites (#26221)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-17 10:59:46 +02:00
Tim
67aba8469e
Update postcss version in examples (#26226) 2021-06-17 10:37:17 +02:00
Vadorequest
75016716dc
Doc "no-sync-scripts" remove experimental notice (#26225)
It's not experimental anymore.




## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-17 08:19:26 +00:00
Pau Rodriguez Molina
58318a8545
Fix: upgrade react-test-renderer version to 17.0.2 (#26229)
npm i wasn't working because of outdated version of react-test-renderer.

## Bug

- [X] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [ X] Make sure the linting passes
2021-06-16 21:32:41 +00:00
arshad
3231c35354
Add cms-drupal example (#25198)
Adds cms-drupal example.

Demo: https://cms-drupal.vercel.app
2021-06-16 20:59:31 +00:00
Marco Valsecchi
22676abb31
Fix next/image noscript src path with loaders (#24011)
In the `noscript` img version the correct `src` and `sizes` attributes are overwritten by not necessary inline declaration; in particular using the loaders the `src` attribute not take the right absolute path. I found this issue using a custom loader and because my site didn't indexing any images on the Google image search.

Fixes #24277
2021-06-16 20:53:40 +00:00
JJ Kasper
2ac47d2193
v11.0.1-canary.2 2021-06-16 15:25:50 -05:00
Antoine Chalifour
70dffd444d
fix: use a client-side navigation when redirecting to a rewriten URL (#25990)
This PR is an attempt to fix #25943. The implementation is only a proposal and I'll be happy to take any feedback about it :)

Fixes: #25943

## Bug

- [X] Related issues linked using `fixes #number`
- [x] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-16 19:50:10 +00:00
JJ Kasper
8610ba4b5e
Fix eslint version check for older versions (#26212) 2021-06-16 14:16:01 -05:00
Tim Neutkens
947ee9dd93
Update note in script doc (#26214) 2021-06-16 21:14:46 +02:00
Tim Neutkens
2967fe1df3
Update docs on static image imports (#26211)
Incorporates some of the feedback we've had about this doc.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes
2021-06-16 18:46:01 +00:00
Jonathan Wilsson
82bad10a29
Fix babel-loader failing on JSON5 syntax (#26194)
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

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

## Documentation / Examples

- [ ] Make sure the linting passes

Fixes: https://github.com/vercel/next.js/issues/26163
2021-06-16 17:26:43 +00:00
Nick Babcock
5629223407
Update examples to use React 17 (#26133)
[With next 11 requiring react 17](https://nextjs.org/blog/next-11#upgrade-guide), most of the examples
need to be updated, so the following snippet updated all the examples to
a compatible react version.

```bash
cd examples/
fd -g 'package.json' | xargs sed -r -i 's/"react": ".*"/"react": "^17.0.2"/
fd -g 'package.json' | xargs sed -r -i 's/"react-dom": ".*"/"react-dom": "^17.0.2"/'

# exclude experimental react version
git checkout with-reason-relay/package.json
```
2021-06-16 16:43:26 +00:00
David Vaness
b0e09d28ed
docs: fix ignoring-eslint-url during build (#26165)
## Documentation
removes dot from docs link as the terminal appends the dot to the link, which leads to 404
2021-06-16 16:37:55 +00:00
JJ Kasper
3c65c34dc8
v11.0.1-canary.1 2021-06-16 11:07:06 -05:00