swagger-client 3.14.1 → 3.15.0

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.
package/es/http/index.js CHANGED
@@ -197,7 +197,7 @@ function parseBody(body, contentType) {
197
197
  return JSON.parse(body);
198
198
  }
199
199
 
200
- return jsYaml.safeLoad(body);
200
+ return jsYaml.load(body);
201
201
  } // Serialize the response, returns a promise with headers and the body part of the hash
202
202
 
203
203
 
@@ -6,7 +6,9 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
6
6
  import _Promise from "@babel/runtime-corejs3/core-js-stable/promise";
7
7
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
8
8
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
9
- import { fetch } from 'cross-fetch';
9
+ import 'cross-fetch/polyfill';
10
+ /* global fetch */
11
+
10
12
  import jsYaml from 'js-yaml';
11
13
  import qs from 'querystring-browser';
12
14
  import url from 'url';
@@ -391,7 +393,7 @@ function fetchJSON(docPath) {
391
393
  }).then(function (res) {
392
394
  return res.text();
393
395
  }).then(function (text) {
394
- return jsYaml.safeLoad(text);
396
+ return jsYaml.load(text);
395
397
  });
396
398
  }
397
399
  /**
@@ -530,7 +532,7 @@ function pointerAlreadyInPath(pointer, basePath, parent, specmap) {
530
532
 
531
533
  var rootDoc = specmap.contextTree.get([]).baseDoc;
532
534
 
533
- if (basePath == rootDoc && pointerIsAParent(safeParentPointer, pointer)) {
535
+ if (basePath === rootDoc && pointerIsAParent(safeParentPointer, pointer)) {
534
536
  // eslint-disable-line
535
537
  return true;
536
538
  } // Case 2: indirect cycle
package/lib/http/index.js CHANGED
@@ -125,7 +125,7 @@ function parseBody(body, contentType) {
125
125
  return JSON.parse(body);
126
126
  }
127
127
 
128
- return _jsYaml.default.safeLoad(body);
128
+ return _jsYaml.default.load(body);
129
129
  } // Serialize the response, returns a promise with headers and the body part of the hash
130
130
 
131
131
 
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _crossFetch = require("cross-fetch");
6
+ require("cross-fetch/polyfill");
7
7
 
8
8
  var _jsYaml = _interopRequireDefault(require("js-yaml"));
9
9
 
@@ -21,6 +21,7 @@ var _constants = require("../../constants");
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
+ /* global fetch */
24
25
  const ABSOLUTE_URL_REGEXP = new RegExp('^([a-z]+://|//)', 'i');
25
26
  const JSONRefError = (0, _createError.default)('JSONRefError', function cb(message, extra, oriError) {
26
27
  this.originalError = oriError;
@@ -341,12 +342,12 @@ function getDoc(docPath) {
341
342
 
342
343
 
343
344
  function fetchJSON(docPath) {
344
- return (0, _crossFetch.fetch)(docPath, {
345
+ return fetch(docPath, {
345
346
  headers: {
346
347
  Accept: _constants.ACCEPT_HEADER_VALUE_FOR_DOCUMENTS
347
348
  },
348
349
  loadSpec: true
349
- }).then(res => res.text()).then(text => _jsYaml.default.safeLoad(text));
350
+ }).then(res => res.text()).then(text => _jsYaml.default.load(text));
350
351
  }
351
352
  /**
352
353
  * Extracts a pointer from an object.
@@ -474,7 +475,7 @@ function pointerAlreadyInPath(pointer, basePath, parent, specmap) {
474
475
 
475
476
  const rootDoc = specmap.contextTree.get([]).baseDoc;
476
477
 
477
- if (basePath == rootDoc && pointerIsAParent(safeParentPointer, pointer)) {
478
+ if (basePath === rootDoc && pointerIsAParent(safeParentPointer, pointer)) {
478
479
  // eslint-disable-line
479
480
  return true;
480
481
  } // Case 2: indirect cycle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swagger-client",
3
- "version": "3.14.1",
3
+ "version": "3.15.0",
4
4
  "description": "SwaggerJS - a collection of interfaces for OAI specs",
5
5
  "browser": {
6
6
  "./src/http/fold-formdata-to-request.node.js": "./src/http/fold-formdata-to-request.browser.js",
@@ -66,19 +66,19 @@
66
66
  "license": "Apache-2.0",
67
67
  "devDependencies": {
68
68
  "@babel/cli": "=7.14.8",
69
- "@babel/core": "=7.14.8",
69
+ "@babel/core": "=7.15.0",
70
70
  "@babel/plugin-proposal-class-properties": "=7.14.5",
71
71
  "@babel/plugin-proposal-object-rest-spread": "=7.14.7",
72
- "@babel/plugin-transform-runtime": "=7.14.5",
73
- "@babel/preset-env": "=7.14.8",
72
+ "@babel/plugin-transform-runtime": "=7.15.0",
73
+ "@babel/preset-env": "=7.15.0",
74
74
  "@babel/register": "=7.14.5",
75
75
  "@char0n/npm-audit": "gist:2964395223d7943c10396f59df9a8ea0",
76
- "@commitlint/cli": "^12.0.0",
76
+ "@commitlint/cli": "^13.1.0",
77
77
  "@commitlint/config-conventional": "^13.1.0",
78
78
  "babel-loader": "=8.2.2",
79
79
  "babel-plugin-lodash": "=3.3.4",
80
80
  "cross-env": "=7.0.3",
81
- "eslint": "=7.31.0",
81
+ "eslint": "=7.32.0",
82
82
  "eslint-config-airbnb-base": "=14.2.1",
83
83
  "eslint-config-prettier": "=8.3.0",
84
84
  "eslint-plugin-import": "=2.23.4",
@@ -92,7 +92,7 @@
92
92
  "jest": "^27.0.1",
93
93
  "json-loader": "=0.5.7",
94
94
  "license-checker": "=25.0.1",
95
- "lint-staged": "=11.1.1",
95
+ "lint-staged": "=11.1.2",
96
96
  "lodash-webpack-plugin": "=0.11.6",
97
97
  "nock": "=13.1.1",
98
98
  "node-fetch": "=2.6.1",
@@ -100,7 +100,7 @@
100
100
  "prettier": "^2.3.0",
101
101
  "rimraf": "=3.0.2",
102
102
  "terser-webpack-plugin": "^5.0.3",
103
- "webpack": "=5.46.0",
103
+ "webpack": "=5.49.0",
104
104
  "webpack-bundle-size-analyzer": "=3.1.0",
105
105
  "webpack-cli": "=4.7.2",
106
106
  "webpack-stats-plugin": "=1.0.3",
@@ -116,7 +116,7 @@
116
116
  "fast-json-patch": "^3.0.0-1",
117
117
  "form-data-encoder": "^1.0.1",
118
118
  "formdata-node": "^3.6.2",
119
- "js-yaml": "^3.14.0",
119
+ "js-yaml": "^4.1.0",
120
120
  "lodash": "^4.17.19",
121
121
  "qs": "^6.9.4",
122
122
  "querystring-browser": "^1.0.4",