Skip to content

Commit 56a8e1a

Browse files
authored
Merge branch 'next' into master
2 parents 0d64c7f + 418e5cd commit 56a8e1a

File tree

221 files changed

+63491
-5653
lines changed

Some content is hidden

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

221 files changed

+63491
-5653
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: 84 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,95 @@
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+
- 14.x
18+
- 16.x
19+
- 18.x
2320

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

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

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

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