Commit graph

5272 commits

Author SHA1 Message Date
Pierre de la Martinière
0a5cc30ee8
Add NextApiHandler type (#10573)
* Add NextApiHandler type

* Fix formatting

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-18 22:57:31 -05:00
JJ Kasper
db04cc57c1
Make sure to handle rejection when prefetching pages (#10579)
* Make sure to handle rejection when prefetching pages

* Update comment

* Make sure to show prefetch error in development still
2020-02-18 15:28:29 -06:00
JJ Kasper
c66f2f757c
Decrease number of expected preloads in safari (#10578) 2020-02-18 14:11:52 -06:00
Tim Neutkens
c706e1af84 v9.2.3-canary.1 2020-02-18 20:04:41 +01:00
Tim Neutkens
b5c70e8639
Revert "Re-add Sass Docs (#10364)" (#10577)
This reverts commit 72823f04e7.
2020-02-18 19:36:48 +01:00
Tim Neutkens
0222a09cd0
Enable polyfillsOptimization (#10574)
* Enable polyfillsOptimization

* Update sizes

* Commons is no longer there

* Update test
2020-02-18 19:26:55 +01:00
Joe Haddad
72823f04e7
Re-add Sass Docs (#10364)
* Re-add Sass Docs

* Update built-in-css-support.md

* Apply lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-18 12:22:51 -05:00
Tim Neutkens
04c5737e3c v9.2.3-canary.0 2020-02-18 16:33:28 +01:00
Gordey
5e23e35456
Add missin create permission for faunadb example (#10575) 2020-02-18 10:24:57 -05:00
Tim Neutkens
743bf5d345
Enable scss/sass support (#10571)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-18 08:35:12 -05:00
Tim Neutkens
3a1aa554c5
Enable pages/404.js support (#10572) 2020-02-18 08:18:41 -05:00
Maël Nison
c71fcbe4e8
Adds a missing dependency (#10570) 2020-02-18 13:46:45 +01:00
Tim Neutkens
d8fd6880d2 v9.2.2 2020-02-18 12:12:49 +01:00
Tim Neutkens
2c414b47e3 v9.2.2-canary.23 2020-02-18 11:08:15 +01:00
Tim Neutkens
162f11c0c0
Add extra profiling app (#10568)
Just another app that I’ve been using for analysis
2020-02-18 10:30:34 +01:00
Luis Alvarez D
88b1fe50c5
Remove react import in create-next-app template (#10564) 2020-02-18 09:51:11 +01:00
Jan Potoms
3f691eaa45
Remove ts-ignore where possible (#10541)
* Remove ts-ignore where possible

And replace by typecasts

* More accurate types

* bend cliententries in a correct shape earlier on

* comment becomes unnecessary

* add webpack overload to allow for the next.js use case

* Avoid changing public interface

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-17 16:16:19 -05:00
Joe Haddad
f4c5a95c48
v9.2.2-canary.22 2020-02-17 16:00:55 -05:00
Joe Haddad
41e24a516a
Speculate Navigations for Client-Side JS (#10560)
* Speculate Navigations for Client-Side JS

* add tests

* avoid desctructure
2020-02-17 14:46:15 -06:00
Shu Uesugi
9cfc09e3ab
Simplify create-next-app README (#10545)
* Rename to README-template.md

* Add yarn scripts

* Rewrite CNA README

* Forgot zeit link

* Simplify

* Update deploy doc

* Just link to the doc

* page is reloaded

* reload → update

* Deploy updates
2020-02-16 16:00:12 +01:00
Joe Haddad
31a47b4bff
v9.2.2-canary.21 2020-02-15 13:17:19 -05:00
Joe Haddad
6d5c48742b
Implement isFallback Router Property (#10539)
This adds a `isFallback` property to detect if the page is being rendered in "fallback" mode or normal mode.
Accessed via the `useRouter()` hook.

---

Closes #10527
2020-02-15 13:01:10 -05:00
Sebastian Benz
ae9b13e0be
Migrate to AMP Optimizer 2.0 (#10535)
* Migrate to AMP Optimizer 2.0

Most notable changes:

* Automatically import all missing AMP component scripts.
* Automatically add any missing mandatary AMP tags.
* 40% faster

I've updated the docs to mention component auto import and added a corresponding
test case.

* change validator tests which now pass validation

* Improve wording

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

* Update adding-amp-components.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-14 16:01:43 -05:00
Joe Haddad
1c247b5cf1
Check next.config.js settings (#10425)
* Check next.config.js settings

* Add tests

* test package.json case too
2020-02-14 15:42:44 -05:00
JJ Kasper
ecfa7f7d16
v9.2.2-canary.20 2020-02-14 10:06:05 -06:00
JJ Kasper
a7337a9b38
Make sure to encode pathname for custom-route destination (#10536)
* Make sure to encode pathname for custom-route destination

* Add tests to security test suite
2020-02-14 16:53:08 +01:00
Joe Haddad
fbbb184163
v9.2.2-canary.19 2020-02-13 19:52:02 -05:00
Joe Haddad
71019e70d3
Remove native-url Again (#10526)
* Remove `native-url` Again

* update comment

* update sizes
2020-02-13 17:54:25 -05:00
Thor
d5222f8521
Add global CSS styles to example/with-stripe-typescript (#10520)
* Update stripe-node.

* Update casting.

* Add global CSS styles 💅

* Remove emojies from README.

* Add twitter meta.

* Add demo gifs to README.

* Solid card icon.

* lint fix

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-02-13 13:08:18 -05:00
Joe Haddad
2e8d638073
v9.2.2-canary.18 2020-02-13 00:27:01 -05:00
Henrik Wenz
1a50d99fbd
Update withApollo example (#10451)
* Make withApollo work with _app.js components

* Support wrapping functional _App

* Add apolloClient to NextPageContext & NextPageContext

* Propertly call App.getInitialProps if used in NextAppContext

* Add Automatic Static Optimization warning

* Update deps

* Reduce API surface

* Move back to singleton client

* Improve documentation

* Remove Head.rewind()
We can get rid of .rewind by now as the latest next/head no longer uses legacy context.

* Add extra docs

* Reuse apolloState coming from previous hocs

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-13 00:26:22 -05:00
JJ Kasper
4617950457
Add handling for default as named export in SSG transform (#10486)
* Add failing SSG syntax

* Add handling for default as named export in SSG transform

* Revert [comment].js

* Revert index.js

* adjust

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-13 00:25:44 -05:00
Jan Potoms
0b12e2e859
Improve error for invalid page configurations (#10441)
* Remove any type and fix edge cases

Removed the "as any" and use the @babel/types typeguards instead. This revealed some edge cases that would just error.

* Remove ts-ignore

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-12 23:39:51 -05:00
Gerald Monaco
44e40d4f55
Clean up async in next-server (#10476)
* Clean up async in next-server

* fix case when err is null

* Refactor how components are loaded

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-12 23:28:31 -05:00
Joe Haddad
3e7cfd1f9f
Remove with-data-prefetch Example (#10514) 2020-02-12 23:11:27 -05:00
Joe Haddad
66273807a5
Retry Static Data Fetch on Hydration (#10513) 2020-02-12 23:06:41 -05:00
Shu Uesugi
e871e86b17
Update wording for custom server (#10512)
* Update wording for custom server

* Revise

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-12 22:01:11 -05:00
Joe Haddad
3e91d41f08
v9.2.2-canary.17 2020-02-12 21:44:52 -05:00
Joe Haddad
e38e3dd55a
Adjust SSG Loading Behavior (#10510)
* Adjust SSG Loading Behavior

* Update expected preview behavior

* Rename two corrections

* Only use skeleton in production for now

* Fix "should SSR SPR page correctly" test

* fix tests

* fix trailing comment letter

* disable test for now
2020-02-12 20:06:07 -05:00
Shu Uesugi
5f041447bc
Remove Now CLI reference from examples (#10501)
* Find/Replace "Deploy it to the cloud..."

* Find/Replace "Deploy it to the cloud..." (no colon)

* Find/Replace "Deploy it to the cloud..." for firebase

* Convert remaining ones

* Storybook deployment

* Update with-stripe-typescript

* Update contributing.md

* Remove `now`

* Update examples/with-stripe-typescript/README.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
2020-02-12 17:14:57 -05:00
Luis Alvarez D
c5eb535229
[Docs] Apply updates based on feedback (#10352)
* Expand on the docs for the serverless target

* Added catch all routes to API docs

* Added caveat for catch all routes

* Added link to Rauch's post about serverless

* Add mention of `lang`

* Add create-next-app to docs

* Updated dynamic import examples to be more descriptive

* Even better

* Clarify valid catch all routes

* Removed unexpected word

* Apply suggestions from Joe

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Keep #setup

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Updated docs for the serverless target

* Apply suggestions from code review

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

* Update docs/getting-started.md

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

* Added suggestion from chibicode

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-02-12 15:19:58 -05:00
Mark
04d5bbcc50
Fix typo in ignoring-typescript-errors.md (#10499) 2020-02-11 20:57:26 -05:00
Joe Haddad
495838b7e9
v9.2.2-canary.16 2020-02-11 20:27:05 -05:00
Joe Haddad
3cb3498324
SSG Preview Mode (#10459)
* checkpoint: api impl

* Add support for tryGetPreviewData

* snapshot: server(less) support

* Add X-Prerender-Bypass-Mode header support

* Pass preview data to getStaticProps call

* add TODO

* setPreviewData

* 100k iterations

* Handle jwt error

* Write out preview values

* forgot file

* set preview props

* Send preview props

* add preview props

* Pass around more data

* update yarn lock

* Fail on Invalid Prerender Manifest

* Make Missing Prerender Manifest Fatal

* fix ts errors

* fix test

* Fix setting cookies + maxage

* Secure is not needed as we encrypt necessary data

* Set on domain root

* Set cookie max ages

* Render a fallback on-demand for non-dynamic pages

* Test preview mode

* remove old build

* remove snapshots

* Add serverless tests

* use afterAll

* Remove object assigns

* fix cookie spread

* add comment
2020-02-11 20:16:42 -05:00
Shu Uesugi
9a9c0d2c4f
Update deploy doc to surface ZEIT Now / DPS (#10412)
* Update deploy docs to surface ZEIT Now / DPS

* Undo removal of deployment section from static export

* Update description slightly

* Wordsmith

* Wordsmith

* Capitalize Serverless Functions

* Wordsmith

* Update docs/deployment.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

* Update docs/deployment.md

Co-Authored-By: Luis Alvarez D. <luis@zeit.co>

* Update deployment.md

* Update deployment.md

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update "develop" section

* Wordsmith

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
Co-authored-by: Leo Lamprecht <mindrun@icloud.com>
2020-02-11 19:25:54 -05:00
Joe Haddad
79fb13e587
Builds with Warnings Still Complete (#10498) 2020-02-11 17:09:00 -05:00
Vincent Voyer
189fc985a7
Upgrade next-transpile-modules in workspace examples (#10492)
The latest major release of next-transpile-module (v3) changed the way the
module is used, see: https://github.com/martpie/next-transpile-modules/releases/tag/3.0.0
2020-02-11 22:45:36 +01:00
Shu Uesugi
2ff0913864
Use filter for create-next-app template (#10496) 2020-02-11 12:33:27 -05:00
Luis Alvarez D
fe5c9072df
Update README.md (#10487) 2020-02-10 22:49:54 -05:00
Thor
7dd0b40f82
Add Stripe TypeScript Example (#10482)
Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-02-10 22:24:38 -05:00