1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
Commit graph

2998 commits

Author SHA1 Message Date
Kegan Myers 50c1251b85
Merge branch 'canary' into canary 2019-02-18 02:25:07 -06:00
Kegan Myers 94460eee55 Add 'unified' SSR compilation target 2019-02-17 23:48:33 -06:00
Timon Borter f9fedaeba6 recreate stdChannel (or saga middleware). (#6330) 2019-02-17 20:57:59 +01:00
Tim Neutkens 9f2eb85de3 v8.0.2-canary.3 2019-02-17 20:48:43 +01:00
Tim Neutkens a1ccc19a1f
Pass through arguments of the next cli correctly (#6327)
Arguments that held the same name as one of the default commands were filtered out, causing issues.

For example `next build build` would get rid of the second `build` parameter.

Fixes #6263
2019-02-17 20:13:10 +01:00
Tim Neutkens dd9811b206
Fix recursive hydration of next/dynamic (#6326)
Fixes #5347

The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of preload) but it would then show a hydration warning in development.

Thanks to @arthens for providing the reproduction that I modelled the tests after.
2019-02-17 19:52:00 +01:00
Ahmed Tarek 5cef35b811 Fix style importing (#6322) 2019-02-17 13:32:58 +01:00
Tim Neutkens 774af7fa0b v8.0.2-canary.2 2019-02-17 13:15:42 +01:00
Joshua Scott 46d870ab8a Fix url in docs (#6323) 2019-02-17 12:57:17 +01:00
Joe Haddad 7078f6567d Make build output friendlier (#6320)
Success:
![image](https://user-images.githubusercontent.com/616428/52907314-5e636480-322d-11e9-9420-b348663a3a7a.png)

Error:
![image](https://user-images.githubusercontent.com/616428/52907318-6c18ea00-322d-11e9-848d-e615d6af747d.png)

Warnings:
![image](https://user-images.githubusercontent.com/616428/52907353-2d376400-322e-11e9-9778-370f36912491.png)

---

We can still make build error output friendlier, but this is a good start.
2019-02-17 12:56:48 +01:00
Tim Neutkens 3882979236 v8.0.2-canary.1 2019-02-16 17:12:27 +01:00
Joe Haddad 56b1f81ace Fix development mode output (#6312)
* Remove usage of WebpackBar and Friendly Errors

* Add new clearConsole helper

* Add new simplified output for development mode

* Add an explicit bootstrapping mode

* Add missing returns

* Use existing output style

* Adjust first output to say Waiting on

* Only print URL if present
2019-02-16 17:09:49 +01:00
Tim Neutkens 036f5bf11b v8.0.2-canary.0 2019-02-16 16:41:30 +01:00
Tim Neutkens 708c537fc6 Merge branch 'master' into canary 2019-02-16 16:38:42 +01:00
JJ Kasper 5d779a0289 Add falling back to fetch based pinging for onDemandEntries (#6310)
After discussion, I added falling back to fetch based pinging when the WebSocket fails to connect. I also added an example of how to proxy the onDemandEntries WebSocket when using a custom server. Fixes: #6296
2019-02-15 22:22:21 +01:00
Connor Davis 1e5d0908d0 Block Certain Env Keys That Are Used Internally (#6260)
Closes: #6244 

This will block the following keys:
```
NODE_.+
__.+
```

There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
2019-02-15 17:49:40 +01:00
Timon Borter d2ef34429c push redux-saga to major release 1.0.1. (#6300) 2019-02-14 19:05:27 +01:00
Felix Mosheev 04ce3e7174 Use process.browser instead of env probing (#6286) 2019-02-14 19:05:08 +01:00
Joe Haddad 9bb8fbf535
Update webpack message formatter (#6299) 2019-02-14 11:13:35 -05:00
Tim Neutkens 4051ffcb01 [experimental] Rendering to AMP (#6218)
* Add initial AMP implementation

* Implement experimental feature flag

* Implement feedback from sbenz

* Add next/amp and `useAmp` hook

* Use /:path*/amp instead

* Add canonical

* Add amphtml tag

* Add ampEnabled for rel=“amphtml”

* Remove extra type
2019-02-14 10:22:57 -05:00
Joe Haddad 36946f9709
Remove lerna bootstrap (#6289) 2019-02-14 08:33:00 -05:00
Jonathan Reed 7dbe837ae4 fixes hashed statics readme (#6293)
# Description

* Fixes incorrect assertion of configuration file in the `with-hashed-statics` README as well as adds link to line for updating
2019-02-13 19:53:42 +01:00
Gary Meehan 126eb49867 Fix README links (#6284) 2019-02-13 10:53:04 -05:00
Tim Neutkens 7fd9cb440d v8.0.1 2019-02-13 09:31:49 +01:00
Tim Neutkens 77a5a6f91a v8.0.1-canary.0 2019-02-13 07:20:54 +01:00
Tim Neutkens 4fea345f5d Merge branch 'master' into canary
# Conflicts:
#	lerna.json
#	packages/next-server/package.json
#	packages/next/package.json
2019-02-13 07:19:58 +01:00
Truong Hoang Dung 10f41f5d47 Fix Docs (#6270)
Add options to customize webpack config section.
2019-02-13 07:08:41 +01:00
Joe Haddad f43e1a95f1
Set default Error status code to 404 (#6276)
* Set default `Error` status code to 404

This is an appropriate default behavior because:

1. When the server encounters an error, the `err` property is set.
2. When the client-side application crashes, the `err` property is set.

This means the "only" way to render the `/_error` page without an error
is when a page is not found (special condition).

Fixes #6243
Closes #5437

* Add new integration test for client side 404

* single quotes

* Remove unused variable

* Standard needs to go away

* Whoops

* Check for null status code in res and err

* Only check response for valid statusCode
2019-02-12 21:32:25 -05:00
Connor Davis 68db0992b6
v8.0.0-canary.24 2019-02-11 19:29:58 -06:00
Connor Davis bd249180c6
Fix Runtime Config in next export (#6258) 2019-02-11 19:28:47 -06:00
Joe Haddad 33b9ebc783 Add module as server fallback main field (#6256)
* Add `module` as server fallback main field

* Test that a module only package can be imported
2019-02-12 01:39:57 +01:00
Juan Olvera 23c9c0d624 Change anynymous functions to named functions on examples in the README.md file (#6255)
* convert export default anonymous functions into named functions

* change examples to function declaration and split export in classes

* change NextHead name to Head and rename component
2019-02-12 00:04:05 +01:00
Connor Davis e1056e32cf Add yarn check to test (#6257) 2019-02-11 23:26:42 +01:00
Spencer Elliott 4dd6094639 styled-components example: use a fragment for styles initial prop (#6252)
`initialProps.styles` is a React node, but not guaranteed to be an
array, so we can use a fragment to concatenate additional styles.

See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32932#issuecomment-462372319
2019-02-11 20:48:03 +01:00
Jason Miller 734513b9be Apply babel to .mjs files (#6253) 2019-02-11 18:59:24 +01:00
Juan Olvera 80cb91ec87 Add setup to run example with cookie authentication locally (#6101)
* extract request login from auth

* add clarification that the monorepo is for deploy in Now only and fix typo

* Refactor HOC

- add authorization to HOC
- add displayName to HOC
- remove unnecessary `run`s in local routing
2019-02-11 14:17:43 +01:00
Fredrik Höglund 2ab1ae7f61 Updated examples for build-time env configuration for v8 (#6237)
* Updated examples for build-time env configuration for v8

* Add comment to build time config example with how to include entire .env
2019-02-11 14:15:06 +01:00
Resi Respati 3746d7d90b [with-typescript] Fixed incorrect query type (#6238) 2019-02-11 10:32:10 +01:00
Tim Neutkens e4f96e65d3 v8.0.0 2019-02-11 09:02:37 +01:00
Tim Neutkens b31819fa50 Remove build directory 2019-02-11 08:57:47 +01:00
Tim Neutkens a2bb542f39 Allow publishing the master branch using Lerna 2019-02-11 08:44:28 +01:00
Tim Neutkens 7d6eb38f79 Merge branch 'canary' 2019-02-11 08:40:55 +01:00
Tim Neutkens 8ddf9c7f27 v8.0.0-canary.23 2019-02-11 08:28:49 +01:00
Tim Neutkens c9f4a956d4 Update yarn.lock 2019-02-11 08:28:22 +01:00
Tim Neutkens 163830c026 Merge branch 'canary'
# Conflicts:
#	examples/with-apollo-and-redux/README.md
#	examples/with-sentry/README.md
#	examples/with-sentry/package.json
#	examples/with-sentry/pages/_app.js
#	package.json
#	packages/next/build/webpack-config.js
#	packages/next/client/index.js
#	server/document.js
#	server/render.js
#	test/integration/production/test/index.test.js
2019-02-11 08:22:31 +01:00
Tim Neutkens 100b733960 v8.0.0-canary.22 2019-02-11 08:17:22 +01:00
Tim Neutkens 315a374298 Add new circleci config 2019-02-11 08:15:23 +01:00
Resi Respati f8a80f1aa9 [with-typescript] remove unnecessary passHref in Link components (#6233)
As per discussion in #6165, I removed the `passHref` in `Link` as
they're unnecessary.
2019-02-11 00:00:05 +01:00
Giuseppe ac0976affe Update styled-jsx (#6236)
Changelog https://github.com/zeit/styled-jsx/releases/tag/v3.2.1
2019-02-10 22:19:38 +01:00
Fredrik Höglund b05df70872 Fix first render of with-react-helmet example (#6235) 2019-02-10 20:48:13 +01:00