Commit graph

8500 commits

Author SHA1 Message Date
Tobias Koppers
00c00f2fca
add global callback for refresh latency (#25944)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-09 19:35:57 +02:00
Tim Neutkens
a008d01c09 v10.2.4-canary.10 2021-06-09 16:52:25 +02:00
JJ Kasper
dde9ad46ad
Add experimental cra-to-next transform in codemod cli (#24969)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-09 16:51:56 +02:00
Dominic Elm
7530865e45
docs(examples/with-mobx-state-tree-typescript): add 'Open in StackBlitz' button (#25926)
Add `Open in StackBlitz` button to `examples/with-mobx-state-tree-typescript` now that it was fixed in #25589.

## 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
- [x] Example(s) updated
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-09 14:03:33 +00:00
Alex Castle
d6105c9502
Add delay to placeholder removal (#25916)
* Add delay to placeholder removal

* Increase jest timeout for image tests

* Use check instead of immediately expecting the result

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-06-09 15:35:52 +02:00
matamatanot
f443b694b4
Remove @types/comment-json (#25810) 2021-06-09 13:58:52 +02:00
matamatanot
3821662eb7
Replace CLIEngine with ESLint (#25801)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-09 13:54:10 +02:00
Pavel Mineev
3815222238
fix: use key while rendering arrays (#25902)
Fixes one of the items that was mentioned in #25854.

It fixes warning from React in `with-react-multi-carousel`.
2021-06-09 02:30:04 +00:00
Pavel Mineev
bb973be201
fix: move viewport meta tag to head in _app.js (#25901)
Fixes one of the items that was mentioned in  #25854. 
It fixes the warning in `with-next-page-transitions` by moving the viewport tag to `_app.js` from `_document.js`
2021-06-09 02:25:04 +00:00
Houssein Djirdeh
90c64435dd
ESLint: Updates disable ESLint message during builds (#25917)
Fix per review comment on [#25895](https://github.com/vercel/next.js/pull/25895#discussion_r647736514)
2021-06-09 01:25:06 +00:00
JJ Kasper
ce4e1afba4
v10.2.4-canary.9 2021-06-08 18:31:21 -05:00
Steven
a79eb4fd51
Fix immutable header on static image (#25914)
This PR fixes a bug where the first request has the correct immutable header but subsequent requests do not.

Depends on #25909
2021-06-08 23:17:54 +00:00
Houssein Djirdeh
50a36eecd3
ESLint Updates (#25895)
* lots of eslint updates

* adds eslint: dirs flag to next.config.js

* update lint command in docs

* update per review comments

* re-add --no-lint command for build

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-08 17:46:00 -05:00
Steven
7b77415f3c
Refactor image optimizer static immutable header (#25909)
Previously we were accepting a `s=1` query string parameter for static imports, but this is not necessary.

Instead, this PR looks at the file path to determine if the header should be `immutable`.

The nice thing here is we don't need to worry about someone trying `s=1` with an external image or 3rd party loader. In that case, we use the upstream `Cache-Control` header as usual.

This change also ensures we don't add the `immutable` header for `next dev`.

Related to PR #24993
2021-06-08 22:05:02 +00:00
Tim Neutkens
c8624091b9
Improve check for eslint version (#25910)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-08 16:29:34 -05:00
Dominic Elm
d2caaeab64
docs: add 'Open in StackBlitz' buttons to various examples (#25853)
This PR adds a `Preview` section and a `Open in StackBlitz` button to various examples. I have tested all examples and omitted the ones that require third party API keys, or didn't work. Some examples don't work locally either.

Here's an example:
![image](https://user-images.githubusercontent.com/12571019/121027783-88971280-c7a7-11eb-851a-0ad30cf74b42.png)

## 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
- [x] Examples updated
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-08 20:45:02 +00:00
Tim Neutkens
3f2379a9ff v10.2.4-canary.8 2021-06-08 20:19:34 +02:00
Alex Castle
ab450aaa1e
Adjust JPEG quality when generating placeholder (#25904)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-08 19:57:24 +02:00
Andrew Turner
535a83dbb8
remove opentelemetry/api (#25900) 2021-06-08 19:01:03 +02:00
Chris Neven
d820542a15
fix(21606): consider scroll option when using shallow routing (#24888)
## Bug

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

fixes [#21606](https://github.com/vercel/next.js/issues/21606)

### Description
When using shallow routing and wanting to scroll to top by setting the `scroll` option to `true` it didn't work. This PR fixes this issue.
2021-06-08 16:48:15 +00:00
Vincent Voyer
5072518875
docs(examples/with-iron-session): fix mutate + fetch, add TypeScript example link (#25889)
This updates the with-iron-session example with:
- updated way to mutate + fetch (re: https://github.com/vvo/next-iron-session/issues/329)
- updated readme to include TypeScript example link

Requirements:
- [x] Make sure the linting passes
2021-06-08 15:21:14 +00:00
matamatanot
ca2921fca3
Update CNA build target in tsconfig (#25780) 2021-06-08 09:32:29 +02:00
JJ Kasper
18f8198954
Prevent node inspect from causing webpack check to fail (#25876) 2021-06-08 09:23:08 +02:00
JJ Kasper
583b5b9d2d
Add warning for older TypeScript versions (#25867) 2021-06-08 09:21:09 +02:00
Tim Neutkens
23ca042c75 v10.2.4-canary.7 2021-06-08 09:10:26 +02:00
Yamagishi Kazutoshi
0a1d418a96
Do not remove placeholder for data URL (#24704) 2021-06-08 09:03:39 +02:00
Yuki Takemoto
3b76d3371a
Fix command in upgrade guide (#25879)
This PR fixed command in upgrade guide.
2021-06-08 02:31:58 +00:00
JJ Kasper
8c63d17c26
v10.2.4-canary.6 2021-06-07 19:02:46 -05:00
Vitaly Baev
ff1b8e9605
fix: added typescript dependency in next-sitemap example (#25866)
As mentioned in #25854 `witn-next-sitemap` example is missing `typescript` package as a dependency

- [x] Make sure the linting passes
2021-06-07 23:46:51 +00:00
Yamagishi Kazutoshi
d22be5efbe
Fix types for static image (#25808)
If you give a Static Image to the Image component, TypeScript will throw a type error. This Pull Request fixes it.

## Bug

- ~~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~~

---

follow-up #24993
cc @atcastle
2021-06-07 23:27:54 +00:00
Munawwar
5d208e94cc
updated example for zustand v3.5.1 interface change (#25066)
createContext() no longer accepts initialState as parameter

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-07 21:37:12 +00:00
Geshan Manandhar
b1b3b75774
Add run on Google Cloud Run button to the docker example (#25824)
## Documentation / Examples

- [x] Make sure the linting passes


### Deployed with Cloud Run Button

<img width="1075" alt="Screen Shot 2021-06-06 at 10 22 51 pm" src="https://user-images.githubusercontent.com/170554/120924210-d7946780-c715-11eb-889e-79679f795c54.png">

### Next.js working on Google Cloud Run

<img width="982" alt="Screen Shot 2021-06-06 at 10 23 10 pm" src="https://user-images.githubusercontent.com/170554/120924229-e418c000-c715-11eb-9aca-569923f7306d.png">
2021-06-07 21:32:04 +00:00
Tim Neutkens
e1502bc9a5
Enable webpack5 for all apps (#25639)
* Enable webpack 5 by default for all apps

Still provides a way to opt-out using `webpack5: false` in next.config.js. Also throws an error for `future.webpack5`.

* Update tests

* Update test to run on webpack 4 instead of webpack 5

* disable webpack5 for legacy tests

* Fix stats-config for webpack4

* update tests

* update size for webpack4 test

* move basic suite first

* update basic test

* Add logs

* remove outdated testFutureDependencies job

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-07 15:48:29 -05:00
JJ Kasper
069f7e82d6
Run acceptance tests non-concurrently (#25861) 2021-06-07 20:57:15 +02:00
Matt Gleich
7d02abc7ce
feat: have .tsx be in ts template for create-next-app (#25820)
Signed-off-by: Matthew Gleich <git@mattglei.ch>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-06-07 18:22:55 +02:00
Tim Neutkens
5d99c09985
Fix "env" key in babelrc with new Babel mode (#25841)
Fixes an issue where "env" would be ignored and would crash if there was no top level "presets". Also found that webpack did not invalidate the cache on changes to the babel config, so I also fixed that.
2021-06-07 18:21:49 +02:00
JJ Kasper
7038b623e0
Fix occasional test failures (#25855) 2021-06-07 18:17:55 +02:00
Tim Neutkens
5be354ede6
Add note to upgrading guide about React version (#25849)
Co-authored-by: Gerald Monaco <gbmonaco@google.com>
2021-06-07 17:46:32 +02:00
Tim Neutkens
4df4a25564 v10.2.4-canary.5 2021-06-07 14:49:03 +02:00
Alex Castle
62a4de9f8c
Remove feature flags for static image and blurry placeholder (#25797)
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-07 14:43:14 +02:00
Gerald Monaco
a09425f66a
Bump minimum React version to ^17.0.2 (#25788) 2021-06-07 13:11:50 +02:00
Abdullah Mzaien
f9fc8bcc59
Adding --typescript option (#25831)
## 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-07 10:58:48 +00:00
Houssein Djirdeh
8ae12db1e3
ESLint Plugin: Fix Document and Head import rules (#25730) 2021-06-07 12:40:28 +02:00
Lucas Vieira
58796411a4
feat: bump styled-components version on examples (#25826)
Hey guys! 
Some time ago I used the `with-grommet` example to start a project and I ran into some issues because of the styled-components version. I tried to use some new features and it didn't work as I expected, then I noticed the styled-component version was the `v4`. When I bumped the version it started to work. I am bumping all the styled-components versions on examples because some people may run into the same issue.

## 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-06 19:59:07 +00:00
Patrick El-Hage
b7cd0a15aa
fix mobx-state-tree-typesript missing babel/core dependency (#25589)
## What
![Screen Shot 2021-05-29 at 12 23 37 PM](https://user-images.githubusercontent.com/4411839/120082909-7d8f0480-c07a-11eb-8d77-f9d8769cfefc.png)
![Screen Shot 2021-05-29 at 12 24 46 PM](https://user-images.githubusercontent.com/4411839/120082913-81228b80-c07a-11eb-86c2-24f12811cd24.png)



## Bug

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

## Feature

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

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-05 18:49:40 +00:00
Lee Robinson
5d38d065ec
Update ESLint docs. (#25816)
Some slight tweaks based on my review of the docs. A few outstanding questions left 😄 

https://github.com/vercel/next.js/pull/25064#pullrequestreview-676799292
2021-06-05 18:34:28 +00:00
Lee Robinson
56794c758e
Remove react-relay-network-modern example. (#25815)
It appears this library isn't maintained, plus there's already the other `with-relay-modern` example. 

https://github.com/relay-tools/react-relay-network-modern/issues/128
2021-06-05 18:26:41 +00:00
matamatanot
c922c6a3f4
Replace 'require' with 'import' in bench files and update dependancies (#25775)
## Feature

- [ ] Telemetry added. In case of a feature if it's used or not.

### Replace 'require' with 'import' in bench files
Node.js 12 allows you to use `import`.

### Update dependancies
https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md#breaking-changes

> Require Node.js v12+

For #25761, Node.js 12 is required. Therefore, there is no problem updating it. For benchmarking purposes, it would be reasonable to update to the latest version.
2021-06-04 14:30:52 +00:00
Tim Neutkens
dfc5907f10 v10.2.4-canary.4 2021-06-04 12:13:54 +02:00
Alex Castle
9b295f5a26
Support for static image imports (#24993)
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-06-04 10:06:00 +02:00