Commit graph

1643 commits

Author SHA1 Message Date
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
Joe Haddad
14f33dd54f
Make Missing Prerender Manifest Fatal (#10485)
* Fail on Invalid Prerender Manifest

* Make Missing Prerender Manifest Fatal

* fix test
2020-02-10 17:43:34 -05:00
Joe Haddad
d8f26e5a55
v9.2.2-canary.15 2020-02-08 16:52:33 -05:00
JJ Kasper
cbb9c2ca92
Add error message when rewriting to dynamic SSG page (#10458)
* Add error message when rewriting to dynamic SSG page

* Update comment

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-07 22:23:15 -05:00
JJ Kasper
f6e7a38101
Add paths field for unstable_getStaticPaths (#10454)
* Add paths field for unstable_getStaticPaths

* Make sure to specify page in getStaticPaths errors
2020-02-07 22:09:54 -05:00
JJ Kasper
0183a131a6
v9.2.2-canary.14 2020-02-07 11:12:19 -06:00
JJ Kasper
9dc0afd9b9
Redesign custom-routes output and show headers in output (#10444) 2020-02-07 16:06:02 +01:00
Tim Neutkens
c0eab7ee20 v9.2.2-canary.13 2020-02-07 14:10:18 +01:00
JJ Kasper
3099f0881a
Add initial SSG fallback handling (#10424)
* Add initial SSG fallback handling

* Remove extra changes and update fallback handling

* Remove extra timeout for testing

* Update SSG tests in dynamic-routing suite

* Add racing to decide between rendering fallback and data

* Update size-limit test

* Update comment

* Make sure to follow correct route change order

* Make comment more verbose for racing

* Revert getStaticData to only return Promise

* Make sure to update URL on fallback

* Add retrying for data, de-dupe initial fallback request, and merge fallback replace

* Update to add preload for fallback pages data

* Add test for data preload link

* Use pre-built fallback in production mode

* Remove preload link for fallback from _document

* Update to make sure fallback is rendered correctly for serverless
2020-02-07 14:09:06 +01:00
Jan Potoms
5e4850ceee
Remove unused dependency @types/babel-types (#10448)
`@types/babel-types` doesn't seem to be in use anymore. `babel-types` is not used anywhere and `@babel/types` has its own typings included.
2020-02-07 11:13:59 +01:00
JJ Kasper
238202ec11
Make missing param error message more specific (#10433) 2020-02-05 15:27:22 -06:00
JJ Kasper
a4c507d5b4
Update to use existing util to de-dupe path check (#10431)
* Update to use existing util to de-dupe path check

* Update error message for requested/resolved mismatch

* Use correct dataRoute value for prerender manifest

* Fix pageUrl having double slash on Windows
2020-02-05 22:10:39 +01:00
JJ Kasper
924f8ae3b6
Remove old ts-ignores and extra value in routeInfo (#10429) 2020-02-05 10:52:34 -06:00
JJ Kasper
4203d7fd52
v9.2.2-canary.12 2020-02-04 21:44:06 -06:00
JJ Kasper
5ae7fe534e
De-dupe paths returned in getStaticPaths (#10423)
* De-dupe paths returned in getStaticPaths

* Remove warning
2020-02-04 21:55:11 -05:00
JJ Kasper
ec39aa46dc
Update optimize event with static 404 status (#10420)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-04 15:10:40 -05:00
Joe Haddad
ecd628b7e0
Re-enable native-url (#10419)
* Re-enable `native-url`

* update sizes
2020-02-04 14:58:22 -05:00
Joe Haddad
4009f99234
v9.2.2-canary.11 2020-02-04 14:23:46 -05:00
Alex Castle
21fea2ce61
Modify splitChunksPlugin to give shared CSS chunks different names (#10408)
* Modify splitChunksPlugin to give shared CSS chunks different names

* fix lint

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-04 14:22:26 -05:00
JJ Kasper
e3d298dc62
Add support for rewriting to external resources (#10041)
* Add support for rewriting to external resources

* Update rewrite proxying test

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-04 14:08:03 -05:00
Joe Haddad
bc81379618
Detect Invalid Pages Before Optimize (#10418) 2020-02-04 13:55:43 -05:00
Luis Alvarez D
909ab3b179
Check for invalid pages (#10403)
* Updated event

* adjust regex

* adjust regexp more

* Better test file regex

* add tests

* Update index.test.js

* Rename test file

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-04 10:46:22 -05:00
JJ Kasper
821b325547
v9.2.2-canary.10 2020-02-03 16:38:10 -06:00
JJ Kasper
89b2dfc502
Make sure runtime config works in dev mode for serverless targ… (#10402) 2020-02-03 23:34:23 +01:00
Lachlan Campbell
c480c37c8e
Skip undefined attribute in Head (#9856)
* Fix #8655, skip rendering meta tags with undefined props

* Filter all tags, not just meta

* Only render defined props

* Remove filtering of undefined strings

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* Replace Object.entries

* Remove filtering code

* Simplify code

* Add test

* Add tests for undefined head prop value and tweak check

* Update to strip undefined prop values to match react

* Update head.js

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-03 14:55:14 -05:00
Joe Haddad
bf4a156dd3
v9.2.2-canary.9 2020-02-03 11:42:05 -05:00
Joe Haddad
3d507abe0c
Remove Old Records (#10398) 2020-02-03 11:41:43 -05:00
Joe Haddad
f542999b30
v9.2.2-canary.8 2020-02-03 07:26:51 -05:00
Joe Haddad
683486da63
Add TypeScript Definitions for Sass (#10363)
* Add TypeScript Definitions for Sass

* fix test
2020-02-03 00:03:42 -05:00
JJ Kasper
f7880f3463
v9.2.2-canary.7 2020-02-02 21:51:12 -06:00
JJ Kasper
65de050017
Update to not show API not ended warning when response is piped to (#10342)
* Update to not show API not ended warning when response is piped to

* Update to use res.once

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-02 21:48:00 -06:00
JJ Kasper
c01534c92e
Make sure runtime config is set before any imports for serverless (#10386)
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-02 22:33:53 -05:00
Luis Durão
a433b9be6a
Fix bug in catch-all routes with SSG (#10379)
* Fix bug in catch-all routes with SSG

* fix slash

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-02 22:07:45 -05:00
JJ Kasper
e90af3f0ac
v9.2.2-canary.6 2020-02-02 13:08:38 -06:00
Matt Snider
d715c13f41
Custom AMP Validator Variable Name Collision Fix (#10371)
* Changing variable name internally

* Add tests for custom AMP validator

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-02 12:02:56 -06:00
Tim Neutkens
9ba4bee23e v9.2.2-canary.5 2020-02-02 12:49:14 +01:00
JJ Kasper
db90ffe1ea
Implement experimental pages/404.js for custom 404 page (#10329)
* Implement experimental pages/404.js for custom 404 page

* Make sure to show error for getInitialProps in pages/404 in dev mode also

* Update routes-manifest tests for new value

* Make sure page404 is boolean in routes-manifest

* Rename variables for consistency

* Make sure to only use 404 page for 404 error
2020-02-01 15:47:42 +01:00
JJ Kasper
1674f2de1e
Add check that dynamic route is API route in handleApiRequest (#10360)
* Add failing test case

* Add check that dynamic route is API route in handleApiRequest
2020-02-01 15:14:50 +01:00
JJ Kasper
afc278f567
Add support for runtimeConfigs in serverless mode (#10365)
* Add support for runtimeConfigs in serverless mode

* Update test
2020-02-01 14:24:22 +01:00
JJ Kasper
e63d822161
Make sure to not override initial navigation when refreshing static page's query (#10353)
* Add failing case

* Make sure to only refresh query if still on initial page

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-31 20:19:59 -05:00
Tim Neutkens
9546011ae4 v9.2.2-canary.4 2020-01-30 13:41:40 +01:00
Tim Neutkens
e35005c214
[Experimental] Nomodule polyfills chunk (#10212)
* Polyfill Promise in polyfills chunk

* Override promise polyfill to use built-in

* Update sizes

* Update polyfills

* Test

* Add dep

* Use iife

* Unscope

* Revert "Unscope"

This reverts commit ab26bcefd551c544d5b3c577b7ce91e5ecfb9bb9.

* trigger

* Remove unused code

* Set helpers to true

* Update yarn.lock

* Fix test

* Update polyfills size

* Add comment

* Add back comment

* Put polyfills optimization under experimental flag

* Fix filename

* bring back promise for backwards compat until experimental feature is landed

* fix resolve alias check

* correct loader

* fix logic branches

* adjust !!

* adjust cache key

* Conditionally branch polyfill

* fix promise polyfill branching

* Re-add runtime

* fix base object

* fix yarn lock

* Add cache key

* correctly set caller

* add basic test

* Increment h=>i

* increment to j just in case

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-01-30 01:04:29 -05:00
JJ Kasper
29d1b4f326
v9.2.2-canary.3 2020-01-29 12:49:51 -06:00
Dmitry Rybin
41d1757b4e
fix: 9919 Add warning when no config is exported from next.con… (#10228)
* fix: 9919 no exported config found

* fix: 9919 remove isolated test, add integration

* fix: 9919 add check for successfull compilation and fix warnin check

* Add test for development output

* fix: 9919 add error page and link to it in warning

* Update empty-configuration.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-01-29 09:12:30 +01:00
JJ Kasper
f711b77b90 Enable static 404 config to allow static 404 page when availab… (#10290)
* Enable static 404 config to allow static 404 page when available

* Update static 404 suite

* Fix invalid params test case
2020-01-28 22:39:53 +01:00
Alexander Dreith
bd3662b52b Fix preprocessor loader error (#10235)
* Run resolve-url-loader after sass-loader

* Add regression test

* Update test to match

* Revert global.ts

* Make `preProcessors` readonly

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-28 16:31:38 -05:00
JJ Kasper
e4a6bab23e
v9.2.2-canary.2 2020-01-28 13:17:57 -06:00
JJ Kasper
6dbc03bcb9
v9.2.2-canary.1 2020-01-27 23:07:50 -06:00
JJ Kasper
e3ded1aecc
v9.2.2-canary.0 2020-01-27 16:53:15 -06:00
JJ Kasper
c24daa2172 Add initial support for unstable_getServerProps (#10077)
* Add support for unstable_getServerProps

* Apply suggestions from review

* Add no-cache header and update types

* Revert sharing of load-components type

* Add catchall test and update routes-manifest field

* Update header check

* Update to pass query for getServerProps data requests

* Update to not cache getServerProps requests

* Rename server side props identifier

* Update to nest props for getServerProps

* Add no-cache header in serverless-loader also

* Update to throw error for mixed SSG/serverProps earlier

* Add comment explaining params chosing in serverless-loader

* Update invalidKeysMsg to return a string and inline throwing

* Inline throwing mixed SSG/serverProps error

* Update setting cache header in serverless-loader

* Add separate getServerData method in router

* Update checkIsSSG -> isDataIdentifier

* Refactor router getData back to ternary

* Apply suggestions to build/index.ts

* drop return

* De-dupe extra escape regex

* Add param test
2020-01-27 17:50:59 -05:00