Skip to content

Commit 719806c

Browse files
chore(deps): bump yargs-parser and ava (#451)
* chore(deps): bump yargs-parser and ava Bumps [yargs-parser](https://github.com/yargs/yargs-parser) to 21.1.1 and updates ancestor dependency [ava](https://github.com/avajs/ava). These dependencies need to be updated together. Updates `yargs-parser` from 10.1.0 to 21.1.1 - [Release notes](https://github.com/yargs/yargs-parser/releases) - [Changelog](https://github.com/yargs/yargs-parser/blob/main/CHANGELOG.md) - [Commits](yargs/yargs-parser@v10.1.0...yargs-parser-v21.1.1) Updates `ava` from 2.4.0 to 5.2.0 - [Release notes](https://github.com/avajs/ava/releases) - [Commits](avajs/ava@v2.4.0...v5.2.0) --- updated-dependencies: - dependency-name: yargs-parser dependency-type: indirect - dependency-name: ava dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * chore: improve eslint setup --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Tschinder <[email protected]>
1 parent a622fcf commit 719806c

File tree

11 files changed

+4646
-7630
lines changed

11 files changed

+4646
-7630
lines changed

.eslintrc.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"plugins": ["node", "prettier"],
32
"parserOptions": {
43
"sourceType": "module"
54
},
@@ -8,11 +7,11 @@
87
"es6": true
98
},
109
"extends": [
10+
"eslint:recommended",
1111
"plugin:import/errors",
1212
"plugin:import/warnings",
13-
"eslint:recommended",
14-
"plugin:node/recommended",
15-
"prettier"
13+
"plugin:n/recommended",
14+
"plugin:prettier/recommended"
1615
],
1716
"rules": {
1817
"import/order": [2, { "newlines-between": "always" }]

.prettierrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
22
"semi": false,
3-
"singleQuote": true,
4-
"printWidth": 120
3+
"singleQuote": true
54
}

package-lock.json

Lines changed: 4616 additions & 7595 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"ava": {
77
"files": [
88
"src/**/*.test.js"
9-
],
10-
"compileEnhancements": false,
11-
"babel": false
9+
]
1210
},
1311
"bugs": {
1412
"url": "https://github.com/netlify/open-api/issues"
@@ -17,18 +15,18 @@
1715
"devDependencies": {
1816
"analytics": "^0.2.0",
1917
"analytics-plugin-ga": "^0.1.5",
20-
"ava": "^2.4.0",
18+
"ava": "^5.2.0",
2119
"cp-file": "^7.0.0",
22-
"eslint": "^6.3.0",
23-
"eslint-config-prettier": "^6.2.0",
24-
"eslint-plugin-import": "^2.18.2",
25-
"eslint-plugin-node": "^10.0.0",
26-
"eslint-plugin-prettier": "^3.1.0",
20+
"eslint": "^8.38.0",
21+
"eslint-config-prettier": "^8.8.0",
22+
"eslint-plugin-import": "^2.27.5",
23+
"eslint-plugin-n": "^15.7.0",
24+
"eslint-plugin-prettier": "^4.2.1",
2725
"execa": "^2.0.4",
2826
"is-plain-obj": "^2.1.0",
2927
"make-dir": "^3.0.0",
3028
"npm-run-all": "^4.1.5",
31-
"prettier": "^1.18.2",
29+
"prettier": "^2.8.7",
3230
"react": "^16.9.0",
3331
"react-dom": "^16.9.0",
3432
"redoc-cli": "^0.13.7",

src/bump-swagger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SWAGGER_PATH = `${__dirname}/../swagger.yml`
1010

1111
// Modify the `info.version` field inside `swagger.yml` so it matches the
1212
// `package.json` `version`
13-
const bumpSwagger = async function() {
13+
const bumpSwagger = async function () {
1414
const swaggerFile = await pReadFile(SWAGGER_PATH, 'utf8')
1515
const newSwaggerFile = swaggerFile.replace(VERSION_REGEXP, `$1${version}`)
1616

src/convert.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ const JSON_OUTPUT = `${OUTPUT_DIR}/swagger.json`
1212

1313
// Validate `swagger.yml`, dereference the JSON references then serialize to
1414
// `swagger.json`
15-
const convertOpenApi = async function() {
15+
const convertOpenApi = async function () {
1616
const [openapiDef] = await Promise.all([
1717
SwaggerParser.validate(YAML_INPUT, { dereference: { circular: false } }),
18-
makeDir(OUTPUT_DIR)
18+
makeDir(OUTPUT_DIR),
1919
])
2020
const openapiJson = JSON.stringify(openapiDef, null, 2)
2121
await pWriteFile(JSON_OUTPUT, openapiJson)

src/convert.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ const test = require('ava')
22
const isPlainObj = require('is-plain-obj')
33

44
const { version } = require('../package.json')
5-
6-
// eslint-disable-next-line node/no-missing-require
5+
// eslint-disable-next-line n/no-missing-require
76
const openApiDef = require('..')
87

9-
test('OpenAPI definition normalization', async t => {
8+
test('OpenAPI definition normalization', async (t) => {
109
// Ensure the OpenAPI definition general shape looks normal
1110
t.true(isPlainObj(openApiDef))
1211
t.true(isPlainObj(openApiDef.definitions))

src/docs/assets.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const ASSETS = [
77
`${__dirname}/script.js`,
88
`${__dirname}/styles.css`,
99
`${__dirname}/../../node_modules/analytics/dist/analytics.min.js`,
10-
`${__dirname}/../../node_modules/analytics-plugin-ga/dist/analytics-plugin-ga.min.js`
10+
`${__dirname}/../../node_modules/analytics-plugin-ga/dist/analytics-plugin-ga.min.js`,
1111
]
1212

1313
// Copy files for static site to use (logo, JavaScript libraries)
14-
const copyAssets = async function(outputDir) {
15-
await Promise.all(ASSETS.map(path => copyAsset(path, outputDir)))
14+
const copyAssets = async function (outputDir) {
15+
await Promise.all(ASSETS.map((path) => copyAsset(path, outputDir)))
1616
}
1717

18-
const copyAsset = async function(path, outputDir) {
18+
const copyAsset = async function (path, outputDir) {
1919
await cpFile(path, `${outputDir}/${basename(path)}`)
2020
}
2121

src/docs/build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const OUTPUT_DIR = `${__dirname}/../../dist`
1010
const OUTPUT_PATH = `${OUTPUT_DIR}/index.html`
1111

1212
// Build API documentation single self-contained HTML file using `redoc-cli`
13-
const buildDocs = async function() {
13+
const buildDocs = async function () {
1414
await Promise.all([redocCli(), copyAssets(OUTPUT_DIR)])
1515
}
1616

17-
const redocCli = async function() {
17+
const redocCli = async function () {
1818
await execa(
1919
'redoc-cli',
2020
[
@@ -27,7 +27,7 @@ const redocCli = async function() {
2727
`--options.theme.logo.gutter=${LOGO_PADDING}`,
2828
`--output=${normalize(OUTPUT_PATH)}`,
2929
'build',
30-
SWAGGER_PATH
30+
SWAGGER_PATH,
3131
],
3232
{ stdio: 'inherit' }
3333
)

src/docs/inject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ const pReadFile = promisify(readFile)
88
const pWriteFile = promisify(writeFile)
99

1010
// Inject HTML content after Redoc has built the documentation
11-
const injectContent = async function(outputPath) {
11+
const injectContent = async function (outputPath) {
1212
const [siteContent, head, footer] = await Promise.all([
1313
pReadFile(outputPath, 'utf8'),
1414
pReadFile(HEAD_PATH, 'utf8'),
15-
pReadFile(FOOTER_PATH, 'utf8')
15+
pReadFile(FOOTER_PATH, 'utf8'),
1616
])
1717

1818
const updatedContent = siteContent

0 commit comments

Comments
 (0)