diff --git a/vendor/fetch/CODE_OF_CONDUCT.md b/vendor/fetch/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..d7eed177f --- /dev/null +++ b/vendor/fetch/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource+fetch@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/fetch/CONTRIBUTING.md b/vendor/fetch/CONTRIBUTING.md new file mode 100644 index 000000000..0129ce9be --- /dev/null +++ b/vendor/fetch/CONTRIBUTING.md @@ -0,0 +1,57 @@ +# Contributing + +Thank you for your interest in contributing to our `fetch` polyfill! + +Note that we only accept features that are also described in the official [fetch +specification][]. However, the aim of this project is not to implement the +complete specification; just the parts that are feasible to emulate using +XMLHttpRequest. See [Caveats][] for some examples of features that we are +unlikely to implement. + +Contributions to this project are [released][tos] to the public under the +[project's open source license](LICENSE). + +## Running tests + +Running `npm test` will: + +1. Build the `dist/` files; +1. Run the test suite in headless Chrome & Firefox; +1. Run the same test suite in Web Worker mode. + +When editing tests or implementation, keep `npm run karma` running: + +- You can connect additional browsers by navigating to `http://localhost:9876/`; +- Changes to [test.js](test/test.js) will automatically re-run the tests in all + connected browsers; +- When changing [fetch.js](fetch.js), re-run tests by executing `make`; +- Re-run specific tests with `./node_modules/.bin/karma run -- --grep=`. + +## Submitting a pull request + +1. [Fork][fork] and clone the repository; +1. Create a new branch: `git checkout -b my-branch-name`; +1. Make your change, push to your fork and [submit a pull request][pr]; +1. Pat your self on the back and wait for your pull request to be reviewed. + +Here are a few things you can do that will increase the likelihood of your pull +request being accepted: + +- Keep your change as focused as possible. If there are multiple changes you + would like to make that are not dependent upon each other, consider submitting + them as separate pull requests. +- Write a [good commit message][]. + +## Resources + +- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) +- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) +- [GitHub Help](https://help.github.com) + + + [fetch specification]: https://fetch.spec.whatwg.org + [tos]: https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license + [fork]: https://github.com/github/fetch/fork + [pr]: https://github.com/github/fetch/compare + [good commit message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html + [caveats]: https://github.github.io/fetch/#caveats diff --git a/vendor/fetch/README.md b/vendor/fetch/README.md new file mode 100644 index 000000000..06cbd90aa --- /dev/null +++ b/vendor/fetch/README.md @@ -0,0 +1,339 @@ +# window.fetch polyfill + +The `fetch()` function is a Promise-based mechanism for programmatically making +web requests in the browser. This project is a polyfill that implements a subset +of the standard [Fetch specification][], enough to make `fetch` a viable +replacement for most uses of XMLHttpRequest in traditional web applications. + +## Table of Contents + +* [Read this first](#read-this-first) +* [Installation](#installation) +* [Usage](#usage) + * [Importing](#importing) + * [HTML](#html) + * [JSON](#json) + * [Response metadata](#response-metadata) + * [Post form](#post-form) + * [Post JSON](#post-json) + * [File upload](#file-upload) + * [Caveats](#caveats) + * [Handling HTTP error statuses](#handling-http-error-statuses) + * [Sending cookies](#sending-cookies) + * [Receiving cookies](#receiving-cookies) + * [Obtaining the Response URL](#obtaining-the-response-url) + * [Aborting requests](#aborting-requests) +* [Browser Support](#browser-support) + +## Read this first + +* If you believe you found a bug with how `fetch` behaves in your browser, + please **don't open an issue in this repository** unless you are testing in + an old version of a browser that doesn't support `window.fetch` natively. + This project is a _polyfill_, and since all modern browsers now implement the + `fetch` function natively, **no code from this project** actually takes any + effect there. See [Browser support](#browser-support) for detailed + information. + +* If you have trouble **making a request to another domain** (a different + subdomain or port number also constitutes another domain), please familiarize + yourself with all the intricacies and limitations of [CORS][] requests. + Because CORS requires participation of the server by implementing specific + HTTP response headers, it is often nontrivial to set up or debug. CORS is + exclusively handled by the browser's internal mechanisms which this polyfill + cannot influence. + +* This project **doesn't work under Node.js environments**. It's meant for web + browsers only. You should ensure that your application doesn't try to package + and run this on the server. + +* If you have an idea for a new feature of `fetch`, **submit your feature + requests** to the [specification's repository](https://github.com/whatwg/fetch/issues). + We only add features and APIs that are part of the [Fetch specification][]. + +## Installation + +``` +npm install whatwg-fetch --save +``` + +As an alternative to using npm, you can obtain `fetch.umd.js` from the +[Releases][] section. The UMD distribution is compatible with AMD and CommonJS +module loaders, as well as loading directly into a page via `