Commit graph

5276 commits

Author SHA1 Message Date
Joe Haddad
9d9f7a5873
Improve Sass Error (#10982)
* Improve Sass Error

* test sass error massage

* use quotes

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-11 16:34:14 -04:00
Tim Neutkens
e52048daa7
Use core-js promise polyfill for nomodule browsers (#10985)
* Use core-js promise polyfill for nomodule browsers

Also updated to the core-js@3 features modules instead of importing the exact modules directly.

Fixes #10966

* Simplify reflect and regexp

* Add ie11 test for bad Promise

* Add test script for regexp and ie11

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-11 16:21:49 -04:00
Petr Messner
76a08c9671
Fix examples with relay-compiler (#10976)
* Example with-react-relay-network-modern: update dependencies

* Example with-react-relay-network-modern: move relay __generated__ out of pages dir

* Example with-react-relay-network-modern: fix some errors

- Without checking if props.allBlogPosts exists it fails sometimes on
  "TypeError: Cannot read property 'edges' of undefined"

- I have no idea how it could work before with Component.query().params.name,
  but maybe some dependent library API has changed

* Example with-relay-modern-server-express: update dependencies

* Example with-relay-modern-server-express: move relay __generated__ out of pages dir

Fixes Error: Build optimization failed: found page without a React Component as default export in
pages/__generated__/pages_indexQuery.graphql

* Example with-relay-modern: update dependencies

* Example with-react-relay-network-modern: fix prettier errors
2020-03-11 20:35:17 +01:00
JJ Kasper
34a8e8843d
Make sure to not show pages/404 GIP error from _app having GIP (#10974)
* Make sure to not show pages/404 GIP error from _app having GIP

* Add error for getStaticProps in pages/404 too
2020-03-11 12:18:05 -04:00
Joe Haddad
33503f70a7
v9.3.1-canary.1 2020-03-11 10:37:26 -04:00
Joe Haddad
905f0ce214
Check SSG Page via Route Lookup (#10971) 2020-03-11 09:33:55 -05:00
Yu Watanabe
1edc1a9481
fix paths.params.type in getStaticPaths(document) (#10959) 2020-03-11 12:20:59 +01:00
5alidz
f1cb4ea867
Remove extra closing parenthesis (#10948)
* fix missing open parenthesis

* Apply suggestions from code review

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-10 16:16:54 -05:00
JJ Kasper
6616a371e8
Update handling for patterns in custom routes (#10523)
* Update handling for unnamed params and named patterns in custom-routes

* Update query handling to match Now
2020-03-10 16:09:35 -04:00
Shu Uesugi
dffde48472
Add missing words in docs (#10941)
* Add missing words

* Update docs/basic-features/data-fetching.md

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-10 14:33:31 -04:00
JJ Kasper
fde1ce2924
Add warning when built-in CSS/SCSS support is disabled (#10942) 2020-03-10 14:29:40 -04:00
Joe Haddad
a4ab088746
v9.3.1-canary.0 2020-03-09 14:59:13 -04:00
Joe Haddad
1e53a4961a
Correctly Count Object References (#10903)
* Correctly Count Object References

* Make error message better

* add more tests
2020-03-09 14:58:51 -04:00
Tim Neutkens
befb5006f4 v9.3.0 2020-03-09 19:08:52 +01:00
Joe Haddad
713340600d
v9.2.3-canary.29 2020-03-09 13:31:12 -04:00
Joe Haddad
8443a809f3
Verify GS(S)P Serializability (#10857)
* Verify GS(S)P Serializability

* Add support for cyclic refs

* Add unit tests

* Test for error in development mode

* Fix prerender preview tests

* Fix gssp preview tests

* fix 2x test cases

* Add desired test

* fix some more tests

* Fix route manifest expect

* Fix test expects

* Test that `getServerSideProps` does not error in production

* Test that getStaticProps is not checked in production

* Test serialization check during build

* Fix export detection for serverless

* Update test/unit/is-serializable-props.test.js

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-09 13:30:44 -04:00
Shu Uesugi
745494a9a3
Add demo URL for the DatoCMS example (#10901) 2020-03-09 17:47:21 +01:00
Joe Haddad
fd3256f47e
Fix Azure Pipelines (#10896)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-09 10:22:52 -04:00
Tim Neutkens
1a47dbea69
Upgrade webpack (#10895)
Fixes #10890
2020-03-09 13:11:06 +01:00
Shu Uesugi
bf0ea49b02
DatoCMS Example (#10891)
* Copy cms-datocms

* Update package.json

* Desktop design

* Tablet support

* Mobile styles

* Update titles

* Add article page

* Minor tweaks

* Fix height issue

* Improve text colors

* Extract Alert and Footer components

* Extract avatar

* Add Date

* Extract container

* Fix capitalization

* Make it work with no backend

* Add paragraph styles

* Extract PostPreview

* Extract h2

* Extract more stories

* Refactor into more components

* Update tags

* Add missing key

* Add custom document for lang="" support

* Add dotenv

* Load data for the index page

* Limit posts

* Show post page

* Add markdown processing

* Forgot margin

* Add links

* Remove files and add fallback

* Add og:image

* Add favicon

* Add aria-label

* Fix prerender

* Learn more → read documentation

* Fix links and footer

* Desaturate using imgix

* Add preview secret

* Add preview support

* Fix preview code

* Exit preview mode

* Extract getAllPostsWithSlug

* Extract getAllPostsForHome

* Extract getPreviewPostBySlug

* Extract getPostAndMorePosts

* Extract constants

* Extract markdownToHtml

* Fix markdown styles

* Fix imgix for author

* Add README

* Add links to docs
2020-03-09 11:51:08 +01:00
Tim Neutkens
f0cec748d8 v9.2.3-canary.28 2020-03-09 11:01:02 +01:00
Tim Neutkens
83b4fd1509 Fix linting of markdown documentation 2020-03-09 10:54:22 +01:00
Tim Neutkens
1d16b10e3a v9.2.3-canary.27 2020-03-09 10:45:11 +01:00
Balázs Orbán
213a4b8067
Fix getStaticPaths example code (#10893)
* Fix getStaticPaths example code

* Update docs/basic-features/data-fetching.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-09 10:24:15 +01:00
Shu Uesugi
2abbb7ab3f
Typo on preview mode documentation (#10892) 2020-03-08 18:58:11 -05:00
JJ Kasper
178f45b2f6
Test child_process with API route (#10872) 2020-03-06 13:42:05 -05:00
JJ Kasper
764edc51b2
Add identifier to NEXT_DATA when custom server is used (#10869) 2020-03-06 11:14:39 -05:00
Tim Neutkens
9edafc6469 v9.2.3-canary.26 2020-03-06 12:20:38 +01:00
Shu Uesugi
b13892e007
Add TypeScript docs for SSG (#10865)
* Add TypeScript docs

* Fix types
2020-03-06 12:12:46 +01:00
Shu Uesugi
0ff0973edb
Preview mode documentation (#10863)
* Add preview mode file

* Update descriptions for data fetching

* Add preview mode documentation

* Use quotes for front matter

* Wordsmith

* Fix URL

* Minor updates

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-03-06 12:06:52 +01:00
Joe Haddad
f1d0e577e6
Add Test Case for SSG Full Re-Export (#10864) 2020-03-06 01:35:31 -05:00
Joe Haddad
1a9b49bf47
Fix Prerender Test Cases (#10861)
* Fix Prerender Test Cases

* fix test
2020-03-06 01:35:15 -05:00
Joe Haddad
49369d7649
Fix getServerSideProps Test Case (#10862)
* Fix `getServerSideProps` Test Case

* Data requests should fail instead of rendering
2020-03-06 00:53:11 -05:00
JJ Kasper
b274fe39d3
Update method for attaching GS(S)P identifier to page (#10859)
* Update to use separate export instead of attaching to Component to identify GS(S)P pages

* Handle initialProps being undefined
2020-03-05 23:15:10 -05:00
Tim Neutkens
744b50d5d4
add example for why-did-you-render (#10662)
* add example for why-did-you-render

* Load whyDidYouRender from _app.js

To avoid custom webpack main entry modifications
as this can cause [hydration errors](https://github.com/zeit/next.js/pull/10662#pullrequestreview-365188433)
2020-03-05 23:43:58 +01:00
Joe Haddad
d07db4a054
v9.2.3-canary.25 2020-03-05 13:54:01 -05:00
Joe Haddad
5dfc7da2f9
Fix getStaticPaths modules being cached in dev mode (#10852) 2020-03-05 13:48:09 -05:00
Tim Neutkens
69ba79346f
Update README-template.md 2020-03-05 17:35:41 +01:00
Joe Haddad
48084649db
Re-add Sass Docs (#10850)
This reverts commit b5c70e8639.
2020-03-05 10:56:50 -05:00
Tim Neutkens
a61dfb22a1 Fix data fetching learn more links 2020-03-05 16:49:33 +01:00
Tim Neutkens
6679694a1e
Update Custom Server README's (#10843)
* update custom server readmes

* remove deploy buttons
2020-03-05 16:30:48 +01:00
Tim Neutkens
2d64986733 v9.2.3-canary.24 2020-03-05 16:00:12 +01:00
Tim Neutkens
917ef12248
Update Pages and Data Fetching docs for SSG improvements (#10837)
* Update pages doc for SSG

* Add data fetching doc

* Format code

* Link directly to nextjs.org

* Fix link

* Add .md

* Add .md

* Fix hashes

* Update pages.md

* Wordsmith

* Fix link

* Fix heading

* Capitalization

* Link to pages

* Add router link

* Fix parens

* Make links consistent

* Use commas

* Link to fallback pages

* Update data-fetching.md

* Fix linting

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-05 15:46:44 +01:00
Tim Neutkens
1e505e860f
Ensure an accessible default viewport meta tag (#10823)
* fix: remove minimum-scale from default viewport

* update test

* remove extra comma

* drop initial-scale
2020-03-05 11:03:15 +01:00
Tim Neutkens
0f0398c88e
Make sure to error when setting too large of preview data (#10831)
* Make sure to error when setting too large of preview data

* Update to check size after signing and limit to 2KB
2020-03-04 21:37:53 +01:00
Tim Neutkens
a4eef95056
Add docs for static 404 and pages/404 (#10811)
* Add docs for static 404 and pages/404

* Remove new from docs

* Apply suggestions from code review

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Rework using suggestions from review

* Apply suggestions from code review

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Update custom-error-page.md

* Update custom-error-page.md

* Update custom-error-page.md

* Fix prettier

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-04 19:44:32 +01:00
JJ Kasper
da329ce44b
Update release stats with different name from pr stats (#10827) 2020-03-04 11:28:10 -06:00
Joe Haddad
640e8f3548
v9.2.3-canary.23 2020-03-04 11:56:58 -05:00
Joe Haddad
50c95d16b4
Send Credentials for getServerSideProps Requests (#10826)
* Send Credentials for `getServerSideProps` Requests

* Fix tests
2020-03-04 11:56:08 -05:00
JJ Kasper
70cb5bd726
Update to make sure preview mode works with getServerSideProps (#10813)
* Update to make sure preview mode works with getServerSideProps

* Update to only parse previewData in GS(S)P mode
2020-03-04 13:58:12 +01:00