diff --git a/examples/quick.js b/examples/quick.js index 9236df02a..5cd25799c 100644 --- a/examples/quick.js +++ b/examples/quick.js @@ -1,6 +1,6 @@ // Ensure you've built SwaggerJS const Swagger = require('../dist') -const jsYaml = require('@kyleshockey/js-yaml') +const jsYaml = require('js-yaml') /** * This is a file, for quickly testing out functionality of SwaggerJS diff --git a/package-lock.json b/package-lock.json index 0512f83ca..52a702462 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1931,14 +1931,6 @@ "@types/yargs": "^12.0.9" } }, - "@kyleshockey/js-yaml": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@kyleshockey/js-yaml/-/js-yaml-1.0.1.tgz", - "integrity": "sha512-coFyIk1LvTscq1cUU4nCCfYwv+cmG4fCP+wgDKgYZjhM4f++YwZy+g0k+1tUqa4GuUpBTEOGH2KUqKFFWdT73g==", - "requires": { - "argparse": "^1.0.7" - } - }, "@kyleshockey/object-assign-deep": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/@kyleshockey/object-assign-deep/-/object-assign-deep-0.4.2.tgz", @@ -5994,8 +5986,7 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { "version": "1.0.1", @@ -10895,6 +10886,15 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", diff --git a/package.json b/package.json index 23a1049a3..8f6c4247a 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,6 @@ }, "dependencies": { "@babel/runtime-corejs2": "^7.0.0", - "@kyleshockey/js-yaml": "^1.0.1", "@kyleshockey/object-assign-deep": "^0.4.0", "btoa": "1.1.2", "buffer": "^5.1.0", @@ -107,6 +106,7 @@ "encode-3986": "^1.0.0", "fast-json-patch": "^2.0.6", "isomorphic-form-data": "0.0.1", + "js-yaml": "^3.13.1", "lodash": "^4.17.14", "qs": "^6.3.0", "querystring-browser": "^1.0.4", diff --git a/src/http.js b/src/http.js index 5303dfa74..b8b501dd1 100644 --- a/src/http.js +++ b/src/http.js @@ -1,6 +1,6 @@ import 'cross-fetch/polyfill' /* global fetch */ import qs from 'qs' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import isString from 'lodash/isString' // For testing diff --git a/src/specmap/lib/refs.js b/src/specmap/lib/refs.js index 75281c46c..1bc109956 100644 --- a/src/specmap/lib/refs.js +++ b/src/specmap/lib/refs.js @@ -1,5 +1,5 @@ import {fetch} from 'cross-fetch' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import qs from 'querystring-browser' import url from 'url' import lib from '../lib' diff --git a/test/oas3/execute/authorization.js b/test/oas3/execute/authorization.js index 3c64f0a72..aa52adde8 100644 --- a/test/oas3/execute/authorization.js +++ b/test/oas3/execute/authorization.js @@ -2,7 +2,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' import btoa from 'btoa' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import {execute, buildRequest, baseUrl, applySecurities, self as stubs} from '../../../src/execute' diff --git a/test/oas3/execute/main.js b/test/oas3/execute/main.js index 9bb92d78d..fc2dce5d0 100644 --- a/test/oas3/execute/main.js +++ b/test/oas3/execute/main.js @@ -1,7 +1,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import {execute, buildRequest, baseUrl, applySecurities, self as stubs} from '../../../src/execute' diff --git a/test/oas3/execute/style-explode/cookie.js b/test/oas3/execute/style-explode/cookie.js index 03d74d424..89b25c05c 100644 --- a/test/oas3/execute/style-explode/cookie.js +++ b/test/oas3/execute/style-explode/cookie.js @@ -2,7 +2,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' import qs from 'querystring' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import {execute, buildRequest, baseUrl, applySecurities, self as stubs} from '../../../../src/execute' diff --git a/test/oas3/execute/style-explode/header.js b/test/oas3/execute/style-explode/header.js index bb63c5050..2c5d4ca43 100644 --- a/test/oas3/execute/style-explode/header.js +++ b/test/oas3/execute/style-explode/header.js @@ -2,7 +2,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' import qs from 'querystring' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import {execute, buildRequest, baseUrl, applySecurities, self as stubs} from '../../../../src/execute' diff --git a/test/oas3/execute/style-explode/path.js b/test/oas3/execute/style-explode/path.js index 8aba4974e..e93420974 100644 --- a/test/oas3/execute/style-explode/path.js +++ b/test/oas3/execute/style-explode/path.js @@ -2,7 +2,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' import qs from 'querystring' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import {execute, buildRequest, baseUrl, applySecurities, self as stubs} from '../../../../src/execute' const petstoreSpec = jsYaml.safeLoad(fs.readFileSync(path.join('test', 'oas3', 'data', 'petstore-oas3.yaml'), 'utf8')) diff --git a/test/oas3/execute/style-explode/query.js b/test/oas3/execute/style-explode/query.js index a939561c5..5ca513a85 100644 --- a/test/oas3/execute/style-explode/query.js +++ b/test/oas3/execute/style-explode/query.js @@ -2,7 +2,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' import qs from 'querystring' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import {execute, buildRequest, baseUrl, applySecurities, self as stubs} from '../../../../src/execute' const petstoreSpec = jsYaml.safeLoad(fs.readFileSync(path.join('test', 'oas3', 'data', 'petstore-oas3.yaml'), 'utf8')) diff --git a/test/resolver.js b/test/resolver.js index 37f4ddf9f..9a1fa1329 100644 --- a/test/resolver.js +++ b/test/resolver.js @@ -1,7 +1,7 @@ import xmock from 'xmock' import path from 'path' import fs from 'fs' -import jsYaml from '@kyleshockey/js-yaml' +import jsYaml from 'js-yaml' import Swagger from '../src' diff --git a/test/resolver/index.js b/test/resolver/index.js index 42005f532..1d9f10c1f 100644 --- a/test/resolver/index.js +++ b/test/resolver/index.js @@ -1,7 +1,7 @@ // Test runner // -import YAML from '@kyleshockey/js-yaml' +import YAML from 'js-yaml' import fs from 'fs' import Path from 'path' import nock from 'nock' diff --git a/webpack/_config-builder.js b/webpack/_config-builder.js index 67d785476..c50116d12 100644 --- a/webpack/_config-builder.js +++ b/webpack/_config-builder.js @@ -47,7 +47,12 @@ export default function buildConfig( }), }, - externals: includeDependencies ? [] : [nodeExternals()], + externals: includeDependencies + ? { + // js-yaml includes `esprima` by default, but we don't need it + esprima: true, + } + : [nodeExternals()], module: { rules: baseRules,