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

Release v1.2.2 #5404

Closed
wants to merge 10 commits into from
13 changes: 13 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog

## [1.2.2](https://github.com/axios/axios/compare/v1.2.1...v1.2.2) (2022-12-23)


### Bug Fixes

* Add missing HttpStatusCode ([#5345](https://github.com/axios/axios/issues/5345)) ([56e9ca1](https://github.com/axios/axios/commit/56e9ca1a865099f75eb0e897e944883a36bddf48))
* fixed Brotli decompression; ([#5353](https://github.com/axios/axios/issues/5353)) ([1e58a65](https://github.com/axios/axios/commit/1e58a659ec9b0653f4693508d748caa5a41bb1a2))

### Contributors 🤵

- ![avatar](https://avatars.githubusercontent.com/u/12586868?v=4&s=16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) (2963++ / 45--)
- ![avatar](https://avatars.githubusercontent.com/u/1652293?v=4&s=16) [Winnie](https://github.com/winniehell) (78++ / 1--)

## [1.2.1] - 2022-12-05

### Changed
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "axios",
"main": "./dist/axios.js",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
Expand Down
88 changes: 84 additions & 4 deletions dist/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js.map

Large diffs are not rendered by default.

85 changes: 82 additions & 3 deletions dist/browser/axios.cjs
@@ -1,4 +1,4 @@
// Axios v1.2.1 Copyright (c) 2022 Matt Zabriskie and contributors
// Axios v1.2.2 Copyright (c) 2022 Matt Zabriskie and contributors
'use strict';

function bind(fn, thisArg) {
Expand Down Expand Up @@ -282,7 +282,11 @@ function findKey(obj, key) {
return null;
}

const _global = typeof self === "undefined" ? typeof global === "undefined" ? undefined : global : self;
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
})();

const isContextDefined = (context) => !isUndefined(context) && context !== _global;

Expand Down Expand Up @@ -1231,6 +1235,7 @@ const isStandardBrowserEnv = (() => {
const isStandardBrowserWebWorkerEnv = (() => {
return (
typeof WorkerGlobalScope !== 'undefined' &&
// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope &&
typeof self.importScripts === 'function'
);
Expand Down Expand Up @@ -2577,7 +2582,7 @@ function mergeConfig(config1, config2) {
return config;
}

const VERSION = "1.2.1";
const VERSION = "1.2.2";

const validators$1 = {};

Expand Down Expand Up @@ -3009,6 +3014,78 @@ function isAxiosError(payload) {
return utils.isObject(payload) && (payload.isAxiosError === true);
}

const HttpStatusCode = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
};

Object.entries(HttpStatusCode).forEach(([key, value]) => {
HttpStatusCode[value] = key;
});

var HttpStatusCode$1 = HttpStatusCode;

/**
* Create an instance of Axios
*
Expand Down Expand Up @@ -3070,6 +3147,8 @@ axios.AxiosHeaders = AxiosHeaders$1;

axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);

axios.HttpStatusCode = HttpStatusCode$1;

axios.default = axios;

module.exports = axios;
Expand Down
2 changes: 1 addition & 1 deletion dist/browser/axios.cjs.map

Large diffs are not rendered by default.