Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #1

Merged
merged 108 commits into from
Oct 31, 2020
Merged

Update #1

merged 108 commits into from
Oct 31, 2020

Conversation

justinphilpott
Copy link
Owner

No description provided.

ijjk and others added 30 commits October 19, 2020 21:08
This makes sure that we detect the correct default locale for domain specific locales since a domain can have a different default locale residing at the root and we need to check this on the client for prerendered/auto-static pages. This also makes sure we disable the built-in redirect handling when on Vercel since it's handled already. 

Tests for this are tricky since we need to load the browser with a custom domain which requires editing the host file. Existing tests should ensure this doesn't break non-domain specific locale behavior though. This was also tested manually while testing vercel/vercel#5298



x-ref: #17370
Bump resolve-url-loader version to fix vulnerability. 

Fixes #18048
Related #18044
This closes [#18023](#18023). 

I was following the example mentioned in the issue (https://github.com/vercel/next.js/tree/canary/examples/with-firebase-authentication) and for some reason `xa` was always false, failing fetching food. Through `console.log` I saw that `ya` contained a token value and using `ya` worked.
This makes sure the `locales` are passed to `getStaticPaths` and also disables the removing the default locale from the path when the default locale is the preferred header. It also updates tests to ensure the domain redirects are working as expected.  

x-ref: #17370
Implements the `unsized` property from RFC #16832

cc @atcastle
Co-authored-by: Tim Neutkens <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Solves the build failure we're seeing on PRs
This updates the fallback 404 handling to render the correct 404 page on the client when a 404 is returned from fetching the data route on a fallback page on the client. This prevents us from having to rely on a cache to be updated by the time we reload the page to prevent non-stop reloading. 

This also adds handling in serverless mode to ensure the correct 404 page is rendered when leveraging fallback: 'blocking' mode. 

Additional tests for the fallback: 'blocking' 404 handling will be added in a follow-up where returning notFound from `getServerSideProps` is also added.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This PR updates the `<Image>` component to follow the same property naming as native `<img>`.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img#attr-loading

This currently allows two values,`loading=lazy` and `loading=eager`, but there might be new values added in a future spec.

cc @atcastle
styfle and others added 29 commits October 27, 2020 15:29
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This ensures that when using a `pages/404` file with `getStaticProps` that we call `getStaticProps` in `fallback: 'blocking'` mode

Fixes: #18293
* Add err.sh for missing images domain

* Apply suggestions from code review

Co-authored-by: Steven <[email protected]>

* Update test

Co-authored-by: Steven <[email protected]>
This PR explains the caching algorithm for the default loader.
This PR documents some details that are mentioned in the blog post https://nextjs.org/blog/next-10
* Add err.sh for image config errors

* Apply suggestions from code review

Co-authored-by: Steven <[email protected]>

Co-authored-by: Steven <[email protected]>
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
This adds an err.sh with info that can help when tracking down errors from invalid i18n config in next.config.js
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: #18349
- 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: developit/nextjs-preact-demo#25)
This ensures we provide the current `locale`, `locales`, and `defaultLocale` in the context when rendering the 404 for a blocking SSG page

Fixes: #18505
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 <[email protected]>
Co-authored-by: Luis Alvarez D. <[email protected]>
#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 <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
@justinphilpott justinphilpott merged commit d2330b4 into justinphilpott:canary Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.