From b41d177609d3211278ac1ae6a059fbfbc47951ee Mon Sep 17 00:00:00 2001 From: Leonardo Quixada Date: Sat, 4 Nov 2017 12:05:16 -0200 Subject: [PATCH] Dropped isomorphic-fetch in examples in favor of isomorphic-unfetch. (#3230) --- examples/data-fetch/package.json | 2 +- examples/data-fetch/pages/index.js | 2 +- examples/data-fetch/pages/preact.js | 2 +- examples/with-apollo-and-redux/lib/initApollo.js | 2 +- examples/with-apollo-and-redux/package.json | 2 +- examples/with-apollo-auth/lib/init-apollo.js | 2 +- examples/with-apollo-auth/package.json | 2 +- examples/with-apollo/lib/initApollo.js | 2 +- examples/with-apollo/package.json | 2 +- examples/with-firebase-authentication/package.json | 2 +- examples/with-firebase-authentication/pages/index.js | 2 +- examples/with-freactal/githubApi.js | 2 +- examples/with-freactal/package.json | 2 +- examples/with-i18next/package.json | 2 +- examples/with-i18next/tools/translationHelpers.js | 2 +- examples/with-redux-saga/package.json | 2 +- examples/with-redux-saga/saga.js | 2 +- examples/with-relay-modern/lib/createRelayEnvironment.js | 2 +- examples/with-relay-modern/package.json | 2 +- examples/with-socket.io/package.json | 2 +- examples/with-socket.io/pages/index.js | 2 +- examples/with-static-export/next.config.js | 2 +- examples/with-static-export/package.json | 2 +- examples/with-static-export/pages/index.js | 2 +- examples/with-static-export/pages/post.js | 2 +- readme.md | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/data-fetch/package.json b/examples/data-fetch/package.json index 1cfc9e39..2c4ab668 100644 --- a/examples/data-fetch/package.json +++ b/examples/data-fetch/package.json @@ -7,7 +7,7 @@ "start": "next start" }, "dependencies": { - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "react": "^16.0.0", "react-dom": "^16.0.0" diff --git a/examples/data-fetch/pages/index.js b/examples/data-fetch/pages/index.js index b78fc031..3c8eb4d3 100644 --- a/examples/data-fetch/pages/index.js +++ b/examples/data-fetch/pages/index.js @@ -1,7 +1,7 @@ import React from 'react' import Link from 'next/link' -import 'isomorphic-fetch' +import 'isomorphic-unfetch' export default class MyPage extends React.Component { static async getInitialProps () { diff --git a/examples/data-fetch/pages/preact.js b/examples/data-fetch/pages/preact.js index 439514cf..dc3455ef 100644 --- a/examples/data-fetch/pages/preact.js +++ b/examples/data-fetch/pages/preact.js @@ -1,7 +1,7 @@ import React from 'react' import Link from 'next/link' -import 'isomorphic-fetch' +import 'isomorphic-unfetch' export default class MyPage extends React.Component { static async getInitialProps () { diff --git a/examples/with-apollo-and-redux/lib/initApollo.js b/examples/with-apollo-and-redux/lib/initApollo.js index d7f8c199..eab7a6ac 100644 --- a/examples/with-apollo-and-redux/lib/initApollo.js +++ b/examples/with-apollo-and-redux/lib/initApollo.js @@ -1,5 +1,5 @@ import { ApolloClient, createNetworkInterface } from 'react-apollo' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' let apolloClient = null diff --git a/examples/with-apollo-and-redux/package.json b/examples/with-apollo-and-redux/package.json index 97e94523..b9539347 100644 --- a/examples/with-apollo-and-redux/package.json +++ b/examples/with-apollo-and-redux/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "graphql": "^0.9.3", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "prop-types": "^15.5.8", "react": "^16.0.0", diff --git a/examples/with-apollo-auth/lib/init-apollo.js b/examples/with-apollo-auth/lib/init-apollo.js index 70002034..77fcff8b 100644 --- a/examples/with-apollo-auth/lib/init-apollo.js +++ b/examples/with-apollo-auth/lib/init-apollo.js @@ -1,5 +1,5 @@ import { ApolloClient, createNetworkInterface } from 'react-apollo' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' let apolloClient = null diff --git a/examples/with-apollo-auth/package.json b/examples/with-apollo-auth/package.json index c03fedca..423f13e0 100644 --- a/examples/with-apollo-auth/package.json +++ b/examples/with-apollo-auth/package.json @@ -12,7 +12,7 @@ "dependencies": { "cookie": "^0.3.1", "graphql": "^0.9.3", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "prop-types": "^15.5.10", "react": "^15.5.4", diff --git a/examples/with-apollo/lib/initApollo.js b/examples/with-apollo/lib/initApollo.js index 5b315f92..b5d7861e 100644 --- a/examples/with-apollo/lib/initApollo.js +++ b/examples/with-apollo/lib/initApollo.js @@ -1,7 +1,7 @@ import { ApolloClient } from 'apollo-client' import { HttpLink } from 'apollo-link-http' import { InMemoryCache } from 'apollo-cache-inmemory' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' let apolloClient = null diff --git a/examples/with-apollo/package.json b/examples/with-apollo/package.json index 2e3bdbe1..0aa1a110 100644 --- a/examples/with-apollo/package.json +++ b/examples/with-apollo/package.json @@ -11,7 +11,7 @@ "graphql": "^0.11.7", "graphql-anywhere": "^3.1.0", "graphql-tag": "^2.5.0", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "prop-types": "^15.5.8", "react": "^16.0.0", diff --git a/examples/with-firebase-authentication/package.json b/examples/with-firebase-authentication/package.json index 81a9a979..e2e632a3 100644 --- a/examples/with-firebase-authentication/package.json +++ b/examples/with-firebase-authentication/package.json @@ -12,7 +12,7 @@ "express-session": "^1.15.2", "firebase": "^3.7.5", "firebase-admin": "^4.2.0", - "isomorphic-fetch": "2.2.1", + "isomorphic-unfetch": "2.0.0", "next": "latest", "react": "^16.0.0", "react-dom": "^16.0.0", diff --git a/examples/with-firebase-authentication/pages/index.js b/examples/with-firebase-authentication/pages/index.js index 7d26d1ae..fc4975aa 100644 --- a/examples/with-firebase-authentication/pages/index.js +++ b/examples/with-firebase-authentication/pages/index.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' import firebase from 'firebase' -import 'isomorphic-fetch' +import 'isomorphic-unfetch' import clientCredentials from '../credentials/client' export default class Index extends Component { diff --git a/examples/with-freactal/githubApi.js b/examples/with-freactal/githubApi.js index 516740bf..df8412fc 100644 --- a/examples/with-freactal/githubApi.js +++ b/examples/with-freactal/githubApi.js @@ -1,5 +1,5 @@ /* global fetch */ -import 'isomorphic-fetch' +import 'isomorphic-unfetch' const API_BASE_URL = 'https://api.github.com' diff --git a/examples/with-freactal/package.json b/examples/with-freactal/package.json index e2807448..4ed9c274 100644 --- a/examples/with-freactal/package.json +++ b/examples/with-freactal/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "freactal": "^1.1.1", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "react": "^16.0.0", "react-dom": "^16.0.0" diff --git a/examples/with-i18next/package.json b/examples/with-i18next/package.json index fef7b33e..96337414 100644 --- a/examples/with-i18next/package.json +++ b/examples/with-i18next/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "i18next": "^7.1.3", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "react": "^16.0.0", "react-dom": "^16.0.0", diff --git a/examples/with-i18next/tools/translationHelpers.js b/examples/with-i18next/tools/translationHelpers.js index cdadf0b3..52c0870f 100644 --- a/examples/with-i18next/tools/translationHelpers.js +++ b/examples/with-i18next/tools/translationHelpers.js @@ -1,5 +1,5 @@ /* global fetch */ -import 'isomorphic-fetch' +import 'isomorphic-unfetch' /** * Fetch translation file(s). diff --git a/examples/with-redux-saga/package.json b/examples/with-redux-saga/package.json index 0414ddf4..22346393 100644 --- a/examples/with-redux-saga/package.json +++ b/examples/with-redux-saga/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "es6-promise": "4.1.1", - "isomorphic-fetch": "2.2.1", + "isomorphic-unfetch": "2.0.0", "next": "latest", "next-redux-saga": "1.0.1", "next-redux-wrapper": "1.2.0", diff --git a/examples/with-redux-saga/saga.js b/examples/with-redux-saga/saga.js index f9f80892..b917c3af 100644 --- a/examples/with-redux-saga/saga.js +++ b/examples/with-redux-saga/saga.js @@ -3,7 +3,7 @@ import {delay} from 'redux-saga' import {all, call, put, take, takeLatest} from 'redux-saga/effects' import es6promise from 'es6-promise' -import 'isomorphic-fetch' +import 'isomorphic-unfetch' import {actionTypes, failure, loadDataSuccess, tickClock} from './actions' diff --git a/examples/with-relay-modern/lib/createRelayEnvironment.js b/examples/with-relay-modern/lib/createRelayEnvironment.js index ce93bd2d..c1da6aa5 100644 --- a/examples/with-relay-modern/lib/createRelayEnvironment.js +++ b/examples/with-relay-modern/lib/createRelayEnvironment.js @@ -1,5 +1,5 @@ import { Environment, Network, RecordSource, Store } from 'relay-runtime' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' let relayEnvironment = null diff --git a/examples/with-relay-modern/package.json b/examples/with-relay-modern/package.json index 06ff36b9..d1420fea 100644 --- a/examples/with-relay-modern/package.json +++ b/examples/with-relay-modern/package.json @@ -15,7 +15,7 @@ "dependencies": { "dotenv": "^4.0.0", "dotenv-webpack": "^1.5.4", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "^3.0.3", "react": "^15.6.1", "react-dom": "^15.6.1", diff --git a/examples/with-socket.io/package.json b/examples/with-socket.io/package.json index 958ec79f..0aa86fe4 100644 --- a/examples/with-socket.io/package.json +++ b/examples/with-socket.io/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "dependencies": { "express": "^4.15.2", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "latest", "react": "^16.0.0", "react-dom": "^16.0.0", diff --git a/examples/with-socket.io/pages/index.js b/examples/with-socket.io/pages/index.js index 80251f54..acfcdd79 100644 --- a/examples/with-socket.io/pages/index.js +++ b/examples/with-socket.io/pages/index.js @@ -1,6 +1,6 @@ import { Component } from 'react' import io from 'socket.io-client' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' class HomePage extends Component { // fetch old messages data from the server diff --git a/examples/with-static-export/next.config.js b/examples/with-static-export/next.config.js index b4768999..ab0ac1cf 100644 --- a/examples/with-static-export/next.config.js +++ b/examples/with-static-export/next.config.js @@ -1,4 +1,4 @@ -const fetch = require('isomorphic-fetch') +const fetch = require('isomorphic-unfetch') module.exports = { async exportPathMap () { diff --git a/examples/with-static-export/package.json b/examples/with-static-export/package.json index e7f4ec6c..56ef1e9e 100644 --- a/examples/with-static-export/package.json +++ b/examples/with-static-export/package.json @@ -2,7 +2,7 @@ "main": "server.js", "dependencies": { "express": "^4.15.3", - "isomorphic-fetch": "^2.2.1", + "isomorphic-unfetch": "^2.0.0", "next": "beta", "react": "^15.5.4", "react-dom": "^15.5.4", diff --git a/examples/with-static-export/pages/index.js b/examples/with-static-export/pages/index.js index 5f2af574..800e7d9a 100644 --- a/examples/with-static-export/pages/index.js +++ b/examples/with-static-export/pages/index.js @@ -1,6 +1,6 @@ import { Component } from 'react' import Head from 'next/head' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' import Post from '../components/post' diff --git a/examples/with-static-export/pages/post.js b/examples/with-static-export/pages/post.js index fde37ba8..72ec1ccb 100644 --- a/examples/with-static-export/pages/post.js +++ b/examples/with-static-export/pages/post.js @@ -1,7 +1,7 @@ import { Component } from 'react' import Link from 'next/link' import Head from 'next/head' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' export default class extends Component { static async getInitialProps ({ query }) { diff --git a/readme.md b/readme.md index 520d0785..a827f46f 100644 --- a/readme.md +++ b/readme.md @@ -893,7 +893,7 @@ If you want to render the built-in error page you can by using `next/error`: ```jsx import React from 'react' import Error from 'next/error' -import fetch from 'isomorphic-fetch' +import fetch from 'isomorphic-unfetch' export default class Page extends React.Component { static async getInitialProps() {