Skip to content

Commit 9a55e7c

Browse files
authored
Merge pull request #458 from acacode/next
Release 13.0.0
2 parents ec190c9 + 2f7dee8 commit 9a55e7c

File tree

220 files changed

+62467
-5389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+62467
-5389
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
TEST_FILE_NAME=github-swagger.ts
2+
TEST_SCHEMA_VERSION=v3
3+
TEST_WITH_DEBUG=true

.prettierignore renamed to .eslintignore

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
.eslintrc
2+
node_modules
3+
.husky
4+
.vscode
5+
swagger-test-cli
6+
tests
7+
*.ejs
8+
*.eta
9+
.kube
10+
.idea
11+
*.json
12+
.eslintrc.js
13+
vite.config.ts
114
tests/**/*.ts
215
tests/**/schema.js
316
tests/**/schema.ts
@@ -7,7 +20,6 @@ swagger-test-cli.*
720
templates
821
*.md
922
.github
10-
node_modules
1123
.openapi-generator
1224
.vscode
1325
assets

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module.exports = {
2+
parserOptions: {
3+
"ecmaVersion": "latest"
4+
},
5+
env: {
6+
"node": true,
7+
"es6": true
8+
},
9+
extends: [
10+
'eslint:recommended',
11+
'plugin:prettier/recommended',
12+
],
13+
plugins: [
14+
'prettier',
15+
],
16+
rules: {
17+
'prettier/prettier': [
18+
'error',
19+
{
20+
endOfLine: 'auto',
21+
printWidth: 80,
22+
tabWidth: 2,
23+
trailingComma: 'all',
24+
semi: true,
25+
singleQuote: true,
26+
},
27+
],
28+
},
29+
};

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
open-pull-requests-limit: 100
6+
schedule:
7+
interval: "daily"

.github/workflows/main.yml

Lines changed: 83 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,94 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: Builds, tests & co
22

3-
name: Run tests
4-
5-
# Controls when the action will run.
63
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
8-
pull_request:
9-
branches: [ master, next ]
10-
11-
# Allows you to run this workflow manually from the Actions tab
12-
workflow_dispatch:
4+
- push
5+
- pull_request
136

14-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
157
jobs:
16-
# This workflow contains a single job called "build"
17-
build:
18-
# The type of runner that the job will run on
19-
runs-on: ubuntu-latest
8+
build-and-test:
209
strategy:
10+
fail-fast: false
2111
matrix:
22-
node-version: [11.x, 13.x, 15.x]
12+
os:
13+
- macos-latest
14+
- ubuntu-latest
15+
- windows-latest
16+
node-version:
17+
- 16.x
18+
- 18.x
2319

24-
name: Node.js (test-all) ${{ matrix.node-version }}
20+
runs-on: ${{ matrix.os }}
2521

26-
# Steps represent a sequence of tasks that will be executed as part of the job
2722
steps:
28-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29-
- uses: actions/checkout@v2
23+
- name: Checkout tree
24+
uses: actions/checkout@v3
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install npm packages
32+
run: npm ci --ignore-scripts
33+
34+
- name: Run the tests
35+
run: npm run test-all
36+
37+
dependabot-auto-approve:
38+
name: Dependabot auto-approve
39+
40+
permissions:
41+
pull-requests: write
42+
43+
needs:
44+
- build-and-test
45+
46+
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
47+
48+
runs-on: ubuntu-latest
3049

31-
# Runs a single command using the runners shell
32-
- name: install deps
33-
run: npm i
50+
steps:
51+
- name: Fetch Dependabot metadata
52+
id: metadata
53+
uses: dependabot/fetch-metadata@v1
54+
55+
- name: Get the PR review decision
56+
id: gh-pr-review
57+
run: echo "decision=$(gh pr view --json reviewDecision --jq '. | .reviewDecision' "$PR_URL")" >>"$GITHUB_OUTPUT"
58+
env:
59+
PR_URL: ${{ github.event.pull_request.html_url }}
60+
GITHUB_TOKEN: ${{ github.token }}
61+
62+
- name: Approve a PR
63+
if: ${{ steps.gh-pr-review.outputs.decision != 'APPROVED' && steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
64+
run: gh pr review --approve "$PR_URL"
65+
env:
66+
PR_URL: ${{ github.event.pull_request.html_url }}
67+
GITHUB_TOKEN: ${{ github.token }}
68+
69+
dependabot-auto-merge:
70+
name: Dependabot auto-merge
71+
72+
permissions:
73+
contents: write
74+
pull-requests: write
75+
76+
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
77+
78+
needs:
79+
- build-and-test
80+
- dependabot-auto-approve
81+
82+
runs-on: ubuntu-latest
83+
84+
steps:
85+
- name: Fetch Dependabot metadata
86+
id: metadata
87+
uses: dependabot/fetch-metadata@v1
3488

35-
# Runs a set of commands using the runners shell
36-
- name: test
37-
run: npm run test-all-extended
89+
- name: Merge Dependabot PR
90+
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
91+
run: gh pr merge --auto --merge "$PR_URL"
92+
env:
93+
PR_URL: ${{ github.event.pull_request.html_url }}
94+
GITHUB_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_modules
33
.idea
44
swagger-test-cli.*
55
swagger-test-cli
6-
dist
6+
dist
7+
.env

.husky/post-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
git update-index -g

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lint:fix

.ncurc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"upgrade": true,
3+
"reject": [
4+
"nanoid",
5+
"eta"
6+
]
7+
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.16.0
1+
18.16.1

0 commit comments

Comments
 (0)