Commit graph

5354 commits

Author SHA1 Message Date
Aaron Reisman
85e9ce1b0b
Update preset.ts: Remove any and use updated Node.js types (#11075)
Remove any and use updated Node.js types
2020-03-15 12:22:53 +01:00
Giuseppe
bc4aba1713
Upgrade styled-jsx (#11070)
The main change in this version is https://github.com/zeit/styled-jsx/pull/621
2020-03-15 11:51:55 +01:00
Carlos Pavanetti
bb3cce2315
Update ssr-caching example with getServerSideProps (#11032)
* Replace getInitialProps by getServerSideProps

* Replace getServerSideProps getStaticProps
2020-03-14 10:14:14 +01:00
JJ Kasper
71f97198d1
Add support for static 404 when _error does not have custom GIP (#11062)
* Add support for static 404 when _error does not have custom GIP

* Update tests
2020-03-14 09:58:20 +01:00
Tom Dohnal
e6b4cdd665
update form handler example (#11059) 2020-03-13 16:57:12 -05:00
Jazib Jafri
31a6410bb2
Update with-loading example to SSG (#11050)
* Update getInitialProps to getStaticProps

* Updated example

Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-13 16:48:32 -05:00
Shu Uesugi
b596c2167d
Upgrade next.js version on datocms example (#11039)
* Remove unused files

* Update next

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-13 15:03:29 -04:00
matamatanot
13bfb9a73d
Update custom-server-express example with getServerSideProps (#11035)
* use getServerSideProps

* run Prettier

* update react

* use getStaticProps

* delete query

* Remove data fetching requirements

Co-authored-by: “kosuke_matano” <kosuke_matano@cyberagent.co.jp>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-13 13:48:07 -05:00
Luis Alvarez D
7bf7c232ea
Use getServerSideProps (#11057) 2020-03-13 11:54:32 -05:00
Joe Haddad
925d843503
v9.3.1-canary.4 2020-03-13 09:09:10 -04:00
akhila-ariyachandra
f78c36f686
Updated analyze-bundles example (#11031)
* Updated analyze-bundles example

* Updated react and react-dom (for hooks)
2020-03-13 11:00:10 +01:00
Patrick Dahms
f75c37fcac
Update custom-server-fastify example to not use internal fn (#11040) 2020-03-13 10:53:57 +01:00
Joe Haddad
18036d4e51
Correct Cache-Control Behavior for GS(S)P (#11022)
* Correct Cache-Control Behavior for GS(S)P

* remove old line

* fix test
2020-03-13 10:40:10 +01:00
Sarbast Mohammed
6997b0236b
Update next-sass example to use built-in sass support (#11015)
* update next-sass example to use built-in sass support

* Update README.md

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-12 23:42:21 -04:00
Rui Saraiva
9d9496e4a9
Update with-zeit-fetch example to use SSG (#11026) 2020-03-12 23:32:50 -04:00
JIMMY ムン (MOON)
b092ff72b9
Update amp-first example to use GSSP (#11028) 2020-03-12 23:30:47 -04:00
Joe Haddad
c1358301cc
Fix Test for Windows 2020-03-12 23:23:28 -04:00
Josiah Wiebe
fe4da73469
feat: update api-routes example to SSG (#11019)
* feat: update api-routes example to SSG

* Update examples/api-routes/components/Person.js

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-03-12 17:55:24 -05:00
Alejandro
0f0013b9e4
Update data-fetch example to SSG (#11017)
* Update to SSG

* Change to getServerSideProps

* Fix lint

* Update
2020-03-12 17:21:18 -05:00
JJ Kasper
9943334d44
Update RegExp test and remove extra script (#11006)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-12 14:24:44 -04:00
Joe Haddad
8f8030f7eb
v9.3.1-canary.3 2020-03-12 14:09:12 -04:00
Armand Abric
886037b1ba
Add "noreferrer" to the prerender indicator doc link (#11005) 2020-03-12 11:23:58 -04:00
Daniel Lutz
20c546710d
Add Array.flat polyfill to nomodule-polyfills (#11004)
* Add Array.flat polyfill to nomodule-polyfills

* Fix code style issue
2020-03-12 10:03:06 -04:00
Jeremy Stucki
861257bdfc
Generic form of GetStaticProps and GetServerSideProps (#10856)
* Generic form of GetStaticProps and GetServerSideProps

* Oops, fix type!

* Add constraint for P

* Update packages/next/types/index.d.ts

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-12 09:11:15 -04:00
Joe Haddad
39ed664966
Fix Lint 2020-03-12 09:09:12 -04:00
Brad Larson
3b5029fb92
cms-datocms SerializableError fixes (#10986) 2020-03-12 13:07:57 +01:00
Joe Haddad
a86184eb89
v9.3.1-canary.2 2020-03-12 07:31:26 -04:00
JJ Kasper
ccb6ce7ed4
Add support for getStaticProps in pages/404 (#10984)
* Make sure to not show pages/404 GIP error from _app having GIP

* Add error for getStaticProps in pages/404 too

* Add support for getStaticProps in pages/404

* Update test
2020-03-12 10:48:14 +01:00
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