Commit graph

3195 commits

Author SHA1 Message Date
Tim Neutkens
130aa3fd18
Remove unused parameters (#6735)
These two were unused 👍
2019-03-20 12:11:35 +01:00
JJ Kasper
7d0919a784 Break up basic test suite (#6730)
* Break out client-navigation and rendering
test from basic test

* Try with parallelism dialed back to 3

* Update jest-junit for more compatible timings in CircleCI

* Bump to test timings

* Use filepath for suitename in jest-junit

* Store reports as artifacts

* Try using classname for timings

* Bump

* Remove reports from artifacts
2019-03-20 11:01:32 +01:00
Connor Davis
2c975b1cdc Catch errors when loading a page in case a script 404s (#6729)
* Catch errors when loading page

* return promise instead of await
2019-03-20 10:58:26 +01:00
JJ Kasper
18af71c011 Add support for amp to export (#6725)
* Add support for amp to export

* Anchor canonical replace

* Disable profiling test for now

* Centralize amp utils to next-server/server/utils

* re-enable profiling test
2019-03-19 23:53:47 -04:00
Joe Haddad
e906e4bd77
Adjust CircleCI flow (#6728)
* Format circleci config

* Tweak configuration into multiple steps

* Persist whole repo to workspace

* Attach workspace for tests

* Run tests in parallelism x4

* Test circleci parallelism

* parallel x6 times

* Save test timing

* Use env var instead

* run in ci mode

* test speed
2019-03-19 21:55:43 -04:00
Joe Haddad
78bcfa07b2 Skip console clearing when not in a TTY (#6726) 2019-03-19 23:16:02 +01:00
Joe Haddad
31f6f4c606
Ensure browser gets closed during testing (#6724)
* Ensure browser gets closed during testing

* Remove fit
2019-03-19 18:03:50 -04:00
Joe Haddad
2cd0e99af4
v8.0.4-canary.14 2019-03-19 15:49:37 -04:00
Joe Haddad
f9e76a2354
Shrink the size of profiling test (#6723) 2019-03-19 15:35:11 -04:00
JJ Kasper
bce75ae9c3
Add checking for corresponding pages for link tags (#6719) 2019-03-19 14:01:42 -05:00
JJ Kasper
2cc8365d82
v8.0.4-canary.13 2019-03-19 10:16:06 -05:00
Julio Carlos Menendez
7ae0ff38e9 Adds example for Office UI Fabric React. (#6705)
* Adds example for Office UI Fabric React.

* Fixes code style errors.
2019-03-19 13:30:05 +01:00
Jehun Seem(심제훈)
ce329cce96 Fix with-mobx-state-tree-typescript modules export (#6704)
* Update libraries

* Fix for export modules for type
2019-03-19 11:43:12 +01:00
JJ Kasper
12cbb934b3 Add support for creating AMP pages (#6706)
* Add support for .amp.js pages and
resolving /page?amp=1 to page.amp.js

* Update amp tests

* Update example and clean up amp page resolving

* Add nested amp test

* page => normalizedPage

* Add type to page options

* Add handling of amp with all pageExtensions
and normalize page

* Make sure findPageFile only falls back to
amp if enabled
2019-03-18 23:24:21 -04:00
Joe Haddad
ff5c8465de
First pass of runtime amp validator (#6708) 2019-03-18 19:21:18 -04:00
Tim Neutkens
0e39b24592
Clean up ErrorBoundary component (#6703) 2019-03-18 18:08:51 +01:00
Tim Neutkens
b41c85e32a
Remove headManager property as it’s unused (#6700)
This was leftover from before we moved to `HeadManagerContext`

Also removes `emitterProp` as it's unused in the Next.js codebase too.
2019-03-18 16:22:36 +01:00
March Works
71c4728598 update with-rematch example (#6699)
Solved the following issue [#6686](https://github.com/zeit/next.js/issues/6686)
2019-03-18 14:37:49 +01:00
Tim Neutkens
ad856eb299 v8.0.4-canary.12 2019-03-18 13:30:22 +01:00
JJ Kasper
2d6a73cb66 Remove conflicting <head> tags in amp mode (#6693) 2019-03-18 12:29:31 +01:00
Kyle Gallagher
05ddf3e4e0 Small fix to example custom-server-typescript (#6695)
I noticed that the nodemon.json file was not watching for all file changes in the correct location for filetype .ts (typescript). After some research I found that the "ext" option in the nodemon.json fixes the issue and should work across all operating systems.
2019-03-18 11:57:39 +01:00
Tim Neutkens
6104a71afb Make react-loadable-manifest only have modules that are part of dynamic chunks (#6622)
* Make react-loadable-manifest only have modules that are part of dynamic chunks

* Add manifest sorting
2019-03-17 14:19:26 -04:00
JJ Kasper
87bd1c3b09
Add error handling for error being thrown in _app getinitialProps (#6680)
* Fix handling of undefined being thrown
in getInitialProps and update integration test

* Update test

* Move test to app-document
2019-03-17 11:43:03 -05:00
JJ Kasper
11a161f296 Add possible explanation for webpack resolve error (#6682)
When overriding `config.resolve.alias` incorrectly webpack will throw an error because private-next-pages is not defined. This adds a more descriptive error explaining the error better.

Fixes: #6681
2019-03-17 13:13:29 +01:00
JJ Kasper
a6ddaefe22 Add experimental exportTrailingSlash config (#6664)
By default when `next export`ing a Next.js application we will automatically append a `/` to all urls to be fully compatible with the directory structure being output.

However since most platforms support directory indexes it makes sense to change this default in the future.

This PR adds `exportTrailingSlash` as experimental flag. We'll try this out for a bit on nextjs.org / zeit.co/docs before introducing it as new option.

The default value is `true` as this is the current behavior in stable Next.js.

```
{
  experimental: {
    exportTrailingSlash: false
  }
}
```

⚠️ as with all experimental flags being added this is subject to breaking between canary/stable versions.
2019-03-17 00:54:58 +01:00
Danil Shashkov
fbedce4de1 Add with-linaria example (#6510)
Next.js with Zero-runtime CSS-in-JS
2019-03-17 00:25:20 +01:00
John Lombardo
5e4886cdb9 Port with-mobx to with-mobx-react-lite (#6617)
Replicates the behaviour of the `with-mobx` example but implemented using `mobx-react-lite` and React context.

I'm still working out a best practice regarding actions and welcome feedback on anything.
2019-03-16 16:47:28 +01:00
Brent Ertz
4c4459f931 Update custom-server-typescript example (#6627)
* Typecheck server vs. client code independently, ensuring that each respects its own tsconfig.
* Use nextjs default distDir in tsconfig
* Update packages
* Fix type error in server.listen callback
2019-03-16 16:42:22 +01:00
陈小聪
4559b05a34 A little missing documentation was added. (#6600)
* A little missing documentation was added.

A little missing documentation was added.

* Update README-zh-CN.md
2019-03-16 15:56:13 +01:00
Kristian Heruc
70a2c78342 Remove empty paragraphs and missing examples (#6677)
Fixes #6639 and incorrect heading IDs.
2019-03-16 14:32:08 +01:00
JJ Kasper
69b53bfc81 Remove sourceMaps from amp styles to not go over limit (#6674)
* Remove sourceMaps from amp styles to not go over limit

* Add test to make sure style sourceMaps
are removed in amp
2019-03-15 14:53:02 -04:00
Joe Haddad
d5f736d623
v8.0.4-canary.11 2019-03-15 10:54:23 -04:00
Tim Neutkens
eaaeb2ecf5
Add codeowners file (#6672) 2019-03-15 13:46:01 +01:00
JJ Kasper
c81bd27587 Fix relative next path not working in webpack config (#6667)
* Fix relative next path not working in
webpack config

* Also add relative fix to amp path
2019-03-15 00:09:00 -04:00
Joe Haddad
d7ab018f31
Hash module IDs to save on bundle size (#6660) 2019-03-15 00:08:22 -04:00
Joe Haddad
8dd7185112
Check for the user's home directory in the build output (#6661)
* Check for the user's home directory in the build output

* Output files on windows for debugging

* add process cwd

* try more paths

* Add branch for winblows

* Print info on error

* set proper env

* try fix
2019-03-15 00:07:59 -04:00
Joe Haddad
0ae34c9a9d
Use relative instead of absolute for entry paths (#6659) 2019-03-14 21:45:50 -04:00
Joe Haddad
6902afbd3f
Stabilize Chunk ID generation (#6663)
* Add a new field to webpack types

* Revert "Add a new field to webpack types"

This reverts commit d35fa02207fbfd0085da0fc56aac42c4ff7c34c9.

* Add HashedChunkIdsPlugin to make consistent chunk ids

* Revert "Revert "Add a new field to webpack types""

This reverts commit 338219049e1432038f90c91928b010bbb1267999.

* Make it optional

* Remove record ids

* Revert "Remove record ids"

This reverts commit 15c22dbcda72466c382397c91d02295620f62326.
2019-03-14 21:38:57 -04:00
Connor Davis
b73abc0a4b Delete using realpath in HMR cache (#6635)
This will allow symlinked assets to be removed from the cache as well

Fixes: #5620
2019-03-15 00:22:57 +01:00
Tim Neutkens
83334f1110
Convert change/getRouteInfo to not use async (#6648)
More updates to the router coming.
2019-03-14 19:43:29 +01:00
Ravinder Mahajan
1c31d79c38 Creating one more example which only uses redux and no thunk as middl… (#6636)
Adding one more example which only uses redux and not thunk. This helps a lot for a beginner to understand basic redux first.
2019-03-14 17:40:00 +01:00
Joe Haddad
1fb1b75216
Ensure all modules are identified (#6656)
* Ensure all modules are identified

* Extend a webpack Plugin

Co-Authored-By: Timer <timer150@gmail.com>
2019-03-14 11:04:08 -04:00
JJ Kasper
a38c6cb3d9
Add err.sh link for threw undefined (#6649)
* Add err.sh link for threw undefined

* Update wording

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
2019-03-13 15:08:06 -05:00
JJ Kasper
1e4372c627
Show a better error when someone throws undefined (#6646)
* Show a better error when someone throws undefined

* Update error wording

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update error wording in test

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update test and add check for statusCode
before updating error
2019-03-13 13:39:05 -05:00
Tim Neutkens
b7bd1f775a
Convert router/router.js to typescript (#6644)
- Removed `fetchRoute` as it was only used once (internal method, non-breaking)
- Convert files to TypeScript
- Don't extend `ServerRouter` from `Router` as it introduces unneeded overhead, we only have to provide `pathname` `asPath` and `query` for `withRouter`. Also added `events` even though it shouldn't be called on SSR, just making sure we don't break things.
2019-03-13 15:56:20 +01:00
JJ Kasper
38ad8d870c
Fix export with folders that contain dot (#6538) 2019-03-12 18:30:03 -05:00
JJ Kasper
c685b9b0d0
Apply workaround for Firefox bug (#6630)
* Apply workaround for Firefox bug
and shallow routing

* Update to only apply workaround when needed

* Add TODO for future removal

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
2019-03-12 16:36:25 -05:00
Joe Haddad
e5636dcdb0
Inject the build ID after webpack runs (#6618)
* Inject the build ID after webpack runs

* add webpack sources types

* use webpack plugin instead

* reset file

* Skip source maps if none were provided

Co-Authored-By: Timer <timer150@gmail.com>
2019-03-12 16:39:44 -04:00
JJ Kasper
361129c31f
Add test for recovering from export default undefined (#6631) 2019-03-12 15:21:09 -05:00
JJ Kasper
e2944c0aca
Fix loading showing before pastDelay (#6628) 2019-03-12 14:12:49 -05:00