Commit graph

8678 commits

Author SHA1 Message Date
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
Janicklas Ralph
353bfaa0f7
Script component docs (#25471)
* Script component docs

* Update docs with examples and feedback changes

* Fix typo

* Add example

* Update text

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-15 09:20:29 -05:00
JJ Kasper
9f4c02e138
Update to latest version of webpack 5 (#26102)
This updates to the latest version of webpack 5 which includes a fix waiting on certain webpack assets

## 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-15 07:59:41 +00:00
JJ Kasper
d19935c302
v10.2.4-canary.17 2021-06-14 20:39:08 -05:00
JJ Kasper
5a78f59aeb
Add lint checking events (#26089)
* Add lint checking events

* remove extra log

* Update check

* Update version check
2021-06-14 20:31:40 -05:00
Joe Cohen
86ab7531b2
Update learn path in getting started and from cra docs (#26104)
This PR updates the Learn path in the getting started and from Create React App docs. 

## 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-15 00:49:35 +00:00
Houssein Djirdeh
ef97d9b73e
adds section to docs for migrating existing eslint configurations (#26101) 2021-06-14 18:15:12 -05:00
Vitaly Baev
66cb786df0
fix: don't create .eslintrc if package.json contains eslintConfig (#26025)
* fix: don't create .eslintrc if package.json contains eslintConfig

* tests: added integration tests for next lint

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-14 15:57:18 -05:00
Gerald Monaco
775c7be517
Update react-version.md (#26093)
Forgot to update this in a previous PR.
2021-06-14 20:24:36 +00:00
Gerald Monaco
1f09a78eba
Fix react@next and react@experimental tests (#26088) 2021-06-14 14:40:15 -05:00
Gerald Monaco
1ebf26af78
Remove React version checks and warnings that are no longer needed (#25992)
Canary requires `react@>=17.0.2`, so we no longer need these checks.
2021-06-14 19:34:53 +00:00
JJ Kasper
6f4d46aa2a
Update safari preload test (#26086) 2021-06-14 13:46:35 -05:00
Tim Neutkens
de08b1fff1
Remove unsupported examples (#26075)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-14 20:27:06 +02:00
Pavel Mineev
8fd5d92721
(examples/with-rbx-bulma-pro): update deps (#26077)
Fixes one of the items from #25854

## Documentation / Examples

- [x] Make sure the linting passes
- [x] Add the StackBlitz button
2021-06-14 17:28:23 +00:00
Pavel Mineev
2bffb16016
(examples): fix missed peer dependencies (#26069)
Fixes some examples from #25854

- with-kea [live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/missed-peer-deps/examples/with-kea)
- with-mobx [live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/missed-peer-deps/examples/with-mobx)
- with-mobx-react-lite [live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/missed-peer-deps/examples/with-mobx-react-lite)
- with-mobx-state-tree [live demo](https://stackblitz.com/github/akellbl4/next.js/tree/examples/missed-peer-deps/examples/with-mobx-state-tree)

## Documentation / Examples

- [x] Add the StackBlitz button
- [x] Make sure the linting passes
2021-06-14 17:17:23 +00:00
Tim Neutkens
cb84bc5daf
Remove deprecated features and enable future flag (#26066)
- Enables excludeDefaultMomentLocales by default
- Adds distDir cleaning (See RFC #6009)
- Adds support for `PORT`
- Removes `router.events` from the server-side router as it should not be used server-side (long-standing todo that is potentially breaking). Note that it's still available as `Router.events` (import Router from 'next/router') and with `useRouter` in `useEffect`. Using it with `useEffect` is the correct way and I've updated the upgrading guide to reflect that
- Added webpack 5 to the upgrading guide
- Removed `Head.rewind` as it's been a no-op since Next.js 9.5 and can now be safely removed from user code

Fixes #11408 
Fixes #10338
Fixes #5554



## Bug

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

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [x] Related issues linked using `fixes #number`
- [x] 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-14 14:20:34 +00:00
Pavel Mineev
f18ce55d8a
(example/with-typescript-grapql): fix deps (#26010)
### Documentation / Examples

Fixed one of the items from #25854

- [x] add `@graphql-codegen/import-types-preset`
- [x] remove depriceated field `schemaEntrypoint`
- [x] add the StackBlitz button
- [x] Make sure the linting passes

[Live demo on StackBlitz](https://stackblitz.com/github/akellbl4/next.js/tree/example/with-typescript-graphql/fix-deps/examples/with-typescript-graphql)
2021-06-13 16:40:28 +00:00
D. Kasi Pavan Kumar
2477b13799
examples/with-mongodb: avoid destructuring of environment variables. (#26029)
Greetings.

As per the [documentation](https://nextjs.org/docs/basic-features/environment-variables), we should not treat process.env as a Javscript Object & cannot destructure variables out of it. This PR avoid destructuring of environment variables in the `with-mongodb` example.



## 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-13 16:27:04 +00:00
Pierre de la Martinière
8afdaa3c04
Update next-transpile-modules to 7.3.0 across examples (#26040)
## Documentation / Examples

- [x] Make sure the linting passes

Just updated `next-transpile-modules` across examples. We shipped a workaround in 7.2 for the one breaking change that scared people from updating from v4 to v5+, I tested the updated examples, so we should be good.
2021-06-13 16:21:38 +00:00
Tim Neutkens
3b8c2afbfe v10.2.4-canary.16 2021-06-12 13:36:41 +02:00
Janicklas Ralph
66d1d53a3e
Enable optimized loading strategy (#26021)
Enable optimized Loading strategy by default
2021-06-12 11:26:47 +00:00
Vitaly Baev
fb5418ea32
(examples/with-react-md): switch from node-sass to sass (#26001)
## Documentation / Examples

- [x] Make sure the linting passes

Continuing fixing #25854
Switching from `node-sass` to `sass`
2021-06-11 22:58:00 +00:00
JJ Kasper
75fdad636e
v10.2.4-canary.15 2021-06-11 16:01:27 -05:00
JJ Kasper
713e92e838
Update preload test for safari (#26020) 2021-06-11 15:28:42 -05:00