Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace isomorphic-fetch dependency by fetch-everywhere #1043

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"btoa": "1.1.2",
"deep-extend": "^0.4.1",
"fast-json-patch": "^1.1.8",
"isomorphic-fetch": "2.2.1",
"fetch-everywhere": "^1.0.2",
"isomorphic-form-data": "0.0.1",
"js-yaml": "^3.8.1",
"lodash": "4.16.2",
Expand Down
2 changes: 1 addition & 1 deletion src/http.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fetch from 'isomorphic-fetch'
import fetch from 'fetch-everywhere'
import qs from 'qs'
import jsYaml from 'js-yaml'
import assign from 'lodash/assign'
Expand Down
2 changes: 1 addition & 1 deletion src/specmap/lib/refs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fetch from 'isomorphic-fetch'
import fetch from 'fetch-everywhere'
import url from 'url'
import lib from '../lib'
import createError from '../lib/create-error'
Expand Down
12 changes: 6 additions & 6 deletions test/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ describe('http', () => {
describe('serializeHeaders', function () {
it('should handle FetchAPI Headers object, which is iterable', function () {
// Given
// isomorphic-fetch exposes FetchAPI methods onto global
require('isomorphic-fetch')
// fetch-everywhere exposes FetchAPI methods onto global
require('fetch-everywhere')
expect(global.Headers).toBeA(Function)
const headers = new Headers()
headers.append('Authorization', 'Basic hoop-la')
Expand All @@ -121,8 +121,8 @@ describe('http', () => {

it('should handle two of the same headers', function () {
// Given
// isomorphic-fetch exposes FetchAPI methods onto global
require('isomorphic-fetch')
// fetch-everywhere exposes FetchAPI methods onto global
require('fetch-everywhere')
expect(global.Headers).toBeA(Function)
const headers = new Headers()
headers.append('Authorization', 'Basic hoop-la')
Expand All @@ -139,8 +139,8 @@ describe('http', () => {

it('should handle multiple headers', function () {
// Given
// isomorphic-fetch exposes FetchAPI methods onto global
require('isomorphic-fetch')
// fetch-everywhere exposes FetchAPI methods onto global
require('fetch-everywhere')
expect(global.Headers).toBeA(Function)
const headers = new Headers()
headers.append('Authorization', 'Basic hoop-la')
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('constructor', () => {

it('should serialize the response', function () {
// Given
require('isomorphic-fetch') // To ensure global.Headers
require('fetch-everywhere') // To ensure global.Headers
const xapp = xmock().get('https://swagger.io/one', function (req, res, next) {
res.set('hi', 'ho')
return res.send({me: true})
Expand Down