Commit graph

7185 commits

Author SHA1 Message Date
Joe Haddad
5c97b97755
Add default tags for issue templates (#18627) 2020-11-01 11:56:42 -05:00
Joe Haddad
4dbf0d47b0
v10.0.1-canary.4 2020-11-01 01:15:03 -04:00
Minh Tu Le
ec3e41c3cb
Fix Symbol.protype.description polyfill (#18575)
Our code uses `core-js` to polyfill and because core-js [`es.symbol.description`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.symbol.description.js#L14-L16) doesn't just check for `Symbol.prototype.description`, it will try to polyfill again but fail to do so because Next.js polyfill is not configurable. By default, `Object.defineProperty` set `configurable` to `false`. 

Here are the screenshots of the error on Edge 44.18362.449.0 using Next.js v10.0.1-canary.1
![Screen Shot 2020-10-30 at 9 44 05 PM](https://user-images.githubusercontent.com/1637627/97771409-da810700-1af9-11eb-8900-fe49d718dc94.png)

![Screen Shot 2020-10-30 at 9 51 43 PM](https://user-images.githubusercontent.com/1637627/97771433-321f7280-1afa-11eb-8928-fa4d902a01dd.png)
2020-11-01 05:11:56 +00:00
JJ Kasper
fb07e95847
Ensure correct params are used with i18n revalidation (#18569)
This makes sure we don't use invalid `x-now-route-matches` which can occur when `i18n` default locale is visited and a prerendered page is matched. To correct this we first check if we are able to derive the correct params from the URL and then bail on parsing `x-now-route-matches` if we are. Additional test cases are being added in the builder to ensure we don't regress on this

x-ref: https://github.com/vercel/next.js/discussions/18443
Fixes #18602
2020-11-01 04:49:48 +00:00
Jan Potoms
c0ae2041a1
Avoid calling setState in callback ref (#18589) 2020-10-31 23:37:28 -04:00
Lukáš Huvar
a6759c62ad
docs: fix missing comma in invalid redirect gssp (#18580)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-10-31 23:37:06 -04:00
Joe Haddad
f742b6d9bc
v10.0.1-canary.3 2020-10-31 22:52:19 -04:00
Steven
f8c32e556c
Add all deviceSizes to srcset for responsive and fill (#18594) 2020-10-31 20:26:57 -04:00
Joe Haddad
9569f5a31a
Deprecate Image unsized property and add layout="fill" (#18562)
This PR deprecates the `unsized` property from NextImage because the property did not accomplish the desired effect.

Users should rely on one of the new layouts instead:

- `<Image layout="fixed" />`
- `<Image layout="intrinsic" />`
- `<Image layout="responsive" />`
- `<Image layout="fill" />`

The `unsized` property will continue to work as-is in production but is deprecated and will throw in dev.

---

### TODO:
- [x] test `layout=fill` in typescript types
- [x] test `layout=fill` render behavior
- [x] test that `unsized` switches to `layout=fill`
- [x] test `next dev` erroring on `unsized`
- [ ] layout docs (tracked in issue #18554)
- [ ] both `layout=fill` and `layout=responsive` use all deviceWidths in the srcset

---

Fixes #18541 

Co-authored-by: Steven <steven@ceriously.com>
2020-10-31 18:34:06 -04:00
Joe Haddad
9de734a299
v10.0.1-canary.2 2020-10-31 16:03:23 -04:00
Daniel Treviño
a6660729ea
fix: issue #18360 - loading spinner not showing up (#18527)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-30 13:48:55 -05:00
ospira
3bbb35c323
small tweaks for those testing on an existing site with missing autho… (#18506)
* small tweaks for those testing on an existing site with missing author or featured image on posts

When migrating WordPress or using an exisitng site, sometimes you have published posts wth missing data. The graphql plugin will properly resolve these to null, but some of existing code accessing tries to access the node property on these null values. I've made these properties optional in the pages and also tweaked some of the components along similar lines.

* Lint fix

Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-30 13:45:18 -05:00
Yudai Oriver K
61981da9e0
Fix i18n-routing Vercel deploy button URLs (#18524)
Fixes #18523

## description
The i18n-routing Vercel deploy button URLs was:
https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/amp

So, I fixed the URLs for examples/i18n-routing:
https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/i18n-routing
2020-10-30 15:44:21 +00:00
Steven
b7daae418b
Update install-sharp.md (#18508)
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-10-30 10:56:11 -04:00
Steven
afa04d22db
Add layout prop to Image component (#18491)
This PR introduces a new `layout` property.

This allows 3 possible values (`fixed`, `intrinsic`, or `responsive`) which solve many use cases we have seen since 10.0.0 and will hopefully avoid usage of `unsized`.

Fixes #18351 

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-10-30 10:33:34 -04:00
JJ Kasper
4263318836
Ensure i18n context values are provided for blocking 404 (#18513)
This ensures we provide the current `locale`, `locales`, and `defaultLocale` in the context when rendering the 404 for a blocking SSG page

Fixes: https://github.com/vercel/next.js/issues/18505
2020-10-30 01:42:28 +00:00
Yuji Matsumoto
629884af7d
Update using-preact example's dependencies (#18493)
- Update Next.js version to 10.0.0
- Update the other dependencies
- Modify `next.config.js` to prevent circular `__self` and `__source`in dev env (ref: https://github.com/developit/nextjs-preact-demo/issues/25)
2020-10-29 22:52:27 +00:00
JJ Kasper
598df6ac05
v10.0.1-canary.1 2020-10-29 13:02:21 -05:00
JJ Kasper
76504ebae3
Ensure custom routes handling with i18n (#18427)
This makes sure custom-routes function properly with i18n support. Since the `locale` is stripped from the `pathname` this re-adds when checking custom-routes to allow the locale to be matched against

Closes: https://github.com/vercel/next.js/issues/18349
2020-10-29 17:48:54 +00:00
Joe Haddad
50d98962c8
v10.0.1-canary.0 2020-10-29 09:34:20 -04:00
Joris W
7d4b36cccd
Fix GSP page titles in i18n-routing example (#18465) 2020-10-29 12:48:12 +01:00
yokinist
bb96fefa80
docs: Add description to i18n-routing (#18438)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-10-29 11:57:52 +01:00
Tim Neutkens
b902ba120f
Update README.md 2020-10-29 11:50:54 +01:00
JJ Kasper
8b4d6246f3
Add err.sh for i18n config errors (#18425)
This adds an err.sh with info that can help when tracking down errors from invalid i18n config in next.config.js
2020-10-29 03:48:24 +00:00
Jason Miller
aac46c0be8
Fix Symbol.prototype.description (#18423)
Firefox 61:
<img width="513" alt="Screen Shot 2020-10-28 at 5 28 30 PM" src="https://user-images.githubusercontent.com/105127/97498751-1a51be00-1943-11eb-977a-832123363cef.png">

Chrome 61:
<img width="548" alt="Screen Shot 2020-10-28 at 5 26 55 PM" src="https://user-images.githubusercontent.com/105127/97498755-1c1b8180-1943-11eb-8423-bc4e044a1b00.png">

Safari 11:
<img width="477" alt="Screen Shot 2020-10-28 at 5 23 06 PM" src="https://user-images.githubusercontent.com/105127/97498761-1d4cae80-1943-11eb-9de2-e6b26644110a.png">

Fixes #17825
2020-10-29 03:26:32 +00:00
Jip Sterk
e058fa49d0
remove unneeded deps & updated example (#17651)
Closes #17626
2020-10-29 02:31:17 +00:00
JJ Kasper
e20dba2cf0
Add err.sh for image config errors (#18424)
* Add err.sh for image config errors

* Apply suggestions from code review

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

Co-authored-by: Steven <steven@ceriously.com>
2020-10-28 20:53:58 -05:00
Steven
44fe971e6b
Update image optimization docs to include blog details (#18401)
This PR documents some details that are mentioned in the blog post https://nextjs.org/blog/next-10
2020-10-28 17:29:42 +00:00
Steven
79314ef5d8
Update docs with details for cached images (#18399)
This PR explains the caching algorithm for the default loader.
2020-10-28 12:40:40 -04:00
Sebastian Troć
4caf98efbf
Tweak Image Optimization URL in example (#18355) 2020-10-28 13:04:09 +00:00
Alex Castle
5d7f7a47af
Unlazify images if no intersection observer found (#18345) 2020-10-28 00:41:19 +01:00
JJ Kasper
27f56eb325
Add err.sh for missing images domain (#18325)
* Add err.sh for missing images domain

* Apply suggestions from code review

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

* Update test

Co-authored-by: Steven <steven@ceriously.com>
2020-10-27 16:55:21 -05:00
Quinn Turner
6d4395f22c
fix: Order moduleFileExtensions left-to-right (#18328)
Order moduleFileExtensions from most used to least used extensions.

Sources: https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring
and facebook/jest#7616
2020-10-27 20:20:03 +00:00
Steven
3195de65d1
Fix docs default config values (#18319)
Missed one rename from #18294
2020-10-27 18:53:37 +00:00
Joe Haddad
118ab7992b
v10.0.0 2020-10-27 11:45:51 -04:00
Joe Haddad
308ec39f04
v9.5.6-canary.18 2020-10-27 11:31:31 -04:00
Joe Haddad
9a13dd3466
Enable i18n feature flag (#18303) 2020-10-27 10:30:34 -05:00
JJ Kasper
0f25051470
Ensure getStaticProps is called for SSG 404 in blocking mode (#18300)
This ensures that when using a `pages/404` file with `getStaticProps` that we call `getStaticProps` in `fallback: 'blocking'` mode

Fixes: https://github.com/vercel/next.js/issues/18293
2020-10-27 15:11:51 +00:00
Steven
f7ba546e8a
Fix trailing slash for default image loader (#18298)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-27 15:29:52 +01:00
Steven
ab0b0a8a4d
Update docs - add default config for images property (#18296)
- Explain how defaults work and what the default values are.
- Mention quality on the basic page
2020-10-27 14:07:33 +00:00
JJ Kasper
26c438b49d
Record leveraged configs (#18175)
This records new configs being leveraged
2020-10-27 13:46:18 +00:00
Steven
f773a1a44a
Rename iconSizes to imageSizes, remove size limitation (#18294)
This does two things:

- Rename `iconSizes` to `imageSizes`.
- Give priority to `imageSizes` regardless of `deviceSizes` as a means to opt-out of the srcset behavior.
2020-10-27 13:19:23 +00:00
Jesse Jafa
774286fcc3
update @now/next to @vercel/next (#18246) 2020-10-27 13:45:52 +01:00
Yuki Takemoto
a9984e4026
Update example link text (#18286)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-10-27 12:50:41 +01:00
Yamagishi Kazutoshi
900afdc228
Add support number quality on Image Component (#18224)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-10-27 12:37:55 +01:00
Joe Haddad
080b91f986
Adjust default image quality to 75 (#18292) 2020-10-27 11:14:42 +00:00
Joe Haddad
89b8bcb10c
v9.5.6-canary.17 2020-10-27 06:05:36 -04:00
JJ Kasper
379f4c6574
Expose configured default locale in GS(S)P methods (#18216) 2020-10-27 05:43:15 -04:00
JJ Kasper
9a770bde84
Add fetching 404 SSG data on fallback notFound (#18214) 2020-10-27 05:40:17 -04:00
JJ Kasper
11fce3a686
Remove unstable_ prefix from unstable_notFound (#18283)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-10-27 09:54:06 +01:00