Commit graph

1838 commits

Author SHA1 Message Date
JJ Kasper
db445db790
Add err.sh for invalid getStaticPaths return value (#10605)
* Add err.sh for invalid getStaticPaths return value

* Update error link

* Apply suggestions from code review

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-02-20 10:05:49 +01:00
JJ Kasper
61025b8693
v9.2.3-canary.6 2020-02-19 15:47:06 -06:00
Tim Neutkens
9a0d82b4d9
Clean up landed experimental flags (#10593)
* Clean up landed experimental flags

* Remove check for experimental flags from build too

* Remove /_errors/404 in favor of /404

* Remove unneeded check for pathname

* Update test paths

* Fix test

* Update test

* Remove test for disabled config

* Set pages404 always to true

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-19 14:54:38 -05:00
Joe Haddad
0acea5f44a
v9.2.3-canary.5 2020-02-19 13:21:33 -05:00
Joe Haddad
d7167e28e0
Fix AMP Validator Version (#10600) 2020-02-19 13:18:17 -05:00
Dmitry Ishkov
b3fad60d7d
use clearInterval instead of clearTimer on a timer (#10597)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-19 12:39:22 -05:00
Richard van der Dys
103e82260d
Fixed pathname check in router (#10547)
* Fixed pathname check in router

Remove the query portion of the URL when checking paths

* Updated change and added trial test

* Update test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-19 12:00:27 -05:00
Joe Haddad
893fb6e982
v9.2.3-canary.4 2020-02-19 11:32:57 -05:00
Joe Haddad
5e12e5f56a
Emit ES5 Friendly Code in Program#exit Visitor (#10591)
* Emit ES5 Friendly Code in Program#exit Visitor

* Document reasoning

* updt

* Update next-ssg-transform.ts
2020-02-19 11:29:30 -05:00
Joe Haddad
a30e94f21a
Fix Nested Index Dynamic Routes in Development (#10595)
* Fix Nested Index Dynamic Routes in Development

* add missing
2020-02-19 11:13:04 -05:00
Joe Haddad
9fdd344c9e
v9.2.3-canary.3 2020-02-19 08:47:16 -05:00
Joe Haddad
c58f45f42d
Add Failing CSS Test Case (#10590)
* Add Failing CSS Test Case

* update tests
2020-02-19 08:46:58 -05:00
Tim Neutkens
082cc68d87 v9.2.3-canary.2 2020-02-19 11:28:29 +01:00
JJ Kasper
9e8f173319
Update to latest watchpack with dynamic route rename fix (#10351)
* Fix dynamic route rename failing for case change

* Update normalizing curPageFiles

* Remove using webpacks file info since its inaccurate

* Revert changes in favor of fixing upstream

* Update to latest watchpack with case rename fix
2020-02-19 11:05:59 +01:00
JJ Kasper
2a0843349c
Update error message for invalid return value from getStaticPaths (#10580) 2020-02-19 00:20:45 -06:00
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
Tim Neutkens
c706e1af84 v9.2.3-canary.1 2020-02-18 20:04:41 +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
Tim Neutkens
04c5737e3c v9.2.3-canary.0 2020-02-18 16:33:28 +01: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
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
Joe Haddad
2e8d638073
v9.2.2-canary.18 2020-02-13 00:27:01 -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
66273807a5
Retry Static Data Fetch on Hydration (#10513) 2020-02-12 23:06:41 -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
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
Joe Haddad
79fb13e587
Builds with Warnings Still Complete (#10498) 2020-02-11 17:09:00 -05:00
Shu Uesugi
2ff0913864
Use filter for create-next-app template (#10496) 2020-02-11 12:33:27 -05:00
JJ Kasper
4def88c398
Update next-server routes order for expected priority (#10326)
* Update next-server routes order for expected priority

* Update router to allow disabling page routes

* Fix headers having check: true behavior when they should not

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-10 18:06:38 -05:00