Commit graph

3609 commits

Author SHA1 Message Date
Tim Neutkens
77895fd0d0
Add logging when a custom babelrc is loaded (#26570)
Partially solves #26539 by adding back the log output when a config file is used



## 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-24 14:51:48 +00:00
JJ Kasper
ccf189fbe1
v11.0.2-canary.0 2021-06-23 19:35:20 -05:00
Steven
1c996d77fc
Allow user to override next-image-loader (#26548)
In PR #26281, we solved one use case but broke another.

This PR will allow the user to [override the built-in loader](https://github.com/vercel/next.js/pull/26281#issuecomment-866251944) via custom webpack config.
2021-06-23 22:56:18 +00:00
destruc7i0n
be62f023b6
Fix props not updating when changing the locale and keeping hash (#26205)
Currently, there is only a `hashChangeStart` and subsequent `hashChangeComplete` event and no props update (which would be used to get translations, etc.).
Happy for any feedback

fixes #23467

## 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-23 19:04:31 +00:00
Alex Castle
325b3a9651
Don't test image domains in test env (#26502)
fixes #21549

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-22 18:02:01 -05:00
JJ Kasper
e969d22699
v11.0.1 2021-06-22 14:51:49 -05:00
JJ Kasper
30ee9e71b7
v11.0.1-canary.8 2021-06-22 13:54:35 -05:00
JJ Kasper
84a99c58f4
Ensure image-types file is included (#26495) 2021-06-22 13:50:59 -05:00
Brandon Bayer
755a1b412c
Strongly type Router.events.on and Router.events.off (#26456)
This strongly types `Router.events.on` and `Router.events.off`. Previously the event type was `string` but now it's `'routeChangeStart' | 'beforeHistoryChange' | 'routeChangeComplete' | 'routeChangeError' | 'hashChangeStart' | 'hashChangeComplete'`


## Bug

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

Closes #25679
Closes #23753
Closes #15497
2021-06-22 18:43:09 +00:00
JJ Kasper
9fefd3cc1f
v11.0.1-canary.7 2021-06-22 13:00:23 -05:00
JJ Kasper
917a9acc2c
Update to only add image import types when enabled (#26485)
* Update to only add image import types when enabled

* add type check to test
2021-06-22 11:56:21 -05:00
Rob Vermeer
27d78a5d41
Fix domain locales not available on client (#26083)
* bug: Fix domain locales not available on client

* Add test case

* update tests

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-22 11:55:52 -05:00
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
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
94f7bfca99
v11.0.1-canary.5 2021-06-18 15:00:12 -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
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
JJ Kasper
a403c4cf95
v11.0.1-canary.3 2021-06-17 12:44:11 -05: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
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
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
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
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
JJ Kasper
da204bd463
v11.0.1-canary.0 2021-06-15 13:50:12 -05: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
JJ Kasper
7d339b6cd8
v10.2.4-canary.18 2021-06-15 09:24:31 -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
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
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
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
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
JJ Kasper
75fdad636e
v10.2.4-canary.15 2021-06-11 16:01:27 -05:00
JJ Kasper
6eb6e3028c
Fix Firefox image decode error (#26011)
* Fix Firefox image decode error

* Add next/image test to production suite

* update page count test
2021-06-11 12:58:29 -05:00
JJ Kasper
e7ba3eb659
v10.2.4-canary.14 2021-06-11 09:45:36 -05:00
JJ Kasper
1628e6d16c
Update client-side default error (#25997)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-06-11 16:23:45 +02:00
Brandon Chang
e261887926
Update comments for clarity & grammar in router.ts (#25947) 2021-06-11 11:51:52 +02:00
JJ Kasper
0402fc459e
Disable prerendering /500 when _error has getServerSideProps (#23586)
This prevents unexpected errors occurring from users leveraging `getServerSideProps` in `_error` with the new `/500` prerendering as we are currently only checking for a custom `getInitialProps` in `_error` since it opts out of the static optimization although `getServerSideProps` also opts out of the optimization. 

Fixes: https://github.com/vercel/next.js/issues/23541
Fixes: https://github.com/vercel/next.js/issues/23128
Fixes: https://github.com/vercel/next.js/issues/23541
Fixes: https://github.com/vercel/next.js/issues/24206

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
2021-06-11 09:29:40 +00:00
matamatanot
822797309f
Update json5 and remove @types/json5 (#25946)
## Refactor

https://github.com/json5/json5/blob/master/CHANGELOG.md#v220-code-diff
> New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

No diffs in the precompiled file.
2021-06-11 02:02:11 +00:00
JJ Kasper
e6da19266c
v10.2.4-canary.13 2021-06-10 17:48:46 -05:00
Steven
dca59bb34d
Fix delay between blur image and high res image (#25994)
Previously, we had an arbitrary delay of 1500ms but instead we can wait until decoding is complete.

Co-authored-by: Kristóf Poduszló <kripod@protonmail.com>
2021-06-10 17:45:54 -04:00
Steven
d8b59f3e46
Add errors for invalid placeholder=blur usage (#25953)
There are strict conditions for using `placeholder=blur` documented in #25949 but this will give the user a better understanding during `next dev` and links to the error.

- Error when `placeholder=blur` and no `blurDataURL`
- The Error for small images with `placeholder=blur` has been changed to a warning
- Added support for blurring a webp image
- Added error page linking to relevant docs
2021-06-10 18:51:35 +00:00
Houssein Djirdeh
436e74bb04
ESLint: More updates and bug fixes (#25952)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-10 11:02:50 +02:00
JJ Kasper
9f9a3eeb84
v10.2.4-canary.12 2021-06-09 14:18:01 -05:00
Steven
79b4cb007b
Add css blur when placeholder=blur (#25945)
* Add css blur when `placeholder=blur`

* Fix tests
2021-06-09 20:28:44 +02:00
Tim Neutkens
f5c5950f6b v10.2.4-canary.11 2021-06-09 19:39:43 +02:00
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
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
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
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
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
JJ Kasper
8c63d17c26
v10.2.4-canary.6 2021-06-07 19:02:46 -05: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
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
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
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
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
Steven
3ae27a87e3
Bump "engines" to node >= 12.0.0 (#25761)
* Bump "engines" to node >= 12.0.0

* Bump next-stats-action

* Rename azure groups
2021-06-03 17:21:16 -05:00
Tim Neutkens
9184fc9cf2 v10.2.4-canary.3 2021-06-03 14:20:37 +02:00
Houssein Djirdeh
bbc28ccae0
next lint + ESLint in Create Next App (#25064)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-06-03 14:01:24 +02:00
Janicklas Ralph
b05719f928
Remove experimental tag from Script component (#25435)
* Remove experimental tag from Script component

* update size tests

* Update size

* Update size limit

* Update basic output sizes

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-06-03 13:56:50 +02:00
JJ Kasper
5bbcc9e4f1
Disable split chunks in webpack 5 in dev mode (#25735)
## 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-03 11:42:02 +00:00
JJ Kasper
7456fcf30f
v10.2.4-canary.2 2021-06-02 11:05:37 -05:00
Tim Neutkens
ed3e8f7125
Remove deprecated features (#25446)
* Remove deprecated features

In the next major version we'll want to merge this PR that removes some of the long-time deprecated features, it'll have a positive effect on bundle size.

* Update tests

* Update tests

* Change unsized to layout=fill in test

* Update sizes

* Update rotation test

* Update size limit test

* Update test

* Update test

* Update test
2021-06-02 10:11:03 -05:00
Tim Neutkens
d27cbf00a9
Enable new babel mode (#25635) 2021-06-02 13:28:08 +02:00
Janicklas Ralph
58a4482f75
Font optimization add preconnect (#25346) 2021-06-02 11:43:03 +02:00
Tim Neutkens
1cb4aaa35b
Don't show webpack version message in production server (#25654)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-06-02 11:19:48 +02:00
Tim Neutkens
5a5f0d0035
Enable serial build by default (#25642) 2021-06-02 11:19:33 +02:00
Pepijn Senders
9c3780fbce
Fix rewrite and dynamic params on navigating to initial history entry (#25495)
* Fix rewrite and dynamic params

* set _shouldResolveHref to true when initializing client state

* add window.beforeNav check

* fix broken path

* fix build-output tests

* remove yarn.lock changes
2021-06-01 16:29:43 -05:00
JJ Kasper
5476827f19
Ensure rewrites are resolved correctly through history (#25666)
* Ensure rewrites are resolved correctly through history

* update test
2021-06-01 13:01:23 -05:00
JJ Kasper
d5c2fe616c
v10.2.4-canary.1 2021-06-01 12:08:31 -05:00
Tim Neutkens
9890565983
Add helpful error for link with multiple children (#25657)
Makes sure a helpful error is shown for `<Link>` with multiple children



## 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-05-31 19:41:57 +00:00
JJ Kasper
d84e2f58e7
Set default webpack publicPath value to override auto (#25452)
* Set default webpack publicPath value to override auto

* Add test case

* update size-test
2021-05-29 14:15:26 +02:00
JJ Kasper
b924207726
Update to latest webpack 5 and webpack-sources (#25558) 2021-05-29 14:14:43 +02:00
Gerald Monaco
bd589349d2
Assume a recent react@experimental if reactRoot is set (#25496) 2021-05-28 14:52:53 +02:00
JJ Kasper
8a06780481
Ensure providing only query on dynamic route works as expected (#25469) 2021-05-28 14:51:41 +02:00
JJ Kasper
5e92ae0183
Fix external check for non-local next import (#25518) 2021-05-28 13:17:08 +02:00
JJ Kasper
39181c4073
v10.2.4-canary.0 2021-05-27 23:25:39 -05:00
JJ Kasper
08dce4bdc6
Ensure history navigates correctly with dynamic routes + basePath (#25459)
This ensures the `basePath` is correctly re-added to the `url` after resolving a dynamic route since the `url` stored in history is expected to already contain the `basePath`, an additional test has been added to ensure this is working correctly back/forward through history

## Bug

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

Fixes: https://github.com/vercel/next.js/issues/25285
2021-05-26 07:58:05 +00:00
Gerrit Alex
3b9221ff10
fix(types): allow nonpromise return types for static functions (#24685)
## Bug

- [x] fixes #24684
- [x] Integration tests added

Intentionally omitted changing the types for `GetServerSideProps` etc. as its imo less reasonable to leverage SSR with a sync `getServerSideProps`. Can of course change the type too if you consider that also a valid case.
2021-05-25 10:35:21 +00:00
JJ Kasper
4f32a03ffa
v10.2.3 2021-05-24 14:20:31 -05:00
JJ Kasper
1745cf6566
v10.2.3-canary.1 2021-05-24 13:29:16 -05:00
JJ Kasper
38fa5ca226
Update beforeFiles rewrites to continue (#25418)
This updates beforeFiles rewrites to continue instead of matching a public file/page immediately after a match, this allows all beforeFiles routes to be checked before matching the filesystem.

## 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-05-24 17:59:55 +00:00
Tim Neutkens
c7596be786 v10.2.3-canary.0 2021-05-24 10:54:20 +02:00
JJ Kasper
a348407bcf
Ensure externals are correct for mini-css-extract-plugin (#25340)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-23 13:15:58 +02:00
Aleksander
48cbb81af0
Add missing i18n types in gip context (#25363)
## 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

- [] Make sure the linting passes

Ref: #21930
2021-05-22 16:35:57 +00:00
Tobias Koppers
7035a036ab
lazy load postcss plugins (#25317)
Improves startup performance

for vercel/front by ~1s
2021-05-21 00:31:45 +00:00
JJ Kasper
24c3929ec4
v10.2.2 2021-05-19 20:32:11 -05:00
JJ Kasper
2482520cc2
v10.2.2-canary.1 2021-05-19 17:56:06 -05:00
JJ Kasper
42a62f4c23
v10.2.2-canary.0 2021-05-19 15:58:06 -05:00
Vladik Tarasov
935a66de6d
react-loadable-plugin. Handle undefined opts.caller (#25264)
`caller` - in babel is optional field - https://babeljs.io/docs/en/options#caller

And it may be not provided by developer in transformFile

## 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-05-19 20:56:28 +00:00
Tobias Koppers
ccdcd3a64d
restore webpack defaults for managed/immutablePaths (#25250)
Due to bundling of webpack the default values can't be correctly detected
This restores the webpack defaults
2021-05-19 19:43:16 +00:00
Brad Cornes
ea1cdb2687
Update postcss-loader to 4.3.0 (#25197)
## 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.

This pull request upgrades `postcss-loader` from `4.0.3` to `4.3.0`. Version `4.3.0` [adds support](https://github.com/webpack-contrib/postcss-loader/pull/525) for the `dir-dependency` message type which PostCSS plugins can use to register directories as dependencies ([documentation](https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#31-use-messages-to-specify-dependencies)).
2021-05-19 19:14:46 +00:00
Tobias Koppers
96f9945ecb
server doesn't need to be contenthashing at all (#25251)
contenthashing is not useful for the server

cc @ijjk
2021-05-19 18:44:50 +00:00
JJ Kasper
9513572755
v10.2.1 2021-05-19 11:24:49 -05:00
JJ Kasper
7452567325
v10.2.1-canary.12 2021-05-19 10:50:08 -05:00
Janicklas Ralph
de42719619
Fix font optimization failing on some builds (#25071)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-19 12:05:12 +02:00
JJ Kasper
25096df801
v10.2.1-canary.11 2021-05-18 16:58:00 -05:00
Pepijn Senders
bd0448c365
Make next.config.js keys optional (#25204)
## Bug

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

## Description

These values should be optional and not required on the `NextConfig` type.
2021-05-18 21:49:50 +00:00
Ananta Bastola
5f30df2f06
docs(readme.md): add good first issue section to readme (#25085)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-05-18 16:10:01 -05:00
Jamie
fa5d41b346
fix: replace usage of fromEntries in browser bundled resolve-rewrites.ts (#25208)
## Bug

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

Fixes #25207

Currently rewritten routes that use a `has` condition throw an `Object.fromEntries is not a function` error in older browsers.

## Documentation / Examples

- [x] Make sure the linting passes

## Solution

As mentioned in issue #25207, looks like last year the team decided not to include the `fromEntries` polyfill https://github.com/vercel/next.js/pull/15772#discussion_r463957221.

As such, we should avoid using non-polyfilled methods in core next.js code bundled in the browser.

This PR's changes should result in the same object being returned, without using `fromEntries`.
2021-05-18 20:18:57 +00:00
JJ Kasper
ac7c8f3585
Ensure default params are detected after rewrite (#25205)
* Ensure default params are detected after rewrite

* Add test case

* bump
2021-05-18 14:24:22 -05:00
Ikko Ashimine
78b17351fb
Fix typo in dev-build-watcher.js (#25196)
transtion -> transition
2021-05-18 12:26:22 +02:00
JJ Kasper
218c6114c9
v10.2.1-canary.10 2021-05-17 15:25:08 -05:00
JJ Kasper
9c6d7bbd14
Ensure server split chunks are nested in chunks dir (#25203) 2021-05-17 15:24:23 -05:00
Tim Neutkens
d746db6f5c v10.2.1-canary.9 2021-05-17 14:16:14 +02:00
Tobias Koppers
3bf4ae3767
performance improvement of static generation (#25035)
### move all access to built pages into worker pool

to allow parallelizing and avoid loading the bundles in the main thread

This improves performance of the static check step a bit and helps reducing memory load in main thread

### enable splitChunks for server build in webpack 5

This improves performance for static generation by loading less code due to reduced duplication
2021-05-17 12:04:06 +00:00
JJ Kasper
a4420532b9
Update @hapi/accept to latest (#24283)
Updates to the latest version of `@hapi/accept`, opening this one instead of https://github.com/vercel/next.js/pull/23142 since it has unrelated changes and is stale. 

Close: https://github.com/vercel/next.js/pull/23142
Fixes #20488
2021-05-16 19:01:24 +00:00
Alexander Kachkaev
e5da204aab
Upgrade browserslist to 4.16.6 (#24692)
## Bug

- [x] Related issue: [CVE-2021-23364](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23364)
- ~Integration tests added~ (N/A)
2021-05-16 18:30:02 +00:00
JJ Kasper
68ecbddd14
Re-add strip-ansi babel include (#25146) 2021-05-16 14:05:58 +02:00
JJ Kasper
659dae0425
v10.2.1-canary.8 2021-05-14 15:41:49 -05:00
JJ Kasper
ec9ed57487
Remove import type syntax (#25145)
* Remove import type syntax

* Update build-output test
2021-05-14 13:42:36 -05:00
Tobias Koppers
84d5766f43
Disable suggesting incremental type checking (#25144)
It have performance characteristics that might not work for everyone.
You can still enable it manually.
2021-05-14 19:08:06 +02:00
Tim Neutkens
d9000d073b v10.2.1-canary.7 2021-05-14 16:41:54 +02:00
Tobias Koppers
0750092cf1
add experimental.gzipSize flag which allows to switch to uncompressed sizes (#25028)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-05-14 16:29:49 +02:00
Tim Neutkens
c1528e4f3d
Remove experimental-modern-preset option (#25100) 2021-05-14 15:55:24 +02:00
JJ Kasper
5bff9eac08
Ensure rewrites work with manual href/as correctly (#25112)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-14 12:50:41 +02:00
JJ Kasper
e6a05ee940
Fix export worker threads options (#25063)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-14 12:50:29 +02:00
Yamagishi Kazutoshi
7f73b65849
Escape href when detecting already existing preload tags (#20782)
When Image Optimization is enabled, if the URL of the image is not correct as a regular expression (e.g. `/image.png?lang=c++`), Next.js will give an error and fail to build.
2021-05-14 02:40:20 +00:00
Tim Neutkens
7cb00b841f
Remove leftover babel include regex (#25101)
This regex is no longer needed since it no longer matches with the strip-ansi version that is bundled with Next.js



## 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-05-13 17:14:29 +00:00
Tim Neutkens
7d75bc3ed1 v10.2.1-canary.6 2021-05-13 16:32:33 +02:00
JJ Kasper
40e178e611
Ensure rewrite does not override params from page in minimal mode (#25074)
This makes sure a catch-all rewrite doesn't override the params from a dynamic route in minimal mode, it also makes sure we don't attempt applying headers and rewrites un-necessarily in minimal mode. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
2021-05-13 11:40:25 +00:00
Janicklas Ralph
eaf74c1cb8
Improving script loading strategy (#24939) 2021-05-13 12:39:36 +02:00
Tobias Koppers
288984b1ea
enable contenthashing in webpack 5 (#25055)
This improves long term caching by avoiding hash changes

workaround fix #25013 
The real problem is fixed by #24573

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
2021-05-12 16:33:51 +00:00
Tobias Koppers
5f3351dbb8
use official mini-css-extract-plugin and experimentalUseImportModule (#24573)
## 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-05-12 16:04:01 +00:00
JJ Kasper
9a0fc42d56
Fix ie11 support with webpack 5 (#25014)
This fixes ie11 compatibility that broke in https://github.com/vercel/next.js/pull/24656 from the polyfills not being loaded first, our existing ie11 test caught this but was failing, this ensures the test is passing again. This also updates the `hrefValue` optional chaining in the eslint plugin as these files aren't transpiled and related tests were failing in azure 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
2021-05-12 12:24:42 +00:00
Janicklas Ralph
6ad9172295
Font optimization bug fix (#24968) 2021-05-12 13:39:26 +02:00
Janicklas Ralph
b859c5bdf5
Refactor scriptloader option names (#25012) 2021-05-12 13:37:57 +02:00
Tobias Koppers
614f105b0f
allow incremental type checking to use caching (#24992)
emit must be called on build program to leverage caching

While the the current way of calling incremental typescript seem to work, it actually doesn't use caching correct. A difference is only notice-able on larger code bases...
2021-05-11 15:18:31 +00:00
Tim Neutkens
30462ebf2c v10.2.1-canary.5 2021-05-11 09:24:55 +02:00
JJ Kasper
e00e3c978d
Ensure webpack cache is invalidated for alias change (#24956) 2021-05-10 17:29:33 -05:00
Tobias Koppers
2330bf9ddd
update webpack to 5.37.0 (#24954)
fixes a small bug which caused the webpack chunk to be too big as it includes references to all pages

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

- [ ] Make sure the linting passes
2021-05-10 17:18:44 +00:00
Tim Neutkens
da97a18daf v10.2.1-canary.4 2021-05-10 14:43:02 +02:00
Luigi Colombi
59564af9cb
I18n context initial props (#21930)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-10 14:11:19 +02:00
Darsh Patel
9e87596bd6
Fix: Non-writable pages/_app breaks build (#24849)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-10 10:39:18 +02:00
Janicklas Ralph
86827058e4
Refactor experimental-script component (#24940) 2021-05-10 10:39:08 +02:00
Tim Neutkens
8218d5d508 v10.2.1-canary.3 2021-05-07 19:40:20 +02:00
Radosław Grochowski
7f1c8a9bbe
fix: handle compression for custom-server render calls (#16378) (#18891)
Co-authored-by: Radosław Grochowski <radoslaw.grochowski@grupawp.pl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-05-07 19:37:51 +02:00
JJ Kasper
9d25194e7d
Ensure next/dynamic transpiles for tests (#24751)
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2021-05-07 19:21:54 +02:00
Tobias Koppers
4e8fac93fd
cache typechecking with incremental compilation (#24559)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-07 19:21:20 +02:00
Tim Neutkens
42c4743fbd
Remove experimental babel flag (#24776) 2021-05-07 19:17:45 +02:00
Tobias Koppers
33e09dffb2
webpack 5 externals fixes (#24603)
* fix check in externals that validate if the require is resolve-able for the server
* performance improvements

Fixes #23130

## 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.
- [x] Related issues linked using `fixes #number`
- [x] 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-05-07 16:32:33 +00:00
Sebastian Silbermann
7c7e86454e
feat(build): Log whether type checking is actually performed (#24440)
Closes https://github.com/vercel/next.js/issues/24889

## Feature

Currently `next build` is logging "Checking validity of types" even if `typescript.ignoreBuildErrors` is `true`. It seems like these options still work so `next build` either shouldn't log anything related to type-checking or log that type-checking is skipped.

I decided to branch the log message for clarity.

Happy to add a test but I'm not sure if you have existing infra considering https://github.com/vercel/next.js/pull/23226/files (which added the message) didn't add or change tests either.

CI failures look unrelated to me.
2021-05-07 14:34:15 +00:00
JJ Kasper
802af5ff5b
Land - Font optimizations - Adobe Fonts / Typekit support (#24834)
This updates this initial PR here https://github.com/vercel/next.js/pull/18146 to resolve merge conflicts and updates tests since we aren't able to update that PR itself.

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

Closes: https://github.com/vercel/next.js/pull/18146
2021-05-06 04:02:07 +00:00
Vitaly Baev
54ff3223b4
Don't throw 500 error when Content-type is invalid (#24818)
Fixes #24768

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
2021-05-05 14:27:44 +00:00
Tobias Koppers
83395c92ec
fix memory leak in require.cache (#24282)
Previously only the top-level page would be cleared from the require cache, with this change it also clears `module.parent` and `modules.children`.
2021-05-05 09:26:36 +00:00
Tobias Koppers
3a78ccd43f
Add type checking events (#24595)
Will send events like this:

```
[telemetry] {
  "eventName": "NEXT_TYPE_CHECK_COMPLETED",
  "payload": {
    "durationInSeconds": 2,
    "typescriptVersion": "3.8.3",
    "inputFilesCount": 16,
    "totalFilesCount": 289,
    "incremental": false
  }
}
```

## 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-05-04 08:41:01 +00:00
Tobias Koppers
1d643eb6e1
update webpack to 5.36.2, use dependOn (#24656)
* update webpack to 5.36.2
* use dependOn to optimize chunks
* disable vendor splitting for main and _app chunks

=> decreases bundle size in general, gets rid of the 2 extra vendor chunks shared by all pages.

## 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-05-03 10:25:44 +00:00
JJ Kasper
9c47ca2cfd
v10.2.1-canary.2 2021-04-30 13:27:54 -05:00
Joon Park
c76170e829
Add experimental blurry placeholder to image component (#24153)
This is the image component implementation of the blurry placeholder as described in #24004. The matching server side implementation is currently planned.

## 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 issue #18858 
- [x] Integration tests added

(Documentation and telemetry to follow after server side is implemented)
2021-04-30 17:05:03 +00:00
Ishank Sharma
9bbb968c43
Fix/link router 24075 take asPath instead of pathName in router (#24199)
Fixes: #24075

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


## Documentation / Examples

- [x] Make sure the linting passes
2021-04-30 16:34:23 +00:00
Pepijn Senders
d5de1c53c1
Don't swallow MODULE_NOT_FOUND error (#24577)
## Bug

- [x] Related issues linked using [`fixes #24328`](https://github.com/vercel/next.js/pull/24328#issuecomment-828847472)
- [ ] Integration tests added

The change in #24328 will swallow any `MODULE_NOT_FOUND` errors triggered in the page. If you for example have a page with a broken import, it will tell you `Error: Failed to load /whatever`. This of course doesn't really tell people what is going on internally (a broken import). I added a check to see if the error actually happened in the page.
2021-04-30 15:45:25 +00:00
Houssein Djirdeh
e783b0a2e8
Adds ESLint with default rule-set (#23702)
This PR re-includes ESLint with some notable changes, namely a guided setup similar to how TypeScript is instantiated in a Next.js application.

To add ESLint to a project, developers will have to create an `.eslintrc` file in the root of their project or add an empty `eslintConfig` object to their `package.json` file.

```js
touch .eslintrc
```

Then running `next build` will show instructions to install the required packages needed:

<img width="862" alt="Screen Shot 2021-04-19 at 7 38 27 PM" src="https://user-images.githubusercontent.com/12476932/115316182-dfd51b00-a146-11eb-830c-90bad20ed151.png">

Once installed and `next build` is run again, `.eslintrc` will be automatically configured to include the default config:

```json
{
  "extends": "next"
}
```

In addition to this change:

- The feature is now under the experimental flag and requires opt-in. After testing and feedback, it will be switched to the top-level namespace and turned on by default.
- A new ESLint shareable configuration package is included that can be extended in any application with `{ extends: 'next' }`
  - This default config extends recommended rule sets from [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks), and [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next)
- All rules in [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next) have been modified to include actionable links that show more information to help resolve each issue
2021-04-30 11:09:07 +00:00
JJ Kasper
49cd08da17
v10.2.1-canary.1 2021-04-29 19:52:43 -05:00
JJ Kasper
01c15c5150
Remove un-used lib files (#24625) 2021-04-29 19:48:39 -05:00
JJ Kasper
f9faf3f96a
v10.2.1-canary.0 2021-04-29 12:55:54 -05:00
JJ Kasper
1e441fe440
Replace regex lexer with minimal regex for named groups (#24604) 2021-04-29 12:50:06 -05:00
Shu Ding
89d2c4e198
Fix Image compatibility issue when using sizes (#24569)
When using `sizes`, [`matchAll`](https://caniuse.com/mdn-javascript_builtins_string_matchall) isn't supported by older browsers like IE and Safari 12. This PR changes it to `exec`.

There're already tests of `sizes` with multiple `vw` values covered.

Fixes #23677.

## 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.
- [x] 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-04-29 10:07:27 +00:00
Sumanth Ratna
a35dedb7d3
Remove unnecessary optimizeFonts key from type (#24563)
https://github.com/vercel/next.js/pull/21676 moved `fontOptimization` out of the experimental key of `NextConfig` to the top level, so it should be removed from the type

## 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-04-28 22:47:31 +00:00
JJ Kasper
6b97bcea5b
v10.2.0 2021-04-28 09:32:18 -05:00
JJ Kasper
0abbb75b29
v10.1.4-canary.18 2021-04-28 08:58:39 -05:00
Tim Neutkens
b26077bd25
Upgrade postcss (#24546)
Fixes #24421



## Bug

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

Can't add an integration test currently, we'll add Node 16 tests later.

## 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-04-28 13:16:41 +00:00
Tim Neutkens
53c19ff185
Test fixes for Babel mode (#24312)
* Try enabling Babel turbo mode

* Pass config file explicitly to babel turbo loader.

* Update NextBabelLoaderOptions to use `configFile` instead of `babelrc`.

* Re-add support for options passed to next/babel preset with new babel loader.

* Load babel config files depending on their file extension.

* Include `next/babel` if no Babel config is provided.

* Minor cleanup.

* Avoid duplicate `next/babel` entries.

* No need to pass configFile anymore.

* Fix multiple small issues in merging loader opts with cached config.

* Remove redundant logging (that also breaks a test).

* Include file extension CharacteristicsGermaneToCaching.

* bump

* Disable turboMode now that tests pass

Co-authored-by: Dale Bustad <dale@divmain.com>
2021-04-28 11:51:57 +02:00
JJ Kasper
f3d518385c
Remove experimental note for has routes (#24529)
This removes the warnings/notes for the `has` custom-routes feature being experimental

## Documentation / Examples

- [x] Make sure the linting passes
2021-04-28 09:08:38 +00:00
JJ Kasper
0f2bd4f252
v10.1.4-canary.17 2021-04-27 12:02:08 -05:00
JJ Kasper
efa58efd0c
Ensure stalled CSS triggers fallback navigation (#24488)
This ensures when CSS requests stall that they are included in the route load timeout so that stalled CSS requests don't block us from falling back to a hard navigation. This handles a rare case noticed by @pacocoursey where a transition did not complete while attempting to load CSS assets. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
2021-04-27 07:49:28 +00:00
Janicklas Ralph
fff183c4cd
Font optimization bug fix (#24162)
## Bug

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

Fixes #23896
2021-04-26 18:30:21 +00:00
JJ Kasper
cac9ccf9ce
Ensure proxy rewrite does not hang on error (#24394)
* Ensure proxy rewrite does not hang on error

* remove logs

* Listen to req close
2021-04-26 08:40:32 -05:00
Tim Neutkens
cf4ba8d705
Upgrade eslint to the latest version (#24377)
## 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-04-25 18:34:36 +00:00