Skip to content

Commit

Permalink
housekeeping: @kyleshockey/js-yaml -> js-yaml (via #1459)
Browse files Browse the repository at this point in the history
* `@kyleshockey/js-yaml` -> `js-yaml`

* externalize esprima
  • Loading branch information
shockey authored Jul 31, 2019
1 parent f7ec083 commit aeea431
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 23 deletions.
2 changes: 1 addition & 1 deletion examples/quick.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/http.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/specmap/lib/refs.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/authorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/main.js
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/style-explode/cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/style-explode/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/style-explode/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
2 changes: 1 addition & 1 deletion test/oas3/execute/style-explode/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
2 changes: 1 addition & 1 deletion test/resolver.js
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion test/resolver/index.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
7 changes: 6 additions & 1 deletion webpack/_config-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit aeea431

Please sign in to comment.