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

2714 commits

Author SHA1 Message Date
Tim Neutkens dd3b5bf81d v7.0.2-canary.36 2018-12-04 11:04:21 +01:00
Tim Neutkens d11a3aa34e
Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue

* Remove unneeded extra option

* Remove isomorphic-fetch
2018-12-04 10:59:12 +01:00
Peter Halasz 01b34bb784 Format no-document-title description (#5803) 2018-12-03 23:04:18 +01:00
Matheus Fernandes 977bf8d9eb Zeit -> ZEIT (#5804) 2018-12-03 23:01:23 +01:00
Tim Neutkens 082db2877d v7.0.2-canary.35 2018-12-03 19:50:59 +01:00
Tim Neutkens 2d31404d07 Add license to the root directory 2018-12-03 19:49:18 +01:00
Jess Telford 2f3b0c4de6 MDX example app (#5796)
Example deployment on now v2: https://nextjswith-mdxexample-r8b1vzjbn.now.sh
2018-12-03 19:41:12 +01:00
Tim Neutkens f79230db33
Change module resolution extensions (#5801)
Same as https://github.com/zeit/ncc/pull/80
2018-12-03 19:36:24 +01:00
Matthew Lilley cefbb84230 Fix for locale.split is not a function. (#5794)
* Fix for locale.split is not a function.

Following from https://github.com/zeit/next.js/pull/5488

- Renamed languages to supportedLanguages
- Firstly, accept languages based on supportedLanguages
- And finally, accept a single language, if it returns false, the default of 'en' is used.

I looked at the navigator library, which is used by 'accept', this should be a more solid solution, since we can now know that `const locale` is always a string.

// Before (Sometimes returns an array as `const local`)
const locale = accept.language(languages) || 'en' 

// After (Always returns a string)
const locale = accept.language(accept.languages(supportedLanguages)) || 'en';

* Update server.js

Update variable name.
2018-12-03 09:10:31 -08:00
Tim Neutkens 9890e06907
Dedupe only items with unique key (#5800)
Fixes #3705
Fixes #4656

- No longer automatically dedupe certain tags. Only the ones we know are *never* going to be duplicate like charSet, title etc.
- Fix `key=""` behavior, making sure that if a unique key is provided tags are deduped based on that.

For example:

```jsx
<meta property='fb:pages' content='one'>
<meta property='fb:pages' content='two'>
```

Would currently cause

```jsx
<meta property='fb:pages' content='two'>
```

### After this change:

```jsx
<meta property='fb:pages' content='one'>
<meta property='fb:pages' content='two'>
```

Then if you use next/head multiple times / want to be able to override:

```jsx
<meta property='fb:pages' content='one' key="not-unique-key">
<meta property='fb:pages' content='two' key="not-unique-key">
```

Would cause:

```jsx
<meta property='fb:pages' content='two'>
```

As `key` gets deduped correctly after this PR, similar to how React itself works.
2018-12-03 17:28:42 +01:00
Tim Neutkens 58f5dd297a
Add Typescript types for builds functions (#5791) 2018-12-03 14:18:52 +01:00
Tim Neutkens a9cf735f50
Convert babel plugins to typescript (#5789)
Slowly moving files over 💯
2018-12-02 18:30:00 +01:00
Luc e43d21fdf0 remove occurence of deprecated url prop in readme (#5786) 2018-12-01 21:11:06 +01:00
Tim Neutkens a66e1c0d7c v7.0.2-canary.34 2018-11-30 19:51:54 +01:00
Tim Neutkens e5002234d0
Transpile imports if module has module.exports (#5780)
Fixes #5778
Fixes #3650
2018-11-30 17:56:07 +01:00
Tim Neutkens 633dd87b18
Handle 404 thrown from send (#5779) 2018-11-30 17:09:23 +01:00
Tim Neutkens 4322bb13dd
Build / watch .ts core files (#5776) 2018-11-30 13:10:30 +01:00
Steven Bell af1d10c941 update with-emotion example to emotion 10 (#5770) 2018-11-29 20:12:25 +01:00
Tim Neutkens f1fe237ba8 v7.0.2-canary.33 2018-11-29 19:33:20 +01:00
Tim Neutkens 86d144b639 Temporarily disable sass test 2018-11-29 19:23:00 +01:00
Tim Neutkens 1c64e59564 v7.0.2-canary.32 2018-11-29 12:36:48 +01:00
Tim Neutkens 55e89e759a
Fix polyfill for ie11 (#5763)
* Fix polyfill for ie11

* Use esmodules only when using webpack
2018-11-29 12:36:03 +01:00
Jan Mühlemann 09a8960f1a Add next-i18next as the solution to integrate i18next into next.js (#5761)
* replace all i18next related examples with the recommended next-i18next module

* update readme
2018-11-28 20:39:54 +01:00
garnerp c5630d3bc5 Fix with-babel-macros by upgrading packages (#5762)
Added next/babel in .babelrc
Upgraded babel-macros to babel-plugin-macros
Upgraded preval.macro
2018-11-28 20:34:46 +01:00
Tim Neutkens c1037949fd v7.0.2-canary.31 2018-11-28 17:55:37 +01:00
Tim Neutkens fb92fdef54
Make sure const/async is transpiled (#5760)
* Make sure const/async is transpiled

* Use babel common compilation instead
2018-11-28 17:53:49 +01:00
Ståle Pettersen 4594b7cb07 Remove secret from 'publicRuntimeConfig' example (#5759) 2018-11-28 15:29:41 +01:00
Tim Neutkens af893bf740 v7.0.2-canary.30 2018-11-28 15:12:43 +01:00
Tim Neutkens 15bb1c5e79
Use Typescript to transpile Next.js core files instead of Babel (#5747)
- Replaces taskr-babel with taskr-typescript for the `next` package
- Makes sure Node 8+ is used, no unneeded transpilation
- Compile Next.js client side files through babel the same way pages are
- Compile Next.js client side files to esmodules, not commonjs, so that tree shaking works.
- Move error-debug.js out of next-server as it's only used/require in development
- Drop ansi-html as dependency from next-server
- Make next/link esmodule (for tree-shaking)
- Make next/router esmodule (for tree-shaking)
- add typescript compilation to next-server
- Remove last remains of Flow
- Move hoist-non-react-statics to next, out of next-server
- Move htmlescape to next, out of next-server
- Remove runtime-corejs2 from next-server
2018-11-28 15:03:02 +01:00
Tim Neutkens c801a96631 v7.0.2-canary.29 2018-11-27 22:21:00 +01:00
Tim Neutkens 08e3396574
Fix graphql issue with lambdas flag (#5755)
Fixes https://spectrum.chat/?t=604f6aa6-23f2-4358-8b0b-14e5810178dc
2018-11-27 22:20:13 +01:00
Tim Neutkens 818cf8e77a v7.0.2-canary.28 2018-11-27 12:39:07 +01:00
Anderson Leite 48d3ae2dd6 Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred"
2018-11-27 12:28:34 +01:00
Tim Neutkens 9d30e411b5
Fallback to <script> loading behavior when preload is not supported (#5744)
Based on https://github.com/zeit/next.js/pull/5737#discussion_r236059295

This will cause a warning in chrome/safari after 3s
2018-11-26 23:58:40 +01:00
Isaac Hinman c178e98a67 Move with-i18next example to external repo (#5743) 2018-11-25 19:25:33 +01:00
Voon Ming Hann e3c7d3fdb8 firebase cloud messaging example (#5689) 2018-11-25 16:37:34 +01:00
Ting-Hsiang Hsu 21d5aebd53 feat(example): add react-relay-network-modern example (#5349)
In this example, we can:
- `QueryRenderer` SSR
- caching the data
- use the feature of `react-relay-network-modern` which is the powerful tool for `relay-modern`

I copy the example `with-relay-modern`, but I just modified the code. Some detail are not modified.
If you think this example is needed, I will fix those. Otherwise, close this **PR** to let me know this example is not needed.
2018-11-25 15:14:36 +01:00
Obed Marquez Parlapiano b63487c331 Update with-firebase-auth example (#5742)
- The with-firebase-auth example won't run unless a database with proper rules is created first. 
- Add a small error callback to addDbListener to help with debugging if someone's database connection doesn't work.
2018-11-25 14:57:15 +01:00
Anderson Leite d6d9dd1e42 Tests for "ssr: true" on dynamic pages (#5728)
**What's this PR?**
Based on the feedback on [this PR](https://github.com/zeit/next.js/pull/5722) @timneutkens asked me to create a test for `ssr: true`

**What's it do?**

- adds a test for setting `ssr: true` - /basic
- adds a test for setting `ssr: true` - /production
2018-11-25 01:11:25 +01:00
Tim Neutkens 9f03fad5e9 v7.0.2-canary.27 2018-11-25 00:57:02 +01:00
Tim Neutkens cad19c808c
Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching

Fixes #5734

* Fix unit tests for router

* Add test for prefetch

* Rename test

* Check all logs for message
2018-11-25 00:47:39 +01:00
Hozefa 401594ed36 remove glamorous example since its no longer maintained (#5738)
Since glamorous is [no longer maintained](https://github.com/paypal/glamorous#status-unmaintained) removing it from readme.
2018-11-23 21:18:13 +01:00
Matt Jewell 7076727d3e Fix location of production server file (#5731)
(At least with my set up, mac osx, node 10.13.0, yarn 1.12.1)

Couldn't get the server to start with `npm start`, this appears to fix that
2018-11-22 16:55:47 +01:00
Richard Park 44d661af67 Upgrade to webpack@4.26 (#5729)
* Upgrade terser-webpack-plugin

* Upgrade webpack

* Extract common terserPluginConfig
2018-11-22 10:14:14 +01:00
Vagisha Nidhi d43d305092 Test reports are not being published to Azure Pipelines (#5715)
This PR is related to the issue #5713 
The PR helps to publish test results for reporting in Azure Pipelines.

Azure Pipelines provides excellent reporting capabilities that can be leveraged by this PR.
An example report is shown in the image below.
![image](https://user-images.githubusercontent.com/13175100/48767951-e8a73580-ecdd-11e8-8e6a-20d7767d7c1b.png)
2018-11-22 10:12:12 +01:00
Tim Neutkens 9b2782a6d0
Add engines to next and next-server (#5724) 2018-11-21 21:56:24 +01:00
Tim Neutkens c2eaf26ea9
Remove flow types (#5704)
* Remove flow-typed

* Remove flow types

* Remove the last types

* Bring back taskr dependency

* Revert "Bring back taskr dependency"

This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.

* Bring back preset-flow as it’s used for tests

* Revert "Revert "Bring back taskr dependency""

This reverts commit b4c933ef133f4039f544fb10bf31d5c95d3b27a2.
2018-11-21 16:04:37 +01:00
Darryl f177be9e05 Fix bug report with-portals example #5694 (#5714)
I'm trying to contribute on resolving issues,
hope this help.

Fixes #5694
2018-11-21 09:25:00 +01:00
Curran Kelleher 19db04f302 Iterate wording in documentation (#5718)
I came across **Possible spelling mistakes** #5496 and noticed that the current wording could be improved both in terms of accuracy and succinctness.
2018-11-21 01:57:51 +01:00
Anderson Leite 8af767b52d Refactor readBuildId. (#5720) 2018-11-21 01:56:11 +01:00