Commit graph

8551 commits

Author SHA1 Message Date
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
toyamarinyon
fac02d8544
Follow the breaking change of jest-config (#26082)
## Documentation / Examples

When I create a new application using Next.js and use `jest` or `react-testing-library`, I get the following error.
```
The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
    Consider using the "jsdom" test environment.
    
    ReferenceError: document is not defined
```
This is because `jest-config` changed the default testing environment to node in 27.0.
> `jest-config@27.0.0` default to Node testing environment instead of browser (JSDOM) (#9874)


Raised the jest version of `with-typescript-eslint-jest` to 27.0 to make it pass the test.

- [x] Make sure the linting passes
2021-06-16 15:51:58 +00:00
Cauan Cabral
722d08ee13
[examples/cms-wordpress] fix typo on alert message (#26115) 2021-06-16 10:31:50 -05:00
Steven
a3c31b6773
Update next/image docs and example with shimmer animation (#26183)
It was mentioned in Issue #18858 that we might add a `placeholder="skeleton"` but that didn't ship with Next.js 11 because it would likely need to handle additional config such as light mode / dark mode, speed, duration, etc.

So this PR adds an example of `blurDataURL` usage with a nice shimmer animation (sometimes called a skeleton).
2021-06-16 14:54:25 +00:00
Steven
4c5e9eb26a
Fix next/image docs version history (#26192)
Fixes version history in the `next/image` component [docs](
https://nextjs.org/docs/api-reference/next/image).

- [before.png](https://user-images.githubusercontent.com/229881/122237698-8874d200-ce8d-11eb-8b6b-6dad8ebfd13b.png)
- [after.png](https://user-images.githubusercontent.com/229881/122237708-8ad72c00-ce8d-11eb-891b-31f87847113c.png)
2021-06-16 14:48:42 +00:00
Casper
51f392013d
fix(examples): future.webpack5 -> top level webpack5 (#26175)
## Documentation / Examples

- [x] Make sure the linting passes
2021-06-16 12:07:15 +00:00
Riley Shea
70242cf4ed
Fix failing Runner import (#26172)
Bad casing causing failed import
2021-06-16 14:01:48 +02:00
Wiktoria Mielcarek
7c8b504252
add missing step of installing next@latest (#26141)
- Step for installing the latest next version was missing
- Turned "Upgrade React version to latest" to an h3 heading



## 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
- [x] 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 11:42:12 +00:00
Lachlan Campbell
5ec2f981bc
docs(next/script): Improve formatting of docs (#26149)
Noticed a few things off in the Script docs—for example, the "before" variant should show using a non-React Component `<script>` tag, & the capitalization was inconsistent in a few places.

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-16 07:07:56 +00:00
Ivan Kalinin
c851da25f4
Fixed no-img-element documentation snippet. (#26154)
Module "next/image" has no exported member 'Image'.
It must be `import Image from "next/image"`
2021-06-16 08:57:45 +02:00
Steven
e4eed61a31
Update next/image docs and examples (#26150)
This updates the `next/image` docs and examples to add missing information.
2021-06-16 01:26:53 +00:00
JJ Kasper
da204bd463
v11.0.1-canary.0 2021-06-15 13:50:12 -05:00
Herman Nygaard
12d2424e86
(examples/image-component): fix placeholder href (#26140) 2021-06-15 13:37:11 -05:00
JJ Kasper
225b784393
Ensure all errors are added in manifest (#26129)
* Ensure all errors are added in manifest

* Add script doc to manifest
2021-06-15 13:36:25 -05:00
Herman Nygaard
6bd68bdb9f
docs(image): fix image import path (#26142) 2021-06-15 18:32:46 +00:00
JJ Kasper
0ca24563be
v11.0.0 2021-06-15 09:51:13 -05:00
JJ Kasper
47b96d8ae5
v10.2.4-canary.19 2021-06-15 09:42:16 -05:00
Alex Castle
8873374963
Update image documentation for static image (#25949)
* Update image documentation for static image

Adds documentation for static image and blurry placeholder functionality

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

Co-authored-by: Steven <steven@ceriously.com>

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

Co-authored-by: Steven <steven@ceriously.com>

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

Co-authored-by: Steven <steven@ceriously.com>

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

Co-authored-by: Steven <steven@ceriously.com>

* Version history and placeholder revisions

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* lint-fix

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-15 09:40:37 -05:00
JJ Kasper
7d339b6cd8
v10.2.4-canary.18 2021-06-15 09:24:31 -05:00