Commit graph

3814 commits

Author SHA1 Message Date
Joe Haddad
5205695578
Switch all examples to next@latest (#7806) 2019-07-08 18:41:33 -04:00
Lukáš Huvar
a6c7ab9776
Example for GraphQL server with API routes (#7804)
* Example for GraphQL server with API routes

* Update examples/api-routes-graphql/pages/index.js

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>
2019-07-09 00:37:51 +02:00
Joe Haddad
b013e11be3
Upgrade to webpack with latest acorns (#7795)
Closes https://github.com/zeit/next.js/issues/6240
2019-07-08 15:36:55 -04:00
Joe Haddad
6a35b1d302
Set cancelled property on routeChangeError error (#7790)
* Set `cancelled` property on routeChangeError error

* Add route cancellation tests
2019-07-08 15:25:46 -04:00
JJ Kasper
a7171db2ca Remove previous cache logic (#7794)
* Remove previous cache logic

* Remove old test
2019-07-08 14:59:45 -04:00
Joe Haddad
a164a70c72
Update remaining CODEOWNERS 2019-07-08 14:18:30 -04:00
Connor Davis
a0bcdd87c0
Update CODEOWNERS 2019-07-08 13:00:53 -05:00
Joe Haddad
b900ad9b85
Note TypeScript migration (#7787) 2019-07-08 13:08:58 -04:00
Delba de Oliveira
4172c894d3 Further clarification that api routes should be inside the page… (#7780) 2019-07-08 16:28:58 +02:00
Tim Neutkens
bb2ae41a26 Copy invalid-resolve-alias as it is being linked in the codebase 2019-07-08 14:29:19 +02:00
Tim Neutkens
18abc98257 Link invalid-resolve-alias as it is being linked in the codebase 2019-07-08 14:28:09 +02:00
Tim Neutkens
66bf56ff7e v9.0.0 2019-07-08 08:43:07 +02:00
Joe Haddad
6cc72052b8
Add UPGRADING doc (#7773) 2019-07-08 02:28:11 -04:00
Joe Haddad
9f65e50b66
v8.1.1-canary.70 2019-07-08 02:23:36 -04:00
Lukáš Huvar
264fc01969 API routes documentation (#7562)
* API routes examples and documentation

* Update examples/api-routes-micro/README.md

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

* Update examples/api-routes/README.md

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

* Apply suggestions from code review

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

* Update API routes docs

* Improve example to reflect dynamic routes

* Update readme to reflect API routes changes

* Apply suggestions from review
2019-07-07 23:04:04 -07:00
Joe Haddad
b0b1c320a8 Experimentalize public/ (#7771)
* Experimentalize `public/`

* Update tests for publicDirectory config
2019-07-08 07:45:41 +02:00
Lukáš Huvar
f204935251 Fix serverless loader for API routes (#7767)
* Fix serverless loader for API routes

* Only use params with dynamic routes
2019-07-07 17:45:40 -04:00
Alexander Kachkaev
e995c73b2c [typings] Allow getInitialProps to be sync (#7763) 2019-07-07 14:52:59 -04:00
JJ Kasper
cc497568b4
v8.1.1-canary.69 2019-07-05 16:45:09 -07:00
Joe Haddad
270d548d33
Remove old docs (#7760)
* Remove old docs

* Run doctoc
2019-07-05 12:01:21 -04:00
Joe Haddad
6fa17b3f15
Improve automatic prerendering warning (#7759) 2019-07-05 11:57:16 -04:00
JJ Kasper
80b46c1d28 Update to have default pageProps of {} instead of null (#7734)
* Update to have default pageProps of {} instead of null

* Update test

* Test for empty object
2019-07-05 11:00:23 -04:00
Joe Haddad
7f3bdb1bf0
v8.1.1-canary.68 2019-07-05 01:08:29 -04:00
JJ Kasper
7ac8dcbec0 Add deprecation message for next/dynamic modules (#7750) 2019-07-04 23:36:53 -04:00
Joe Haddad
b60985b2be
Revert "fix(Link): Set focus back to the body element (#7693)" (#7753)
This reverts commit defde85e81.
2019-07-04 23:24:14 -04:00
Connor Bär
defde85e81 fix(Link): Set focus back to the body element (#7693)
* fix(Link): Set focus back to the body element

* refactor(Link): Fix typings

* Update blurring logic and add tests
2019-07-04 11:30:22 -04:00
Lukáš Huvar
87acbdb594
Http methods update for static files and pages (#7721)
* Change static method handling and pages revert

* Allow and reflect old behaviour

* Post should return 501

* Add back old test

* Invert logic

* Handle 501 for pages in separate location

* Remove usage of 501 HTTP status code

* Prevent information leak

* Add test

* Only 405 if the page exists -- 404 if it doesn't

* Handle sent responses

* Revert "Handle sent responses"

This reverts commit 5e9012ae29b611c25ed1e090756a25dbe3437182.

* Fix bad test

* Switch back to quiet

* Update test/integration/production/test/index.test.js

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-07-04 10:22:25 +02:00
Junyoung Choi
12f1a63442 Expose next function type (#7726)
* Expose next function type

* Add type testing for typescript custom server

* Move types test to integration folder
2019-07-03 19:38:58 -07:00
JJ Kasper
e00a2c5d64
v8.1.1-canary.67 2019-07-03 15:57:16 -07:00
Lukáš Huvar
a60da57453 Clarify params and query merging (#7744)
* Clarify params and query merging

* Tweak README per @ijjk
2019-07-03 16:08:50 -04:00
Joe Haddad
b2a9670ca4
Make exportTrailingSlash stable (#7746) 2019-07-03 13:25:44 -04:00
Joe Haddad
e36d7b3226
Add example route event code (#7745) 2019-07-03 11:34:41 -04:00
JJ Kasper
f8097e5111 Add next-server/types to package.json files (#7740) 2019-07-03 10:33:34 -04:00
Tim Neutkens
6a507fad1d v8.1.1-canary.66 2019-07-03 14:41:25 +02:00
Tim Neutkens
a785ff7376
Bring down bundle size (#7743) 2019-07-03 14:38:21 +02:00
Tim Neutkens
a88d6b7482 v8.1.1-canary.65 2019-07-03 13:44:09 +02:00
JJ Kasper
7cf132f864
[Refactor] Move context providers to AppContainer (#7737) 2019-07-02 19:16:12 -07:00
Joe Haddad
e798b664a1
Add router event note (#7736)
* Add router event note

* Add line break

* Tweak wording
2019-07-02 21:35:38 -04:00
JJ Kasper
6ce7c06d9c Add initial static indicator (#7682)
* Add initial static indicator

* Update indicator text to pre-rendered

* Update naming from static to prerender

* Update to not re-use nextExport var

* Update positioning of indicator to prevent overlap
2019-07-02 20:42:41 -04:00
Joe Haddad
7439a773b0 Nit: Change Pre-render to Prerender (#7733) 2019-07-02 22:51:12 +02:00
Luis Fernando Alvarez D
c8bd427193 Dynamic routing documentation (#7602)
* Added basic example for dynamic routing

* Added some basic docs for dynamic routing

* Added more docs for dynamic routing

* Used doctoc

* fixed lint issues

* Added useRouter to docs

* Removed getInitialProps examples that are only using router props

* Added useRouter to the navigation

* Small fix

* Updated to the latest dynamic routes implementation

* lint fix

* Update dynamic routing example

* Tweak dynamic routing documentation

* Make basic example basic again

* Adjust dynamic routes section

* Remove query param for dynamic routes example

* Remove old note

* Fix linting
2019-07-02 16:00:58 -04:00
JJ Kasper
def94e6173
v8.1.1-canary.64 2019-07-01 15:23:15 -07:00
Luis Fernando Alvarez D
87610ccff5 Update with-zones example and Multi Zones documentation (#7513)
* Updated with-zones example to Now V2

* Updated Zones docs

* Update packages/next/README.md

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>
2019-07-01 15:21:00 -07:00
JJ Kasper
0ca8087565
Add prerender PageConfig option (#7699)
* Add prerender PageConfig option

* Update PageConfig type

* Add inlining of data when pre-render is set and add tests

* Update types import

* Add check for props

* Rename prerender to experimentalPrerender for now
2019-07-01 14:13:52 -07:00
Joe Haddad
0faf693ed2
Do not default TypeScript to strict: true (#7717) 2019-07-01 13:13:58 -04:00
Joe Haddad
5493f2e8b3
Remove Next.js debug mode (#7719) 2019-07-01 13:13:06 -04:00
Lukáš Huvar
4ad934c148 Serverless build for API routes (#7649)
* Fixes serverless target in development

* Fix serverless build

* Fix serverless build

* Add manifest test

* Better output

* Fix manifest test

* Update snapshot

* Remove snapshots
2019-07-01 12:47:11 -04:00
Joe Haddad
af94c27a9d
Upgrade watchpack to remove eslint-config-prettier (#7716) 2019-07-01 11:09:20 -04:00
Joe Haddad
c92e8c2a09
Remove "small" wording from runtime config overhead (#7715)
Using runtime configuration can cause you to de-optimize entire classes of optimizations.
These optimizations could make your application an order of magnitude faster (i.e. prerendering).
2019-07-01 11:09:09 -04:00
Johnboy
ed997b1131 Add back in second line of comment (#7718)
The second line of this comment was removed in the previous commit due to the usage of process.browser.
This meant the comment was incomplete and confusing
c03e94bebd (diff-a15b49cbb3a523d81a74e0fab7f08eb5)
2019-07-01 11:08:55 -04:00