Commit graph

3685 commits

Author SHA1 Message Date
JJ Kasper
cb29085707
Fix next start in serverless mode with public directory (#7541)
* Fix next start in serverless mode with public directory

* Add public folder to serverless test suite
2019-06-09 17:18:38 -07:00
JJ Kasper
fa45fa0a60
Add export const config support and make withAmp a no-op (#7525)
* Add export const config support and make withAmp a no-op

* Use babel plugin for PageConfig

* Fix serverless-loader exports

* Add backwards compatibility for withAmp
2019-06-09 17:16:14 -07:00
Tim Neutkens
a4d6d86dc9 v8.1.1-canary.48 2019-06-09 14:17:09 -07:00
Luis Fernando Alvarez D
af89040622 Add Typescript to next-mdx readme (#7540)
I added a link to the MDX docs because to enable Typescript we do exactly the same.
2019-06-09 12:34:42 -07:00
Dmytro
56e740168d TS: don't set page component props to the App's props by default (#7535) 2019-06-08 13:41:50 -05:00
Faris Abusada
890a45616d fixes constants link in readme (#7534) 2019-06-08 17:35:02 +02:00
Kévin Dunglas
3f8dd6b665 with-cookie-auth: don't rely on the Host header (#7435)
* with-cookie-auth: don't rely on the Host header
2019-06-07 13:18:41 -05:00
Kuba Juszczyk
e49f26d644 Restore onMouseEnter event (#7531) 2019-06-07 11:43:27 -04:00
Joe Haddad
a372edae48 Default target in loadConfig instead of next build (#7521)
* Default `target` in `loadConfig` instead of `next build`
We should set the target from the environment variable during `loadConfig` instead of in `next build`. This ensures all other locations in Next.js that rely on `config` can read the correct value to toggle behaviors.

* Use object destructuring

* Add tests for builder target

* Run start with serverless
2019-06-06 15:57:42 +02:00
Tim Neutkens
a3082d672e v8.1.1-canary.47 2019-06-06 15:44:28 +02:00
Tim Neutkens
6c5a573352
Add types for <Html> and <Head> element (#7524)
* Clean up _document documentation

* Add types for `<Html>` and `<Head>` element
2019-06-06 15:41:31 +02:00
Joe Haddad
86d62afaf9
Adjust Flying Shuttle message (#7522)
* Adjust Flying Shuttle message
This adjusts the flying shuttle message for when a shuttle is not found or cannot be reused to reduce confusion to the user opting into the feature.

* Tweak message
2019-06-06 09:19:08 -04:00
Tim Neutkens
e49e442796
Clean up _document documentation (#7523) 2019-06-06 15:09:20 +02:00
Luc
3b5f18495b Replace recursive-copy with own implementation (#7263)
* replace recursive-copy with own implementation

* update yarn.lock

* do not filter out not directories

* do not fail if folder already exists

* replace `\` by `/` when sending pathes to filter

* use fs-extra only in tests

* investigate and test recursive-copy npm module

* improve test by creating fixtures programmatically

* remove recursive-copy npm module test

* add recursive-copy to bench

* add bench:recursive-copy script

* fix Sema import in recursive-copy.ts

* small improvements
2019-06-06 12:33:11 +02:00
JJ Kasper
e3cd31df17
v8.1.1-canary.46 2019-06-05 20:11:06 -07:00
JJ Kasper
be02b881c5
Fix auto export in serverless (#7517)
* Fix nextExport not being set in serverless

* Add test for refreshing query
2019-06-05 19:37:58 -07:00
JJ Kasper
66fd87fc9b
v8.1.1-canary.45 2019-06-05 13:26:13 -07:00
JJ Kasper
2bb2b57395
Fix autoExport on windows and add tests (#7514) 2019-06-05 13:20:08 -07:00
Tim Neutkens
7e7f2c0a6d
Simplify a few parts of the codebase (#7506)
* Move client-side dev JS to dev folder

* Move eventsource polyfill

* Move source-map-support

* Move error boundary

* Deprecate Container in _app

* Make initialRender check better

* Remove unused code

* Only support one subscription as there is only one

* Don’t spread object

* Shorten property name

* Add container in development too

* Simplify query update logic
2019-06-05 20:15:42 +02:00
Lukáš Huvar
c821e83048 API interface extensions (#7363)
* Cookies and Query parsing for API request

* Adding JSON and SEND

* First body parsing

* Body parsing

* Remove extra try catch

* Fix tests

* Only server bundling for API routes

* Update packages/next-server/server/api-utils.ts

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

* Revert on demand server changes

* Use content-type for parsing

* Update packages/next-server/server/api-utils.ts

Co-Authored-By: Jan Potoms <potoms.jan@gmail.com>

* Add tests for server compilation

* Add body limit

* Change API to function chaining

* Limit test
2019-06-05 13:22:09 +02:00
JJ Kasper
93aaacd58d Fix serverless dynamic routes (#7505)
* Fix serverDir resolving for autoExporting

* Fix dynamic routes in serverless loader
2019-06-05 13:18:23 +02:00
Teal Hobson-Lowther
2153789358 fix create command - react-relay-network-modern (#7502)
looks like the readme still contained the old react-relay-modern example creation commands 🤷‍♂
2019-06-05 13:11:46 +02:00
JJ Kasper
9fa1101c7c
v8.1.1-canary.44 2019-06-04 22:20:05 -07:00
JJ Kasper
7d5556a552
Fix serverDir resolving for autoExporting (#7504) 2019-06-04 22:17:36 -07:00
Kuba Juszczyk
02551d3bc7 Disable <title/> warning when React Helmet is used (#7483) 2019-06-04 22:30:29 +02:00
Dmytro
cc6eecd23f Allow to describe initial props in the NextPage type (#7491) 2019-06-04 09:35:13 -05:00
JJ Kasper
725f8c2b64 Update ant design examples (#7490)
* Update with-ant-design example to not
need require.extensions hack

* Update other ant-design examples to not
use require.extensions hack
2019-06-04 11:13:10 +02:00
JJ Kasper
79cf929b25
v8.1.1-canary.43 2019-06-02 02:48:05 -07:00
JJ Kasper
82d5eec7a9
Add identifier for Next.js AMP pages (#7485) 2019-06-02 02:38:47 -07:00
JJ Kasper
3245a57370
Remove .includes from _app for ie compatibility (#7482) 2019-06-01 04:40:56 -07:00
JJ Kasper
875b205b57 Upgrade to latest typescript (#7477) 2019-05-31 04:36:59 -07:00
Joe Haddad
f8e9cbba7b
Consolidate import statements 2019-05-31 02:27:56 -07:00
JJ Kasper
a7a59450a5
v8.1.1-canary.42 2019-05-30 17:36:29 -07:00
JJ Kasper
8a8cde1b39
Refresh query on mount for exported pages (#7462)
* Refresh query on mount for exported pages

* Make sure to only refresh query if it is different

* Only update if search isn't empty

* Merge pre-rendered query values with
current query values

* Remove dynamic restriction for autoExporting

* Update dynamic routing test fo autoExport

* Remove autoExport from client-navigation test

* Remove logs and update trailing slash config

* Update nextExport tests in client-navigation

* Disable autoExport in export suite
2019-05-30 17:34:05 -07:00
JJ Kasper
da6791e1f1
v8.1.1-canary.41 2019-05-30 15:55:09 -07:00
Joe Haddad
7f187b4621
Add new stub file for exports 2019-05-30 15:53:32 -07:00
Joe Haddad
21fae5262f
Reuse router logic instead of duping in client (#7476) 2019-05-30 15:44:27 -07:00
Joe Haddad
06e0befd82
Do not leave Promise unresolved (#7475) 2019-05-30 14:57:10 -07:00
Joe Haddad
3f9e64f7c1
Remove old optional dynamic <Link> test (#7474) 2019-05-30 14:05:06 -07:00
Joe Haddad
c782fa4130
Revise dynamic route generation (mark 3) (#7473)
* Revise dynamic route generation
This implements a new tree-based route sorting algorithm that uses a Depth-First-Traversal approach to correctly sort the routes.

This provides better clarity over a `.sort()` based approach and will scale well as we add new features in the future.

* Update import
2019-05-30 13:42:45 -07:00
Jan Potoms
6ffd4564c5 Improve contributing doc without yarn link (#7471) 2019-05-30 11:58:55 -07:00
JJ Kasper
03d589349a
Render valid optimized AMP by default (#7465)
* Upgrade to latest AMP toolbox optimizer

* Remove amphtml from AMP only and update tests

* Update tests

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <timer150@gmail.com>
2019-05-29 19:53:41 -07:00
JJ Kasper
683a634a1e
Make react-ssr-prepeass external if not enabled (#7466) 2019-05-29 19:40:23 -07:00
Joe Haddad
b3170d2648
Format missed files (#7464)
* Format missed files

* Remove unnecessary rule

* Fix type error
2019-05-29 18:19:32 -07:00
JJ Kasper
598cce8711 Don't run standard for tsx files in husky to match lint-fix (#7463)
* Don't run standard for tsx files in husky to
match lint-fix

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <timer150@gmail.com>
2019-05-29 17:53:35 -07:00
Joe Haddad
ec385e573d
Disable optional param routing code paths (#7459)
* Disable optional param routing code paths

* Fix tests
2019-05-29 14:29:02 -07:00
Tim Neutkens
c8a4682d4a
Remove react-ssr-prepass as it’s only needed for experimental feature (#7455)
* Remove react-ssr-prepass as it’s only needed for experimental feature

* Add react-ssr-prepass to devdeps
2019-05-29 15:19:21 +02:00
Tim Neutkens
3e51ddb8af
Move syntax formatting to prettier (#7454)
* Run prettier over packages/**/*.js

* Run prettier over packages/**/*.ts

* Run prettier over examples

* Remove tslint

* Run prettier over examples

* Run prettier over all markdown files

* Run prettier over json files
2019-05-29 13:57:26 +02:00
Matthew Webb
9ccbb1f5bf Correctly pass props down in with-lingui example HOC (#7445)
* correctly pass props down in Lingui example HOC

The WithLang HOC provided as part of the with-lingui example does not pass props down to the wrapped component.
This means that the result of getInitialProps is not passed to the page component.
This commit passes all props which aren't specific to the HOC implementation down to the wrapped component.

* remove semicolon to satisfy lint rules
2019-05-29 10:43:47 +02:00
Joe Haddad
5e2e9784e0
Do not force noEmit option into TypeScript configuration (#7451) 2019-05-28 19:01:49 -07:00