Commit graph

838 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Joe Haddad
5e2e9784e0
Do not force noEmit option into TypeScript configuration (#7451) 2019-05-28 19:01:49 -07:00
JJ Kasper
24034ec957 Add amp.canonicalBase option to set absolute URL (#7262)
* Add canonicalBase config to allow setting
absolute path for canonical link

* Make sure canonicalBase is set for
export and serverless

* Move canonicalBase to amp.canonicalBase

* Update tests with canonicalBase config

* Update tests

* run lint-fix

* Fix canonicalBase config parsing

* Fix canonicalBase during export

* Update amphtml tests
2019-05-28 17:32:17 -07:00
JJ Kasper
26702a8562
v8.1.1-canary.40 2019-05-28 12:49:23 -07:00
Joe Haddad
b6dd463d93 Enable strict export presence in webpack (#7446) 2019-05-28 12:43:07 -07:00
Rafael Almeida
5fa01b15c6 Improvements to build watcher (#7441)
* Remove fragment from _document

* Directly assign id instead of setAttribute

* Remove getElementById call by using the existing reference
2019-05-28 20:16:29 +02:00
Lukáš Huvar
e76529a499 Bundle only server code for API routes (#7443) 2019-05-28 15:48:13 +02:00
keustma
eee19788e5 Fixed typo in README.md (#7438) 2019-05-28 14:01:46 +02:00
JJ Kasper
d103828c8e
v8.1.1-canary.39 2019-05-27 15:03:53 -07:00
JJ Kasper
ca85cc9973
Update styles on build indicator container (#7436) 2019-05-27 15:01:29 -07:00
JJ Kasper
b5a93c9ac5
v8.1.1-canary.38 2019-05-27 14:07:05 -07:00