axios 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of axios might be problematic. Click here for more details.

package/karma.conf.cjs DELETED
@@ -1,250 +0,0 @@
1
- /* eslint-disable no-console */
2
- /* eslint-disable no-unused-vars */
3
- /* eslint-disable func-names */
4
- // Karma configuration
5
- // Generated on Fri Aug 15 2014 23:11:13 GMT-0500 (CDT)
6
-
7
- 'use strict';
8
-
9
- var resolve = require('@rollup/plugin-node-resolve').default;
10
- var commonjs = require('@rollup/plugin-commonjs');
11
-
12
- function createCustomLauncher(browser, version, platform) {
13
- return {
14
- base: 'SauceLabs',
15
- browserName: browser,
16
- version: version,
17
- platform: platform
18
- };
19
- }
20
-
21
- module.exports = function(config) {
22
- var customLaunchers = {};
23
- var browsers = process.env.Browsers && process.env.Browsers.split(',');
24
- var sauceLabs;
25
-
26
- if (process.env.SAUCE_USERNAME || process.env.SAUCE_ACCESS_KEY) {
27
- customLaunchers = {};
28
-
29
- var runAll = true;
30
- var options = [
31
- 'SAUCE_CHROME',
32
- 'SAUCE_FIREFOX',
33
- 'SAUCE_SAFARI',
34
- 'SAUCE_OPERA',
35
- 'SAUCE_IE',
36
- 'SAUCE_EDGE',
37
- 'SAUCE_IOS',
38
- 'SAUCE_ANDROID'
39
- ];
40
-
41
- options.forEach(function(opt) {
42
- if (process.env[opt]) {
43
- runAll = false;
44
- }
45
- });
46
-
47
- // Chrome
48
- if (runAll || process.env.SAUCE_CHROME) {
49
- customLaunchers.SL_Chrome = createCustomLauncher('chrome');
50
- // customLaunchers.SL_ChromeDev = createCustomLauncher('chrome', 'dev');
51
- // customLaunchers.SL_ChromeBeta = createCustomLauncher('chrome', 'beta');
52
- }
53
-
54
- // Firefox
55
- if (runAll || process.env.SAUCE_FIREFOX) {
56
- //customLaunchers.SL_Firefox = createCustomLauncher('firefox');
57
- // customLaunchers.SL_FirefoxDev = createCustomLauncher('firefox', 'dev');
58
- // customLaunchers.SL_FirefoxBeta = createCustomLauncher('firefox', 'beta');
59
- }
60
-
61
- // Safari
62
- if (runAll || process.env.SAUCE_SAFARI) {
63
- // customLaunchers.SL_Safari7 = createCustomLauncher('safari', 7);
64
- // customLaunchers.SL_Safari8 = createCustomLauncher('safari', 8);
65
- customLaunchers.SL_Safari9 = createCustomLauncher(
66
- 'safari',
67
- 9.0,
68
- 'OS X 10.11'
69
- );
70
- customLaunchers.SL_Safari10 = createCustomLauncher(
71
- 'safari',
72
- '10.1',
73
- 'macOS 10.12'
74
- );
75
- customLaunchers.SL_Safari11 = createCustomLauncher(
76
- 'safari',
77
- '11.1',
78
- 'macOS 10.13'
79
- );
80
- }
81
-
82
- // Opera
83
- if (runAll || process.env.SAUCE_OPERA) {
84
- // TODO The available versions of Opera are too old and lack basic APIs
85
- // customLaunchers.SL_Opera11 = createCustomLauncher('opera', 11, 'Windows XP');
86
- // customLaunchers.SL_Opera12 = createCustomLauncher('opera', 12, 'Windows 7');
87
- }
88
-
89
- // IE
90
- if (runAll || process.env.SAUCE_IE) {
91
- customLaunchers.SL_IE11 = createCustomLauncher('internet explorer', 11, 'Windows 8.1');
92
- }
93
-
94
- // Edge
95
- if (runAll || process.env.SAUCE_EDGE) {
96
- customLaunchers.SL_Edge = createCustomLauncher('microsoftedge', null, 'Windows 10');
97
- }
98
-
99
- // IOS
100
- if (runAll || process.env.SAUCE_IOS) {
101
- // TODO IOS7 capture always timesout
102
- // customLaunchers.SL_IOS7 = createCustomLauncher('iphone', '7.1', 'OS X 10.10');
103
- // TODO Mobile browsers are causing failures, possibly from too many concurrent VMs
104
- // customLaunchers.SL_IOS8 = createCustomLauncher('iphone', '8.4', 'OS X 10.10');
105
- // customLaunchers.SL_IOS9 = createCustomLauncher('iphone', '9.2', 'OS X 10.10');
106
- }
107
-
108
- // Android
109
- if (runAll || process.env.SAUCE_ANDROID) {
110
- // TODO Mobile browsers are causing failures, possibly from too many concurrent VMs
111
- // customLaunchers.SL_Android4 = createCustomLauncher('android', '4.4', 'Linux');
112
- // customLaunchers.SL_Android5 = createCustomLauncher('android', '5.1', 'Linux');
113
- }
114
-
115
- browsers = Object.keys(customLaunchers);
116
-
117
- sauceLabs = {
118
- recordScreenshots: false,
119
- connectOptions: {
120
- // port: 5757,
121
- logfile: 'sauce_connect.log'
122
- },
123
- public: 'public'
124
- };
125
- } else if (process.env.TRAVIS_PULL_REQUEST && process.env.TRAVIS_PULL_REQUEST !== 'false') {
126
- console.log(
127
- 'Cannot run on Sauce Labs as encrypted environment variables are not available to PRs. ' +
128
- 'Running on Travis.'
129
- );
130
- browsers = ['Firefox'];
131
- } else if (process.env.GITHUB_ACTIONS === 'true') {
132
- console.log('Running ci on GitHub Actions.');
133
- browsers = ['FirefoxHeadless', 'ChromeHeadless'];
134
- } else {
135
- browsers = browsers || ['Chrome'];
136
- console.log(`Running ${browsers} locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.`);
137
- }
138
-
139
- config.set({
140
- // base path that will be used to resolve all patterns (eg. files, exclude)
141
- basePath: '',
142
-
143
-
144
- // frameworks to use
145
- // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
146
- frameworks: ['jasmine-ajax', 'jasmine', 'sinon'],
147
-
148
-
149
- // list of files / patterns to load in the browser
150
- files: [
151
- {pattern: 'test/specs/__helpers.js', watched: false},
152
- {pattern: 'test/specs/**/*.spec.js', watched: false}
153
- ],
154
-
155
-
156
- // list of files to exclude
157
- exclude: [],
158
-
159
-
160
- // preprocess matching files before serving them to the browser
161
- // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
162
- preprocessors: {
163
- 'test/specs/__helpers.js': ['rollup'],
164
- 'test/specs/**/*.spec.js': ['rollup']
165
- },
166
-
167
- rollupPreprocessor: {
168
- plugins: [
169
- resolve({browser: true}),
170
- commonjs()
171
- ],
172
- output: {
173
- format: 'iife',
174
- name: '_axios',
175
- sourcemap: 'inline'
176
- }
177
- },
178
-
179
-
180
- // test results reporter to use
181
- // possible values: 'dots', 'progress'
182
- // available reporters: https://npmjs.org/browse/keyword/karma-reporter
183
- // Disable code coverage, as it's breaking CI:
184
- // reporters: ['dots', 'coverage', 'saucelabs'],
185
- reporters: ['progress'],
186
-
187
-
188
- // web server port
189
- port: 9876,
190
-
191
-
192
- // Increase timeouts to prevent the issue with disconnected tests (https://goo.gl/nstA69)
193
- captureTimeout: 4 * 60 * 1000,
194
- browserDisconnectTimeout: 10000,
195
- browserDisconnectTolerance: 1,
196
- browserNoActivityTimeout: 4 * 60 * 1000,
197
-
198
-
199
- // enable / disable colors in the output (reporters and logs)
200
- colors: true,
201
-
202
-
203
- // level of logging
204
- // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
205
- logLevel: config.LOG_INFO,
206
-
207
-
208
- // enable / disable watching file and executing tests whenever any file changes
209
- autoWatch: false,
210
-
211
-
212
- // start these browsers
213
- // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
214
- browsers: browsers,
215
-
216
-
217
- // Continuous Integration mode
218
- // if true, Karma captures browsers, runs the tests and exits
219
- singleRun: false,
220
-
221
- // Webpack config
222
- webpack: {
223
- mode: 'development',
224
- cache: true,
225
- devtool: 'inline-source-map',
226
- externals: [
227
- {
228
- './adapters/http': 'var undefined'
229
- }
230
- ]
231
- },
232
-
233
- webpackServer: {
234
- stats: {
235
- colors: true
236
- }
237
- },
238
-
239
-
240
- // Coverage reporting
241
- coverageReporter: {
242
- type: 'lcov',
243
- dir: 'coverage/',
244
- subdir: '.'
245
- },
246
-
247
- sauceLabs: sauceLabs,
248
- customLaunchers: customLaunchers
249
- });
250
- };
package/rollup.config.js DELETED
@@ -1,117 +0,0 @@
1
- import resolve from '@rollup/plugin-node-resolve';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import {terser} from "rollup-plugin-terser";
4
- import json from '@rollup/plugin-json';
5
- import { babel } from '@rollup/plugin-babel';
6
- import autoExternal from 'rollup-plugin-auto-external';
7
- import bundleSize from 'rollup-plugin-bundle-size'
8
- import path from 'path';
9
-
10
- const lib = require("./package.json");
11
- const outputFileName = 'axios';
12
- const name = "axios";
13
- const namedInput = './index.js';
14
- const defaultInput = './lib/axios.js';
15
-
16
- const buildConfig = ({es5, browser = true, minifiedVersion = true, ...config}) => {
17
- const {file} = config.output;
18
- const ext = path.extname(file);
19
- const basename = path.basename(file, ext);
20
- const extArr = ext.split('.');
21
- extArr.shift();
22
-
23
-
24
- const build = ({minified}) => ({
25
- input: namedInput,
26
- ...config,
27
- output: {
28
- ...config.output,
29
- file: `${path.dirname(file)}/${basename}.${(minified ? ['min', ...extArr] : extArr).join('.')}`
30
- },
31
- plugins: [
32
- json(),
33
- resolve({browser}),
34
- commonjs(),
35
- minified && terser(),
36
- minified && bundleSize(),
37
- ...(es5 ? [babel({
38
- babelHelpers: 'bundled',
39
- presets: ['@babel/preset-env']
40
- })] : []),
41
- ...(config.plugins || []),
42
- ]
43
- });
44
-
45
- const configs = [
46
- build({minified: false}),
47
- ];
48
-
49
- if (minifiedVersion) {
50
- configs.push(build({minified: true}))
51
- }
52
-
53
- return configs;
54
- };
55
-
56
- export default async () => {
57
- const year = new Date().getFullYear();
58
- const banner = `// Axios v${lib.version} Copyright (c) ${year} ${lib.author} and contributors`;
59
-
60
- return [
61
- // browser ESM bundle for CDN
62
- ...buildConfig({
63
- input: namedInput,
64
- output: {
65
- file: `dist/esm/${outputFileName}.js`,
66
- format: "esm",
67
- preferConst: true,
68
- exports: "named",
69
- banner
70
- }
71
- }),
72
-
73
- // Browser UMD bundle for CDN
74
- ...buildConfig({
75
- input: defaultInput,
76
- es5: true,
77
- output: {
78
- file: `dist/${outputFileName}.js`,
79
- name,
80
- format: "umd",
81
- exports: "default",
82
- banner
83
- }
84
- }),
85
-
86
- // Browser CJS bundle
87
- ...buildConfig({
88
- input: defaultInput,
89
- es5: false,
90
- minifiedVersion: false,
91
- output: {
92
- file: `dist/browser/${name}.cjs`,
93
- name,
94
- format: "cjs",
95
- exports: "default",
96
- banner
97
- }
98
- }),
99
-
100
- // Node.js commonjs bundle
101
- {
102
- input: defaultInput,
103
- output: {
104
- file: `dist/node/${name}.cjs`,
105
- format: "cjs",
106
- preferConst: true,
107
- exports: "default",
108
- banner
109
- },
110
- plugins: [
111
- autoExternal(),
112
- resolve(),
113
- commonjs()
114
- ]
115
- }
116
- ]
117
- };
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "node16",
4
- "lib": ["dom", "es2015"],
5
- "types": [],
6
- "strict": true,
7
- "noEmit": true
8
- }
9
- }
package/tslint.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "dtslint/dtslint.json",
3
- "rules": {
4
- "no-unnecessary-generics": false
5
- },
6
- "linterOptions": {
7
- "exclude": [
8
- "test/module/**"
9
- ]
10
- }
11
- }