Commit graph

4203 commits

Author SHA1 Message Date
Lukáš Huvar
3e81acee56 Improve prettier ignore (#8753) 2019-09-16 14:18:08 +02:00
JJ Kasper
fe7c7342c7 Add link to docs for prerender indicator and allow disabling (#8610)
* Add link to docs for prerender indicator and allow disabling

* Fix lint error from example

* Disable by default when electron is detected

* Add button to dismiss indicator for session

* Update disabling indicator in electron
2019-09-15 23:18:11 +02:00
JJ Kasper
ed5dc2107f Add autoExport to __NEXT_DATA__ (#8746)
* Add autoExport to __NEXT_DATA__

* Update render variable
2019-09-15 20:35:14 +02:00
Joe Haddad
00e0281d71
v9.0.6-canary.4 2019-09-14 17:42:59 -04:00
Joe Haddad
d031cf64df
Ensure requests are resolved as directories (#8742)
* Ensure requests are resolved as directories
`resolveRequest` will strip down to baseDir if there's no trailing slash as it assumes you passed a file.

* Disable telemetry for PR Stats
2019-09-14 17:41:05 -04:00
Joe Haddad
cbd427bf3c
Document the intended behavior of our externals (#8741)
This fully annotates our externals code to explain how it should be functioning. This will be useful as tests cases are made to ensure this is working correctly.
2019-09-14 16:58:45 -04:00
Maël Nison
9770d192f2 Prevents externalizing non-hoisted packages (#8739) 2019-09-14 16:12:25 -04:00
Tim Neutkens
8cc6071347
Update readme.md 2019-09-14 21:21:41 +02:00
JJ Kasper
b5d61579c8 Make sure to fail export when prerender fails with serverless bundle (#8738)
* Make sure to error on serverless prerender failure

* Add test case

* Update index.test.js
2019-09-13 19:02:15 -04:00
JJ Kasper
2ae8b345db
v9.0.6-canary.3 2019-09-13 14:49:59 -05:00
JJ Kasper
c8e1e141e1
Make sure renderOpts is available before checking (#8734)
* Make sure renderOpts is available before checking

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Update check
2019-09-13 14:43:45 -05:00
JJ Kasper
5c83684b89
Update pull_request workflow 2019-09-13 12:03:36 -05:00
Joe Haddad
fb83462713
Externalize experimental package (#8731)
* Add missing dependency

* Ignore prepass for Next.js internal

* Revert "Add missing dependency"

This reverts commit 9ef0030b56255577364ff7cab46f513216a290ae.
2019-09-13 12:38:25 -04:00
Joe Haddad
25451ce47a
v9.0.6-canary.2 2019-09-13 10:53:16 -04:00
Romain
98f368f545 Add missing Link import to routing doc (#8728) 2019-09-13 14:43:14 +02:00
Joe Haddad
d046dc6072
Disable telemetry for tests (#8725) 2019-09-12 22:51:56 -04:00
JJ Kasper
80ab8dd991
Update actions config 2019-09-12 13:20:30 -05:00
JJ Kasper
85f96c8fb8
Migrate GitHub Action config and remove un-used secret (#8719) 2019-09-12 13:13:15 -05:00
Henrik Wenz
1045cd4c5a Refactor api-routes-apollo-server-and-client example (#8673)
* Remove connectToDevTools in favour of better default

Disabled devtools in production

* Refactor api-routes-apollo-server-and-client example
2019-09-12 10:44:53 -05:00
Lukáš Huvar
9731e7e99c [Docs] Prefetch disabled for 2g or SaveData header (#8717) 2019-09-12 13:11:34 +02:00
JJ Kasper
2139f66ac3 Add test for duplicate scripts and add extra de-duping (#8709) 2019-09-11 17:20:47 -04:00
Joe Haddad
eb8c11bbda
Organize webpack configuration imports (#8711)
This PR simply organizes the webpack config imports.
2019-09-11 16:41:29 -04:00
Joe Haddad
55369051f5
Warn build on duplicate pages (#8646)
* Fail build on duplicate pages
This will fail the `next build` command when a duplicate page is found.
In development, we'll emit a warning instead of crashing the dev server.

* Add test for warning in development

* Only issue a warning

* Fix production test

* Fix development test

* Remove useless arg

* Warn in development, too
2019-09-11 14:26:10 -04:00
Joe Haddad
594851111b
Nit: sort experimental keys (#8707) 2019-09-11 14:10:51 -04:00
JJ Kasper
5a0dcbc95b Update pages-loader to return one value (#8629)
* Update pages-loader to return one value

* de-dupe page mod update also
2019-09-11 13:21:10 -04:00
Joe Haddad
fcadad9960
TypeScript report on active pages only (#8703)
* TypeScript report on active pages only
The TypeScript integration needs to report on active pages only.
When inactive pages are reported, they block the compilation and prevent the user from fixing the error (because the file isn't watched).

We cannot add the file to the webpack watcher because the compilation has already been sealed.

* Remove TODO message

* Test that inactive pages are not type checked
2019-09-11 13:06:48 -04:00
JJ Kasper
e5aa9614e1 Lock CircleCi image for now (#8706)
* use legacy image for now

* Use image hash

* Update config
2019-09-11 12:56:32 -04:00
Joe Haddad
53f4f82e4c
Catch all requests in custom server (#8704)
Some users aren't aware they need to edit their custom server to support various HTTP Methods (e.g. POST for API Routes).

Instead, we should just handle all HTTP Methods out-of-the-box.

---

Closes #8237
2019-09-11 10:23:41 -04:00
Michael Lustig
a809368e59 Fix login popup not working (#8700) 2019-09-10 22:16:20 -04:00
Jakub Karabuła-Stysiak
5496e0f8b3 Add electron typescript example (#8682)
* Add initial Electron-Typescript-Next example

* Move and add types

* Update readme

* Update renderer

* remove config
2019-09-10 14:22:00 -05:00
JJ Kasper
a5ebe41a9a Delay updating asPath for auto exported pages (#8681)
* Delay updating asPath for auto exported pages

* Add additional test ensuring asPath is updated
2019-09-10 13:30:25 -04:00
Joe Haddad
79090718da
Test non-flag and re-runs of telemetry cmds (#8697) 2019-09-10 13:21:10 -04:00
JJ Kasper
7b933f675a Optimize test setup (#8644)
* Tweak test set-up

* Update azure config

* Add cleaning test files and windows handling

* Limit windows test to one at a time

* Tweak test settings

* Update tests splitting

* remove custom concurrency for azure

* Test Azure var

* Update Azure config

* bump

* Simplify cleaning up
2019-09-10 13:11:55 -04:00
Joe Haddad
4c6c9cc882
Add telemetry CLI tests (#8696)
* Add telemetry CLI tests

* Apply suggestions from code review

Co-Authored-By: JJ Kasper <jj@jjsweb.site>

* Update index.test.js
2019-09-10 12:45:37 -04:00
Joe Haddad
ba683b3fab
Support non-flag variant of telemetry cmds (#8695)
This adds support for `next telemetry disable` (and keeps support for `next telemetry --disable`).

This also informs the user telemetry was already disabled if they re-run the command to give peace of mind.
2019-09-10 12:31:18 -04:00
Diogo Dutra
af7d021d48 Fix relay modern server express example (#8683) 2019-09-10 09:01:59 +02:00
JJ Kasper
8444c1ffba
Update stats-config to be more deterministic (#8679) 2019-09-09 16:06:13 -05:00
Filip Wojciechowski
92e26ce1b1 better type for AppTree in NextPageContext (#8662)
* better type for AppTree in NextPageContext

* updated tests

* new AppTreeType type and updated tests

* removed a commented out line

* another take on the type of AppTree, with updated tests

* allow passing additional props to AppType

* Update suite name
2019-09-09 11:23:34 -05:00
Maël Nison
9fa8baa03a Uses the PnP API when available (#8668)
* Uses the PnP API when available

* Moves the resolution into an helper

* Update packages/next/lib/resolve-request.ts

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Apply Prettier
2019-09-09 11:47:42 -04:00
Joe Haddad
93d6a670fe
Resolve externals using webpack's context (#8669) 2019-09-08 13:53:33 -04:00
Joe Haddad
b10f797889
Re-enable anonymous telemetry (#8667) 2019-09-07 14:11:17 -04:00
Joe Haddad
3052a8ff92
Remove Telemetry Registration (#8664) 2019-09-07 10:51:09 -04:00
Joe Haddad
3000d71955 Add intl and Apollo to packages of interest (#8665) 2019-09-07 15:00:08 +02:00
JJ Kasper
e9ffb41462
Revert "Remove extra pages from export test" (#8658)
* Revert "Remove extra pages (#8651)"

This reverts commit 9546f9c3ac.

* Rename export error pages
2019-09-06 11:18:00 -05:00
Maël Nison
d3c1731c09 Adds the PnP plugin by default (#8653)
* Adds the PnP plugin by default

* Covers loaders

* Fixes linting
2019-09-06 09:49:38 -04:00
Lukáš Huvar
0c6c1f9e07 Fix yarn workspaces example (#8631)
* Add now.json to fix deploy

* Adjust now.json

* Fix next.config.js

* Update next.config.js

* Update examples/with-yarn-workspaces/now.json

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
2019-09-06 13:44:39 +02:00
Lukáš Huvar
9546f9c3ac Remove extra pages (#8651) 2019-09-06 13:05:38 +02:00
Joe Haddad
73b6c1e633
[docs] useRouter cannot be used with classes (#8649)
The `useRouter` function is a hook and cannot be used with Classes.

A few React beginners have brought this up, so we document the alternatives to hooks.
2019-09-05 23:05:59 -04:00
Joe Haddad
6444889c9b
Update Create Next App Template (#8648)
This updates the Create Next App template to remove the "Create Next App" card.

Instead, we now display cards to the docs, learn, and the examples.
2019-09-05 22:51:42 -04:00
Joe Haddad
319bc463e7
Mention Custom App GIP in UPGRADING (#8647)
This tells the user to check their custom <App> for `getInitialProps` if they previously copied the example.

This should help them leverage automatic static optimization!
2019-09-05 22:37:22 -04:00