diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/isomorphic-fetch | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/isomorphic-fetch')
-rw-r--r-- | node_modules/isomorphic-fetch/.editorconfig | 12 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/.jshintrc | 5 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/.npmignore | 2 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/.travis.yml | 15 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/README.md | 45 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/bower.json | 7 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/fetch-bower.js | 1 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/fetch-npm-browserify.js | 6 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/fetch-npm-node.js | 16 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/package.json | 34 | ||||
-rw-r--r-- | node_modules/isomorphic-fetch/test/api.test.js | 51 |
12 files changed, 0 insertions, 215 deletions
diff --git a/node_modules/isomorphic-fetch/.editorconfig b/node_modules/isomorphic-fetch/.editorconfig deleted file mode 100644 index 7bfa0f2d7..000000000 --- a/node_modules/isomorphic-fetch/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root=true - -[*] -end_of_line = lf -insert_final_newline = true - -[*.js] -indent_style = tab - -[*.json] -indent_style = space -indent_size = 2 diff --git a/node_modules/isomorphic-fetch/.jshintrc b/node_modules/isomorphic-fetch/.jshintrc deleted file mode 100644 index 3686db75a..000000000 --- a/node_modules/isomorphic-fetch/.jshintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "node": true, - "browser": true, - "predef": ["describe", "it", "before"] -} diff --git a/node_modules/isomorphic-fetch/.npmignore b/node_modules/isomorphic-fetch/.npmignore deleted file mode 100644 index 5bbff155f..000000000 --- a/node_modules/isomorphic-fetch/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules/ -/bower_components/ diff --git a/node_modules/isomorphic-fetch/.travis.yml b/node_modules/isomorphic-fetch/.travis.yml deleted file mode 100644 index 225affa5f..000000000 --- a/node_modules/isomorphic-fetch/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" -before_deploy: - - npm-prepublish --verbose -deploy: - provider: npm - email: matt@mattandre.ws - api_key: - secure: eEeb1aG7phF4X5z+CQ3yzTdXtHf71Dk4ec6v5iAjRYNh/s6GLxfZS7c4qocZI8YXW3YmmsJR5zGZ2l88k2iqTtlBn0Mrp6ytwIa/jO00kDpR8V11eW9i47KRQq25eA1YW+SrLM5V/fh+s9u3VU7jhbax5eeViqVdwORI85kZrZE= - on: - all_branches: true - tags: true - repo: matthew-andrews/isomorphic-fetch diff --git a/node_modules/isomorphic-fetch/LICENSE b/node_modules/isomorphic-fetch/LICENSE deleted file mode 100644 index 2385aa966..000000000 --- a/node_modules/isomorphic-fetch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Matt Andrews - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/isomorphic-fetch/README.md b/node_modules/isomorphic-fetch/README.md deleted file mode 100644 index 270a3e396..000000000 --- a/node_modules/isomorphic-fetch/README.md +++ /dev/null @@ -1,45 +0,0 @@ -isomorphic-fetch [](https://travis-ci.org/matthew-andrews/isomorphic-fetch) -================ - -Fetch for node and Browserify. Built on top of [GitHub's WHATWG Fetch polyfill](https://github.com/github/fetch). - -## Warnings - -- This adds `fetch` as a global so that its API is consistent between client and server. -- You must bring your own ES6 Promise compatible polyfill, I suggest [es6-promise](https://github.com/jakearchibald/es6-promise). - -## Installation - -### NPM - -```sh -npm install --save isomorphic-fetch es6-promise -``` - -### Bower - -```sh -bower install --save isomorphic-fetch es6-promise -``` - -## Usage - -```js -require('es6-promise').polyfill(); -require('isomorphic-fetch'); - -fetch('//offline-news-api.herokuapp.com/stories') - .then(function(response) { - if (response.status >= 400) { - throw new Error("Bad response from server"); - } - return response.json(); - }) - .then(function(stories) { - console.log(stories); - }); -``` - -## License - -All open source code released by FT Labs is licenced under the MIT licence. Based on [the fine work by](https://github.com/github/fetch/pull/31) **[jxck](https://github.com/Jxck)**. diff --git a/node_modules/isomorphic-fetch/bower.json b/node_modules/isomorphic-fetch/bower.json deleted file mode 100644 index dcefb046e..000000000 --- a/node_modules/isomorphic-fetch/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "isomorphic-fetch", - "main": ["fetch-bower.js"], - "dependencies": { - "fetch": "github/fetch#>=0.10.0" - } -} diff --git a/node_modules/isomorphic-fetch/fetch-bower.js b/node_modules/isomorphic-fetch/fetch-bower.js deleted file mode 100644 index 557a2fe43..000000000 --- a/node_modules/isomorphic-fetch/fetch-bower.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('fetch'); diff --git a/node_modules/isomorphic-fetch/fetch-npm-browserify.js b/node_modules/isomorphic-fetch/fetch-npm-browserify.js deleted file mode 100644 index 7f16e2319..000000000 --- a/node_modules/isomorphic-fetch/fetch-npm-browserify.js +++ /dev/null @@ -1,6 +0,0 @@ -// the whatwg-fetch polyfill installs the fetch() function -// on the global object (window or self) -// -// Return that as the export for use in Webpack, Browserify etc. -require('whatwg-fetch'); -module.exports = self.fetch.bind(self); diff --git a/node_modules/isomorphic-fetch/fetch-npm-node.js b/node_modules/isomorphic-fetch/fetch-npm-node.js deleted file mode 100644 index bbd3dd1da..000000000 --- a/node_modules/isomorphic-fetch/fetch-npm-node.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -var realFetch = require('node-fetch'); -module.exports = function(url, options) { - if (/^\/\//.test(url)) { - url = 'https:' + url; - } - return realFetch.call(this, url, options); -}; - -if (!global.fetch) { - global.fetch = module.exports; - global.Response = realFetch.Response; - global.Headers = realFetch.Headers; - global.Request = realFetch.Request; -} diff --git a/node_modules/isomorphic-fetch/package.json b/node_modules/isomorphic-fetch/package.json deleted file mode 100644 index 85196b125..000000000 --- a/node_modules/isomorphic-fetch/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "isomorphic-fetch", - "version": "2.2.1", - "description": "Isomorphic WHATWG Fetch API, for Node & Browserify", - "browser": "fetch-npm-browserify.js", - "main": "fetch-npm-node.js", - "scripts": { - "files": "find . -name '*.js' ! -path './node_modules/*' ! -path './bower_components/*'", - "test": "jshint `npm run -s files` && lintspaces -i js-comments -e .editorconfig `npm run -s files` && mocha" - }, - "repository": { - "type": "git", - "url": "https://github.com/matthew-andrews/isomorphic-fetch.git" - }, - "author": "Matt Andrews <matt@mattandre.ws>", - "license": "MIT", - "bugs": { - "url": "https://github.com/matthew-andrews/isomorphic-fetch/issues" - }, - "homepage": "https://github.com/matthew-andrews/isomorphic-fetch/issues", - "dependencies": { - "node-fetch": "^1.0.1", - "whatwg-fetch": ">=0.10.0" - }, - "devDependencies": { - "chai": "^1.10.0", - "es6-promise": "^2.0.1", - "jshint": "^2.5.11", - "lintspaces-cli": "0.0.4", - "mocha": "^2.1.0", - "nock": "^0.56.0", - "npm-prepublish": "^1.0.2" - } -} diff --git a/node_modules/isomorphic-fetch/test/api.test.js b/node_modules/isomorphic-fetch/test/api.test.js deleted file mode 100644 index c25a5cbe8..000000000 --- a/node_modules/isomorphic-fetch/test/api.test.js +++ /dev/null @@ -1,51 +0,0 @@ -/*global fetch*/ -"use strict"; - -require('es6-promise').polyfill(); -require('../fetch-npm-node'); -var expect = require('chai').expect; -var nock = require('nock'); -var good = 'hello world. 你好世界。'; -var bad = 'good bye cruel world. 再见残酷的世界。'; - -function responseToText(response) { - if (response.status >= 400) throw new Error("Bad server response"); - return response.text(); -} - -describe('fetch', function() { - - before(function() { - nock('https://mattandre.ws') - .get('/succeed.txt') - .reply(200, good); - nock('https://mattandre.ws') - .get('/fail.txt') - .reply(404, bad); - }); - - it('should be defined', function() { - expect(fetch).to.be.a('function'); - }); - - it('should facilitate the making of requests', function(done) { - fetch('//mattandre.ws/succeed.txt') - .then(responseToText) - .then(function(data) { - expect(data).to.equal(good); - done(); - }) - .catch(done); - }); - - it('should do the right thing with bad requests', function(done) { - fetch('//mattandre.ws/fail.txt') - .then(responseToText) - .catch(function(err) { - expect(err.toString()).to.equal("Error: Bad server response"); - done(); - }) - .catch(done); - }); - -}); |