From 1d99cf0de90b05190249d6389806f47d2b3d7053 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 9 May 2024 17:32:44 -0400 Subject: [PATCH 1/4] chore: remove Circle-CI --- .circleci/config.yml | 112 ------------------ .../{run-docs-test.yml => run-docs-tests.yml} | 8 +- .github/workflows/run-e2e-tests.yml | 4 +- .github/workflows/run-lints.yml | 23 ++++ .github/workflows/run-smoke-tests.yml | 25 ++++ .github/workflows/run-test.yml | 9 +- README.md | 4 +- docs/hooks/perl.rst | 5 - docs/requirements.txt | 5 + package.json | 1 - yarn.lock | 69 +---------- 11 files changed, 69 insertions(+), 196 deletions(-) delete mode 100644 .circleci/config.yml rename .github/workflows/{run-docs-test.yml => run-docs-tests.yml} (93%) create mode 100644 .github/workflows/run-lints.yml create mode 100644 .github/workflows/run-smoke-tests.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7d2b08296..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,112 +0,0 @@ -version: 2.1 - -commands: - pip-install-docs: - steps: - - run: echo $(python --version) > .python-version - - restore_cache: - key: py-deps-{{ checksum ".python-version" }}-{{ checksum "./docs/requirements.txt" }} - - run: 'if [ ! -d ./venv ]; then python -m venv ./venv; fi' - - run: echo "source $(pwd)/venv/bin/activate" >> $BASH_ENV - - run: pip install -r ./docs/requirements.txt - - save_cache: - key: py-deps-{{ checksum "./docs/requirements.txt" }} - paths: - - ./venv - -aliases: - - &install - - run: yarn install --frozen-lockfile - - - &node12 - image: circleci/node:12 - - - &python-docs # using Python 3.6 as that's the version ReadTheDocs is running - image: circleci/python:3.6-node - - - &test-steps - steps: - - checkout - - <<: *install - - run: yarn build - - run: yarn test - -jobs: - test-node14: - docker: [image: circleci/node:14] - <<: *test-steps - - test-node12: - docker: [<<: *node12] - <<: *test-steps - - test-node10: - docker: [image: circleci/node:10] - <<: *test-steps - - test-e2e-apib: - docker: [<<: *node12] - steps: - - checkout - - <<: *install - - run: yarn build - - run: npx lerna exec --scope="dredd" yarn e2e:apib - - test-e2e-openapi2: - docker: [<<: *node12] - steps: - - checkout - - <<: *install - - run: yarn build - - run: npx lerna exec --scope="dredd" yarn e2e:openapi2 - - quality-checks: - docker: [<<: *python-docs] - steps: - - checkout - - <<: *install - - pip-install-docs - - run: yarn lint - - run: yarn commit:lint - - run: yarn docs:lint - - run: yarn docs:test-extensions - - format-check: - docker: [<<: *node12] - steps: - - checkout - - <<: *install - - run: yarn prettify:check - - docs-dry-run: - # 'dry run', because production build happens directly on the ReadTheDocs - # infrastructure - docker: [<<: *python-docs] - steps: - - checkout - - <<: *install - - pip-install-docs - - run: yarn docs:build - - smoke-tests: - docker: - - <<: *node12 - - image: circleci/mongo:latest - steps: - - checkout - - <<: *install - - run: yarn test:smoke - -workflows: - version: 2 - test: - jobs: - - format-check - - quality-checks - - test-node14 - - test-node12 - - test-node10 - - test-e2e-apib - - test-e2e-openapi2 - - smoke-tests - - docs-dry-run diff --git a/.github/workflows/run-docs-test.yml b/.github/workflows/run-docs-tests.yml similarity index 93% rename from .github/workflows/run-docs-test.yml rename to .github/workflows/run-docs-tests.yml index 532816b77..6509ad800 100644 --- a/.github/workflows/run-docs-test.yml +++ b/.github/workflows/run-docs-tests.yml @@ -1,7 +1,7 @@ -name: run-docs-test +name: run-docs-tests -on: push +on: [push, pull_request] # here add directory listing on push to test # paths: # - /docs/*.rst @@ -30,7 +30,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] node-version: [12.x] steps: @@ -59,7 +59,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] node-version: [12.x] steps: diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 65d36044b..b31c69afd 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] node-version: [12.x] steps: @@ -32,7 +32,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-13] node-version: [12.x] steps: diff --git a/.github/workflows/run-lints.yml b/.github/workflows/run-lints.yml new file mode 100644 index 000000000..ffcce43b4 --- /dev/null +++ b/.github/workflows/run-lints.yml @@ -0,0 +1,23 @@ +name: run-lints + +on: [push, pull_request] + +jobs: + lint: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [12.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: yarn lint + - run: yarn prettify:check diff --git a/.github/workflows/run-smoke-tests.yml b/.github/workflows/run-smoke-tests.yml new file mode 100644 index 000000000..92897b3b8 --- /dev/null +++ b/.github/workflows/run-smoke-tests.yml @@ -0,0 +1,25 @@ +name: run-smoke-tests + +on: [push, pull_request] + +jobs: + test-smoke: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [12.x] + + steps: + - uses: supercharge/mongodb-github-action@1.6.0 + with: + mongodb-version: 4.4 + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install --frozen-lockfile + - run: yarn test:smoke diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index f841cdcd1..18718be44 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -1,12 +1,8 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions +name: run-tests -name: run-test - -on: push +on: [push, pull_request] jobs: - # general test run test: runs-on: ${{ matrix.os }} @@ -24,5 +20,4 @@ jobs: node-version: ${{ matrix.node-version }} - run: yarn install --frozen-lockfile - run: yarn build - - run: yarn lint - run: yarn test diff --git a/README.md b/README.md index ea4790fbe..130ef929a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Dredd — HTTP API Testing Framework [![npm version](https://badge.fury.io/js/dredd.svg)](https://www.npmjs.com/package/dredd) -[![Build Status](https://circleci.com/gh/apiaryio/dredd/tree/master.svg?style=svg)](https://circleci.com/gh/apiaryio/dredd/tree/master) +[![Tests](https://github.com/apiaryio/dredd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/apiaryio/dredd/actions/workflows/run-tests.yml) +[![E2E Tests](https://github.com/apiaryio/dredd/actions/workflows/run-e2e-tests.yml/badge.svg)](https://github.com/apiaryio/dredd/actions/workflows/run-e2e-tests.yml) +[![Smoke Tests](https://github.com/apiaryio/dredd/actions/workflows/run-smoke-tests.yml/badge.svg)](https://github.com/apiaryio/dredd/actions/workflows/run-smoke-tests.yml) [![Build Status](https://ci.appveyor.com/api/projects/status/n3ixfxh72qushyr4/branch/master?svg=true)](https://ci.appveyor.com/project/Apiary/dredd/branch/master) [![Documentation Status](https://readthedocs.org/projects/dredd/badge/?version=latest)](https://readthedocs.org/projects/dredd/builds/) [![Known Vulnerabilities](https://snyk.io/test/npm/dredd/badge.svg)](https://snyk.io/test/npm/dredd) diff --git a/docs/hooks/perl.rst b/docs/hooks/perl.rst index e8ad58df5..eaa640230 100644 --- a/docs/hooks/perl.rst +++ b/docs/hooks/perl.rst @@ -3,8 +3,6 @@ Writing Dredd Hooks In Perl =========================== -|Build Status| - `GitHub repository `__ Perl hooks are using :ref:`Dredd’s hooks handler socket interface `. For using Perl hooks in Dredd you have to have :ref:`Dredd already installed ` @@ -232,6 +230,3 @@ Remove trailing newline character in expected *plain text* bodies $transaction->{expected}{body} = chomp($transaction->{expected}{body}); } }); - -.. |Build Status| image:: https://api.travis-ci.org/ungrim97/Dredd-Hooks.svg?branch=master - :target: https://api.travis-ci.org/ungrim97/Dredd-Hooks.svg?branch=master diff --git a/docs/requirements.txt b/docs/requirements.txt index e553192e0..0e17eb4a0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -10,6 +10,11 @@ pygments-apiblueprint==0.2.0 sphinx-tabs==3.2.0 sphinx-panels==0.6.0 myst-parser==0.15.2 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib.devhelp==1.0.2 +sphinxcontrib.htmlhelp==2.0.1 +sphinxcontrib.serializinghtml==1.1.5 +sphinxcontrib.qthelp==1.0.3 # dev dependencies sphinx-autobuild==2021.3.14 diff --git a/package.json b/package.json index 17bd234ae..216c187b3 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "devDependencies": { "@commitlint/cli": "11.0.0", "@commitlint/config-conventional": "11.0.0", - "commitlint-circle": "1.0.0", "lerna": "^3.22.1" }, "workspaces": { diff --git a/yarn.lock b/yarn.lock index 5ce94ef7a..3c16584bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1018,21 +1018,6 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/rest@^15.9.4": - version "15.18.3" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.18.3.tgz#ff4ecbb784ca286c40cc1d568abceda6d99b36fc" - integrity sha512-oHABAvvC83tPIuvUfWRaw9eLThFrCxBgywl+KvEwfTFjoCrMOfEaMh0r39+Ub/EEbV345GJiMzN+zPZ4kqOvbA== - dependencies: - before-after-hook "^1.1.0" - btoa-lite "^1.0.0" - debug "^3.1.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.0" - lodash "^4.17.4" - node-fetch "^2.1.1" - universal-user-agent "^2.0.0" - url-template "^2.0.8" - "@octokit/rest@^16.28.4": version "16.34.0" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.34.0.tgz#8703e46d7e9f6aec24a7e591b073f325ca13f6e2" @@ -1547,11 +1532,6 @@ becke-ch--regex--s0-0-v1--base--pl--lib@^1.4.0: resolved "https://registry.yarnpkg.com/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz#429ceebbfa5f7e936e78d73fbdc7da7162b20e20" integrity sha1-Qpzuu/pffpNueNc/vcfacWKyDiA= -before-after-hook@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.4.0.tgz#2b6bf23dca4f32e628fd2747c10a37c74a4b484d" - integrity sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg== - before-after-hook@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" @@ -1998,15 +1978,6 @@ commander@^2.7.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commitlint-circle@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/commitlint-circle/-/commitlint-circle-1.0.0.tgz#87d529e8cdbff8ea1edfc75720900057de28582c" - integrity sha512-YuwyQLM0NnbWN0Rt1dloQiw8kMcZGr1QVhyecYkV0pR1YOmc4QHwIM+c/2E7VxU8lzbI2gW0/2fRvOLAXJi5mQ== - dependencies: - "@octokit/rest" "^15.9.4" - execa "^0.10.0" - tslib "^1.9.3" - compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -2919,19 +2890,6 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== -execa@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" - integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== - dependencies: - cross-spawn "^6.0.0" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -3403,11 +3361,6 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -3740,7 +3693,7 @@ http-string-parser@0.0.6: resolved "https://registry.yarnpkg.com/http-string-parser/-/http-string-parser-0.0.6.tgz#4088a1aba2b89155ce13918bcfb5cbbea6c4e7e9" integrity sha1-QIihq6K4kVXOE5GLz7XLvqbE5+k= -https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.3: +https-proxy-agent@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.3.tgz#fb6cd98ed5b9c35056b5a73cd01a8a721d7193d1" integrity sha512-Ytgnz23gm2DVftnzqRRz2dOXZbGd2uiajSw/95bPp6v53zPRspQjLm/AfBgqbJ2qfeRXWIOMVLpp86+/5yX39Q== @@ -4564,7 +4517,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: +lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.5, lodash@^4.2.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5126,7 +5079,7 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.1.1, node-fetch@^2.3.0, node-fetch@^2.5.0: +node-fetch@^2.3.0, node-fetch@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -5419,7 +5372,7 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-name@^3.0.0, os-name@^3.1.0: +os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== @@ -7166,7 +7119,7 @@ ts-toolbelt@^6.15.1: resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83" integrity sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A== -tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== @@ -7292,13 +7245,6 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" -universal-user-agent@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" - integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== - dependencies: - os-name "^3.0.0" - universal-user-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" @@ -7368,11 +7314,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" - integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= - url@0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" From db35c1ff4ac71aafaefc5371b989957b50cb4c08 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Thu, 9 May 2024 18:34:06 -0400 Subject: [PATCH 2/4] fix(docs): fixes yarn docs:lint --- README.md | 4 ++-- docs/_extensions/ghlink_check.py | 2 +- docs/_extensions/specs.py | 4 ++-- docs/_links.rst | 4 ++-- docs/how-it-works.rst | 6 +++--- docs/how-to-guides.rst | 6 +++--- docs/internals.rst | 6 +++--- packages/dredd/lib/getProxySettings.js | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 130ef929a..906ea5916 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,8 @@ $ npm install -g dredd [api blueprint]: https://apiblueprint.org/ [api blueprint tutorial]: https://apiblueprint.org/documentation/tutorial.html [api blueprint examples]: https://github.com/apiaryio/api-blueprint/tree/master/examples -[openapi 2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md -[openapi 3]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md +[openapi 2]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md +[openapi 3]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md [documentation]: https://dredd.org/en/latest/ [changelog]: https://github.com/apiaryio/dredd/releases [contributor's guidelines]: https://dredd.org/en/latest/contributing/ diff --git a/docs/_extensions/ghlink_check.py b/docs/_extensions/ghlink_check.py index 3d9dae6bd..0b28e8cd5 100644 --- a/docs/_extensions/ghlink_check.py +++ b/docs/_extensions/ghlink_check.py @@ -39,7 +39,7 @@ def test_external(self): self.assertTrue(check_uri('https://apiblueprint.org')) def test_github(self): - self.assertTrue(check_uri('https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md')) + self.assertTrue(check_uri('https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md')) def test_relevant_github_repo_but_irrelevant_path(self): self.assertTrue(check_uri('https://github.com/apiaryio/dredd/issues/820')) diff --git a/docs/_extensions/specs.py b/docs/_extensions/specs.py index e269d7110..ff8cb1603 100644 --- a/docs/_extensions/specs.py +++ b/docs/_extensions/specs.py @@ -15,8 +15,8 @@ SPECS = { 'apib': ('API Blueprint', 'https://apiblueprint.org/documentation/specification.html#{anchor}'), 'mson': ('MSON', 'https://apiblueprint.org/documentation/mson/specification.html#{anchor}'), - 'openapi2': ('OpenAPI 2', 'https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#user-content-{anchor}'), - 'openapi3': ('OpenAPI 3', 'https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#user-content-{anchor}'), + 'openapi2': ('OpenAPI 2', 'https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md'), # TODO: re-add #{anchor}, fix yarn docs:lint + 'openapi3': ('OpenAPI 3', 'https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#{anchor}'), } diff --git a/docs/_links.rst b/docs/_links.rst index 65902d83e..27f3c27c2 100644 --- a/docs/_links.rst +++ b/docs/_links.rst @@ -12,8 +12,8 @@ .. OpenAPI specification -.. _OpenAPI 2: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md -.. _OpenAPI 3: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md +.. _OpenAPI 2: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md +.. _OpenAPI 3: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md .. JSON Schema diff --git a/docs/how-it-works.rst b/docs/how-it-works.rst index 001206669..414533e30 100644 --- a/docs/how-it-works.rst +++ b/docs/how-it-works.rst @@ -150,7 +150,7 @@ If Dredd isn’t able to infer any value for a required parameter, it will termi Request Headers ~~~~~~~~~~~~~~~ -In `OpenAPI 2`_ documents, HTTP headers are inferred from ``"in": "header"`` parameters (:openapi2:`parameterobject`). HTTP headers significant for content negotiation are inferred according to following rules: +In `OpenAPI 2`_ documents, HTTP headers are inferred from ``"in": "header"`` parameters (:openapi2:`parameter-object`). HTTP headers significant for content negotiation are inferred according to following rules: - ``consumes`` (:openapi2:`swaggerconsumes`) is propagated as request’s ``Content-Type`` header. - ``produces`` (:openapi2:`swaggerproduces`) is propagated as request’s ``Accept`` header. @@ -173,7 +173,7 @@ This order :apib:`exactly follows the API Blueprint specification `__ generates sample values from the JSON Schema provided in the ``schema`` (:openapi2:`parameterschema`) property. Following rules apply when the adapter fills values of the properties, ordered by precedence: @@ -255,6 +255,6 @@ You can tell Dredd to use HTTP(S) proxy for: - downloading API description documents (the positional argument :option:`api-description-document` or the :option:`--path` option accepts also URL) - :ref:`reporting to Apiary ` -Dredd respects ``HTTP_PROXY``, ``HTTPS_PROXY``, ``NO_PROXY``, ``http_proxy``, ``https_proxy``, and ``no_proxy`` environment variables. For more information on how those work see `relevant section `__ of the underlying library’s documentation. +Dredd respects ``HTTP_PROXY``, ``HTTPS_PROXY``, ``NO_PROXY``, ``http_proxy``, ``https_proxy``, and ``no_proxy`` environment variables. For more information on how those work see `relevant section `__ of the underlying library’s documentation. Dredd intentionally **does not support HTTP(S) proxies for testing**. Proxy can deliberately modify requests and responses or to behave in a very different way then the server under test. Testing over a proxy is, in the first place, testing of the proxy itself. That makes the test results irrelevant (and hard to debug). diff --git a/docs/how-to-guides.rst b/docs/how-to-guides.rst index d37d0efb1..9e3c06961 100644 --- a/docs/how-to-guides.rst +++ b/docs/how-to-guides.rst @@ -424,7 +424,7 @@ If you describe a JSON body which has attributes ``name`` and ``size``, the foll It’s because properties are optional by default in both `MSON`_ and `JSON Schema`_ and you need to explicitly specify them as required. - In API Blueprint’s :apib:`Attributes ` section, you can use ``required`` (:mson:`353-type-attribute`). -- In API Blueprint’s :apib:`Schema ` sections and in OpenAPI 2 you can use ``required`` (`spec `__), where you list the required properties. (Note this is true only for the `Draft v4 `__ JSON Schema, in older versions the ``required`` functionality was done differently.) +- In API Blueprint’s :apib:`Schema ` sections and in OpenAPI 2 you can use ``required`` (`spec `__), where you list the required properties. (Note this is true only for the `Draft v4 `__ JSON Schema, in older versions the ``required`` functionality was done differently.) Validating Structure of Array Items ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -452,7 +452,7 @@ If you describe a JSON body which has attributes ``name`` and ``size``, the foll If the size should be always equal to 300, you need to specify the fact in your API description. - In API Blueprint’s :apib:`Attributes ` sections you can mark your property with ``fixed`` (:mson:`353-type-attribute`), which turns the sample value into a required value. You can also use ``enum`` (:mson:`212-structure-types`) to provide a set of possible values. -- In API Blueprint’s :apib:`Schema ` sections and in OpenAPI 2 you can use ``enum`` (`spec `__) with one or more possible values. +- In API Blueprint’s :apib:`Schema ` sections and in OpenAPI 2 you can use ``enum`` (`spec `__) with one or more possible values. Integrating Dredd with Your Test Suite -------------------------------------- @@ -732,7 +732,7 @@ Example Values for Request Parameters While example values are natural part of the API Blueprint format, the OpenAPI 2 specification allows them only for ``body`` request parameters (``schema.example``). -However, Dredd needs to know what values to use when testing described API, so it supports ``x-example`` :openapi2:`vendor extension property ` to overcome the OpenAPI 2 limitation: +However, Dredd needs to know what values to use when testing described API, so it supports ``x-example`` :openapi2:`vendor extension property ` to overcome the OpenAPI 2 limitation: .. code-block:: openapi2 diff --git a/docs/internals.rst b/docs/internals.rst index dffcc217c..35eebe1ff 100644 --- a/docs/internals.rst +++ b/docs/internals.rst @@ -67,7 +67,7 @@ To hack Dredd locally, clone the repository and run ``npm install`` to install J Commit message format ~~~~~~~~~~~~~~~~~~~~~ -`Semantic Release `__ automatically manages releasing of new Dredd versions to the `npm `_ registry. It makes sure correct version numbers get increased according to the **meaning** of your changes once they are added to the ``master`` branch. This requires all commit messages to be in a specific format, called `Conventional Changelog `__: +`Semantic Release `__ automatically manages releasing of new Dredd versions to the `npm `_ registry. It makes sure correct version numbers get increased according to the **meaning** of your changes once they are added to the ``master`` branch. This requires all commit messages to be in a specific format, called `Conventional Changelog `__: .. code-block:: text @@ -304,10 +304,10 @@ MSON spec Simplifies linking the `MSON`_ spec. Usage: ``:mson:`353-type-attribute``` OpenAPI 2 spec - Simplifies linking the `OpenAPI 2`_ spec. Usage: ``:openapi2:`parameterobject``` + Simplifies linking the `OpenAPI 2`_ spec. Usage: ``:openapi2:`parameter-object``` OpenAPI 3 spec - Simplifies linking the `OpenAPI 3`_ spec. Usage: ``:openapi3:`parameterobject``` + Simplifies linking the `OpenAPI 3`_ spec. Usage: ``:openapi3:`parameter-object``` RFCs Simplifies linking the RFCs. Not a custom extension in fact, this is provided by Sphinx out of the box. Usage: ``:rfc:`1855``` diff --git a/packages/dredd/lib/getProxySettings.js b/packages/dredd/lib/getProxySettings.js index 40fa58f9a..c2e7cd4ef 100644 --- a/packages/dredd/lib/getProxySettings.js +++ b/packages/dredd/lib/getProxySettings.js @@ -11,7 +11,7 @@ const PROXY_ENV_VARIABLES = ['HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY']; * * Note: The settings are later only printed to the user. Applying the settings * is handled directly by the 'request' library, see - * https://github.com/request/request#user-content-proxies + * https://github.com/request/request#proxies */ export default function getProxySettings(env) { return Object.entries(env) From 773962536f59f5dfa5b110ac3dbc335d41756ce7 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Sat, 11 May 2024 09:11:32 -0400 Subject: [PATCH 3/4] fix: use mongo:4.4 service instead of supercharge/mongodb-github-action --- .github/workflows/run-smoke-tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-smoke-tests.yml b/.github/workflows/run-smoke-tests.yml index 92897b3b8..b19d2e7bb 100644 --- a/.github/workflows/run-smoke-tests.yml +++ b/.github/workflows/run-smoke-tests.yml @@ -12,10 +12,12 @@ jobs: os: [ubuntu-latest] node-version: [12.x] + services: + mongo: + image: mongo:4.4 + ports: ["27017:27017"] + steps: - - uses: supercharge/mongodb-github-action@1.6.0 - with: - mongodb-version: 4.4 - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 From ba8771528cd2158861258de06d2ecc0c5ebb2c37 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Sat, 11 May 2024 09:19:20 -0400 Subject: [PATCH 4/4] fix: restore previous yarn.lock --- yarn.lock | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3c16584bd..5ce94ef7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1018,6 +1018,21 @@ once "^1.4.0" universal-user-agent "^4.0.0" +"@octokit/rest@^15.9.4": + version "15.18.3" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.18.3.tgz#ff4ecbb784ca286c40cc1d568abceda6d99b36fc" + integrity sha512-oHABAvvC83tPIuvUfWRaw9eLThFrCxBgywl+KvEwfTFjoCrMOfEaMh0r39+Ub/EEbV345GJiMzN+zPZ4kqOvbA== + dependencies: + before-after-hook "^1.1.0" + btoa-lite "^1.0.0" + debug "^3.1.0" + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.0" + lodash "^4.17.4" + node-fetch "^2.1.1" + universal-user-agent "^2.0.0" + url-template "^2.0.8" + "@octokit/rest@^16.28.4": version "16.34.0" resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.34.0.tgz#8703e46d7e9f6aec24a7e591b073f325ca13f6e2" @@ -1532,6 +1547,11 @@ becke-ch--regex--s0-0-v1--base--pl--lib@^1.4.0: resolved "https://registry.yarnpkg.com/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz#429ceebbfa5f7e936e78d73fbdc7da7162b20e20" integrity sha1-Qpzuu/pffpNueNc/vcfacWKyDiA= +before-after-hook@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.4.0.tgz#2b6bf23dca4f32e628fd2747c10a37c74a4b484d" + integrity sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg== + before-after-hook@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" @@ -1978,6 +1998,15 @@ commander@^2.7.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commitlint-circle@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/commitlint-circle/-/commitlint-circle-1.0.0.tgz#87d529e8cdbff8ea1edfc75720900057de28582c" + integrity sha512-YuwyQLM0NnbWN0Rt1dloQiw8kMcZGr1QVhyecYkV0pR1YOmc4QHwIM+c/2E7VxU8lzbI2gW0/2fRvOLAXJi5mQ== + dependencies: + "@octokit/rest" "^15.9.4" + execa "^0.10.0" + tslib "^1.9.3" + compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -2890,6 +2919,19 @@ eventemitter3@^3.1.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== +execa@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" + integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== + dependencies: + cross-spawn "^6.0.0" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -3361,6 +3403,11 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -3693,7 +3740,7 @@ http-string-parser@0.0.6: resolved "https://registry.yarnpkg.com/http-string-parser/-/http-string-parser-0.0.6.tgz#4088a1aba2b89155ce13918bcfb5cbbea6c4e7e9" integrity sha1-QIihq6K4kVXOE5GLz7XLvqbE5+k= -https-proxy-agent@^2.2.3: +https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.3.tgz#fb6cd98ed5b9c35056b5a73cd01a8a721d7193d1" integrity sha512-Ytgnz23gm2DVftnzqRRz2dOXZbGd2uiajSw/95bPp6v53zPRspQjLm/AfBgqbJ2qfeRXWIOMVLpp86+/5yX39Q== @@ -4517,7 +4564,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.5, lodash@^4.2.1: +lodash@^4.15.0, lodash@^4.17.0, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5079,7 +5126,7 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.3.0, node-fetch@^2.5.0: +node-fetch@^2.1.1, node-fetch@^2.3.0, node-fetch@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== @@ -5372,7 +5419,7 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-name@^3.1.0: +os-name@^3.0.0, os-name@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== @@ -7119,7 +7166,7 @@ ts-toolbelt@^6.15.1: resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83" integrity sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A== -tslib@^1.9.0: +tslib@^1.9.0, tslib@^1.9.3: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== @@ -7245,6 +7292,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +universal-user-agent@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.1.0.tgz#5abfbcc036a1ba490cb941f8fd68c46d3669e8e4" + integrity sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q== + dependencies: + os-name "^3.0.0" + universal-user-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.0.tgz#27da2ec87e32769619f68a14996465ea1cb9df16" @@ -7314,6 +7368,11 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= +url-template@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= + url@0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"