Skip to content

Commit f674bad

Browse files
authored
update Node to 18, update deps (openapi-ts#914)
* update Node to 18, update deps * fix false positive CLI test * use codecov GH action
1 parent 513c19a commit f674bad

File tree

7 files changed

+551
-358
lines changed

7 files changed

+551
-358
lines changed

.github/workflows/pull_request.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
test:
2222
strategy:
2323
matrix:
24-
node-version: [14.x, 16.x, 17.x]
24+
node-version: [14.x, 16.x, 18.x]
2525
os: [macos-latest, ubuntu-latest, windows-latest]
2626
runs-on: ${{ matrix.os }}
2727
steps:
@@ -38,4 +38,10 @@ jobs:
3838
with:
3939
node-version: ${{ matrix.node-version }}
4040
- run: pnpm i
41+
- run: npm test
42+
if: matrix.os != 'macos-latest' || matrix.node-version != '18.x'
4143
- run: npm run test:coverage
44+
if: matrix.os == 'macos-latest' && matrix.node-version == '18.x'
45+
- uses: codecov/codecov-action@v2
46+
if: matrix.os == 'macos-latest' && matrix.node-version == '18.x'
47+

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

bin/cli.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@ function errorAndExit(errorMessage) {
4646
const [, , input, ...args] = process.argv;
4747
const flags = parser(args, {
4848
array: ["header"],
49-
boolean: ["defaultNonNullable", "immutableTypes", "contentNever", "rawSchema", "exportType", "supportArrayLength", "makePathsEnum", "pathParamsAsTypes"],
49+
boolean: [
50+
"defaultNonNullable",
51+
"immutableTypes",
52+
"contentNever",
53+
"rawSchema",
54+
"exportType",
55+
"supportArrayLength",
56+
"makePathsEnum",
57+
"pathParamsAsTypes",
58+
],
5059
number: ["version"],
5160
string: ["auth", "header", "headersObject", "httpMethod", "prettierConfig"],
5261
alias: {

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,38 @@
3939
},
4040
"homepage": "https://github.com/drwpow/openapi-typescript#readme",
4141
"scripts": {
42-
"build": "rm -rf dist && tsc",
42+
"build": "del dist && tsc",
4343
"format": "npm run prettier -w .",
4444
"lint": "eslint .",
4545
"prepare": "npm run build",
4646
"pregenerate": "npm run build",
4747
"test": "mocha --recursive --timeout 30000",
48-
"test:coverage": "nyc --reporter=lcov mocha --recursive --timeout 30000 && codecov",
48+
"test:coverage": "nyc --reporter=lcov mocha --recursive --timeout 30000",
4949
"version": "npm run build"
5050
},
5151
"dependencies": {
5252
"js-yaml": "^4.1.0",
5353
"mime": "^3.0.0",
5454
"prettier": "^2.6.2",
5555
"tiny-glob": "^0.2.9",
56-
"undici": "^5.0.0",
56+
"undici": "^5.4.0",
5757
"yargs-parser": "^21.0.1"
5858
},
5959
"devDependencies": {
6060
"@types/js-yaml": "^4.0.5",
6161
"@types/mime": "^2.0.3",
62-
"@types/node": "^17.0.25",
63-
"@types/prettier": "^2.6.0",
64-
"@typescript-eslint/eslint-plugin": "^5.20.0",
65-
"@typescript-eslint/parser": "^5.20.0",
62+
"@types/node": "^17.0.38",
63+
"@types/prettier": "^2.6.3",
64+
"@typescript-eslint/eslint-plugin": "^5.27.0",
65+
"@typescript-eslint/parser": "^5.27.0",
6666
"chai": "^4.3.6",
67-
"codecov": "^3.8.3",
67+
"del-cli": "^4.0.1",
6868
"eol": "^0.9.1",
69-
"eslint": "^8.14.0",
69+
"eslint": "^8.16.0",
7070
"eslint-config-prettier": "^8.5.0",
7171
"eslint-plugin-prettier": "^4.0.0",
7272
"mocha": "^9.2.2",
7373
"nyc": "^15.1.0",
74-
"typescript": "^4.6.3"
74+
"typescript": "^4.7.2"
7575
}
7676
}

0 commit comments

Comments
 (0)