From b146e710bc3f633c8ac102019526affe0ac8e1a0 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 08:43:17 +0000 Subject: [PATCH 1/8] build: update github-actions with dependabot --- .github/dependabot.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6cab366c..d057a291 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,12 @@ version: 2 updates: - - package-ecosystem: npm + - package-ecosystem: github-actions directory: '/' schedule: interval: daily open-pull-requests-limit: 10 - + - package-ecosystem: npm + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 \ No newline at end of file From 5c18268eb18b5f121cea37803a02a6604d225463 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 08:50:54 +0000 Subject: [PATCH 2/8] docs(readme): add snyk badge --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d61515f1..6be5fd50 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # fastify-swagger -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) ![CI workflow](https://github.com/fastify/fastify-swagger/workflows/CI%20workflow/badge.svg) +![CI workflow](https://github.com/fastify/fastify-swagger/workflows/CI%20workflow/badge.svg) +[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-swagger/badge.svg)](https://snyk.io/test/github/fastify/fastify-swagger) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [Swagger](https://swagger.io/) documentation generator for Fastify. It uses the schemas you declare in your routes to generate a swagger compliant doc. From bb822916f670ec33532643a6264f738a363c4bdb Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 08:51:50 +0000 Subject: [PATCH 3/8] docs(readme): update http links to https --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6be5fd50..728d5901 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![CI workflow](https://github.com/fastify/fastify-swagger/workflows/CI%20workflow/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-swagger/badge.svg)](https://snyk.io/test/github/fastify/fastify-swagger) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) [Swagger](https://swagger.io/) documentation generator for Fastify. It uses the schemas you declare in your routes to generate a swagger compliant doc. @@ -380,8 +380,8 @@ In that case checkout [fastify-swaggergen](https://github.com/seriousme/fastify- ## Acknowledgements This project is kindly sponsored by: -- [nearForm](http://nearform.com) -- [LetzDoIt](http://www.letzdoitapp.com/) +- [nearForm](https://nearform.com) +- [LetzDoIt](https://www.letzdoitapp.com/) ## License From 5ed26600af97f32cae2b7f2b669b2d00724c12f0 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 08:58:53 +0000 Subject: [PATCH 4/8] docs(readme): remove mention of openapi v3 being unsupported --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 728d5901..c0c0a077 100644 --- a/README.md +++ b/README.md @@ -306,8 +306,7 @@ fastify.route({ minItems: 1, // // Note that this is an Open API version 2 configuration option. The - // options changed in version 3. The plugin currently only supports - // version 2 of Open API. + // options changed in version 3. // // Put `collectionFormat` on the same property which you are defining // as an array of values. (i.e. `collectionFormat` should be a sibling From cbb6fcd5b88710cc5d4f2c98dac368c4165a75f5 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 09:05:52 +0000 Subject: [PATCH 5/8] chore: reduce size of test script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e022902..f9d686e0 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "prepare": "node lib/util/prepare-swagger-ui", - "test": "standard && tap --100 test/*.js test/spec/**/*.js test/mode/*.js test/esm/*.js && npm run typescript", + "test": "standard && tap --100 test/**/*.js && npm run typescript", "prepublishOnly": "npm run prepare", "typescript": "tsd" }, From 094e958d234b1e21cfed43937d06e37aa9c2bfe1 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 09:12:29 +0000 Subject: [PATCH 6/8] ci: add coverage generation and badge --- .github/workflows/ci.yml | 18 +++++++++++++++++- README.md | 1 + package.json | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39deac01..2224093a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,23 @@ jobs: - name: Prepare run: npm run prepare - name: Test - run: npm test + run: npm run test:ci + - name: Coveralls Parallel + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel: true + flag-name: run-${{ matrix.node-version }}-${{ matrix.os }} + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true automerge: needs: test diff --git a/README.md b/README.md index c0c0a077..e3a7cf4a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![CI workflow](https://github.com/fastify/fastify-swagger/workflows/CI%20workflow/badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-swagger/badge.svg)](https://snyk.io/test/github/fastify/fastify-swagger) +[![Coverage Status](https://coveralls.io/repos/github/fastify/fastify-swagger/badge.svg?branch=master)](https://coveralls.io/github/fastify/fastify-swagger?branch=master) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) [Swagger](https://swagger.io/) documentation generator for Fastify. diff --git a/package.json b/package.json index f9d686e0..1dce1d70 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "prepare": "node lib/util/prepare-swagger-ui", "test": "standard && tap --100 test/**/*.js && npm run typescript", + "test:ci": "standard && tap --100 test/**/*.js --coverage-report=lcovonly && npm run typescript", "prepublishOnly": "npm run prepare", "typescript": "tsd" }, From 6d8b718ccc21c3fdb007e73c51f12bba3e7f6fed Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 09:13:31 +0000 Subject: [PATCH 7/8] style: sort scripts alphabetically --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1dce1d70..7e60b01f 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "main": "index.js", "scripts": { "prepare": "node lib/util/prepare-swagger-ui", + "prepublishOnly": "npm run prepare", "test": "standard && tap --100 test/**/*.js && npm run typescript", "test:ci": "standard && tap --100 test/**/*.js --coverage-report=lcovonly && npm run typescript", - "prepublishOnly": "npm run prepare", "typescript": "tsd" }, "repository": { From 76536e134a56b8c59f9aece81413ba09d1c50b79 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 2 Feb 2021 09:31:09 +0000 Subject: [PATCH 8/8] chore: remove coverage threshold to pass ci --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e60b01f..0d643190 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "prepare": "node lib/util/prepare-swagger-ui", "prepublishOnly": "npm run prepare", "test": "standard && tap --100 test/**/*.js && npm run typescript", - "test:ci": "standard && tap --100 test/**/*.js --coverage-report=lcovonly && npm run typescript", + "test:ci": "standard && tap test/**/*.js --coverage-report=lcovonly && npm run typescript", "typescript": "tsd" }, "repository": {