fix: failing in node 14- and yarn due to unresolved peed dependencies (#1166)

* chore: set up smoke tests
This commit is contained in:
Andrew Tatomyr
2023-07-10 13:06:21 +03:00
committed by GitHub
parent e43228e59e
commit a5009029e5
8 changed files with 368 additions and 67 deletions

201
.github/workflows/smoke.yaml vendored Normal file
View File

@@ -0,0 +1,201 @@
name: Smoke tests
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
env:
CI: true
REDOCLY_TELEMETRY: off
jobs:
prepare-smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Prepare Smoke
run: bash ./scripts/prepare-smoke.sh
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
run-smoke--npm--node-18:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run"
run-smoke--npm--node-18--redoc:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
run-smoke--npm--node-16:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run"
run-smoke--npm--node-16--redoc:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
run-smoke--npm--node-14:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 14
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run"
run-smoke--npm--node-14--redoc:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 14
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
run-smoke--npm--node-12:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 12
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redocly-cli.tgz" "npm run"
run-smoke--npm--node-12--redoc:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 12
- run: bash ./__tests__/smoke/run-smoke.sh "npm i redoc redocly-cli.tgz" "npm run"
run-smoke--yarn--node-18:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add ./redocly-cli-clean.tgz" "yarn" # FIXME: Use actual openapi-core
run-smoke--yarn--node-18--redoc:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 18
- run: bash ./__tests__/smoke/run-smoke.sh "yarn add redoc ./redocly-cli-clean.tgz" "yarn" # FIXME: Use actual openapi-core
run-smoke--webpack--node-14:
needs: prepare-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
with:
path: __tests__/smoke/
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v3
with:
node-version: 14
- run: |
cd __tests__/smoke/
node bundle.js --version
node bundle.js lint openapi.yaml --extends minimal
node bundle.js bundle openapi.yaml

View File

@@ -0,0 +1,4 @@
type: object
properties:
message:
type: string

View File

@@ -0,0 +1,19 @@
openapi: 3.1.0
servers:
- url: http://localhost
info:
title: Sample API
version: 1.0.0
paths:
/hello:
get:
operationId: getMessage
security: []
summary: Get a greeting message
responses:
200:
description: OK
content:
application/json:
schema:
$ref: ./message-schema.yaml

View File

@@ -0,0 +1,14 @@
{
"name": "test-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"redocly-version": "redocly --version",
"redocly-lint": "redocly lint openapi.yaml",
"redocly-bundle": "redocly bundle openapi.yaml --ext json",
"redocly-build-docs": "redocly build-docs openapi.yaml"
},
"author": "redocly",
"license": "ISC"
}

View File

@@ -0,0 +1,31 @@
#!/bin/bash
echo
echo "Running smoke test for command: $1 -> $2"
echo "NPM version: $(npm -v)"
echo "Yarn version: $(yarn --version)"
echo
set -eo pipefail # Fail on script errors
cd __tests__/smoke
echo "Directory content:"
ls -a
echo
# Executing the command provided as the first argument
$1
# Actual smoke test - executing the command provided as the second argument
$2 redocly-version
$2 redocly-lint
$2 redocly-bundle
$2 redocly-build-docs
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
if [[ "$(wc -l redoc-static.html)" == "317 redoc-static.html" ]]; then
echo "Docs built correctly."
else
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 317 lines in redoc-static.html)."
exit 1
fi

133
package-lock.json generated
View File

@@ -137,7 +137,6 @@
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz",
"integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==",
"peer": true,
"dependencies": {
"@babel/types": "^7.18.6"
},
@@ -639,7 +638,6 @@
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
"integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",
"peer": true,
"dependencies": {
"@emotion/memoize": "0.7.4"
}
@@ -647,20 +645,17 @@
"node_modules/@emotion/memoize": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"peer": true
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="
},
"node_modules/@emotion/stylis": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz",
"integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==",
"peer": true
"integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ=="
},
"node_modules/@emotion/unitless": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==",
"peer": true
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
},
"node_modules/@eslint/eslintrc": {
"version": "1.3.0",
@@ -2277,7 +2272,6 @@
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz",
"integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==",
"peer": true,
"dependencies": {
"@babel/helper-annotate-as-pure": "^7.16.0",
"@babel/helper-module-imports": "^7.16.0",
@@ -2292,8 +2286,7 @@
"node_modules/babel-plugin-syntax-jsx": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
"integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==",
"peer": true
"integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw=="
},
"node_modules/babel-preset-current-node-syntax": {
"version": "1.0.1",
@@ -2510,8 +2503,7 @@
"node_modules/camelize": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",
"integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==",
"peer": true
"integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg=="
},
"node_modules/caniuse-lite": {
"version": "1.0.30001381",
@@ -2894,7 +2886,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",
"integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==",
"peer": true,
"engines": {
"node": ">=4"
}
@@ -2903,7 +2894,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz",
"integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==",
"peer": true,
"dependencies": {
"camelize": "^1.0.0",
"css-color-keywords": "^1.0.0",
@@ -6081,7 +6071,6 @@
"version": "6.6.2",
"resolved": "https://registry.npmjs.org/mobx/-/mobx-6.6.2.tgz",
"integrity": "sha512-IOpS0bf3+hXIhDIy+CmlNMBfFpAbHS0aVHcNC+xH/TFYEKIIVDKNYRh9eKlXuVfJ1iRKAp0cRVmO145CyJAMVQ==",
"peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mobx"
@@ -6841,8 +6830,7 @@
"node_modules/postcss-value-parser": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"peer": true
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"node_modules/prelude-ls": {
"version": "1.2.1",
@@ -6986,7 +6974,6 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -6999,7 +6986,6 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
@@ -7738,7 +7724,6 @@
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -7840,8 +7825,7 @@
"node_modules/shallowequal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
"peer": true
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
},
"node_modules/shebang-command": {
"version": "2.0.0",
@@ -8484,7 +8468,6 @@
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.3.tgz",
"integrity": "sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==",
"peer": true,
"dependencies": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/traverse": "^7.4.5",
@@ -8514,7 +8497,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"peer": true,
"engines": {
"node": ">=4"
}
@@ -8523,7 +8505,6 @@
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"peer": true,
"dependencies": {
"has-flag": "^3.0.0"
},
@@ -9606,10 +9587,14 @@
"glob": "^7.1.6",
"glob-promise": "^3.4.0",
"handlebars": "^4.7.6",
"mobx": "^6.0.4",
"portfinder": "^1.0.26",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"redoc": "~2.0.0",
"semver": "^7.5.2",
"simple-websocket": "^9.0.0",
"styled-components": "^5.1.1",
"yargs": "17.0.1"
},
"bin": {
@@ -9627,14 +9612,33 @@
},
"engines": {
"node": ">=12.0.0"
},
"peerDependencies": {
"mobx": "^6.0.4",
"react": "^16.8.4 || ^17.0.0",
"react-dom": "^16.8.4 || ^17.0.0",
"styled-components": "^4.1.1 || ^5.1.1"
}
},
"packages/cli/node_modules/@redocly/openapi-core": {
"version": "1.0.0-beta.130",
"resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.130.tgz",
"integrity": "sha512-P24AcEw06s002JZsG6f79/oqEJm3vRj4RySPHjHiJA4JXugbI7Msx4shmIX2PaGsxCLo2aKK/QlDK/0TYDqkrA==",
"dependencies": {
"@redocly/ajv": "^8.11.0",
"@types/node": "^14.11.8",
"colorette": "^1.2.0",
"js-levenshtein": "^1.1.6",
"js-yaml": "^4.1.0",
"lodash.isequal": "^4.5.0",
"minimatch": "^5.0.1",
"node-fetch": "^2.6.1",
"pluralize": "^8.0.0",
"yaml-ast-parser": "0.0.43"
},
"engines": {
"node": ">=12.0.0"
}
},
"packages/cli/node_modules/@types/node": {
"version": "14.18.53",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.53.tgz",
"integrity": "sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A=="
},
"packages/cli/node_modules/@types/yargs": {
"version": "17.0.5",
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.5.tgz",
@@ -9761,7 +9765,6 @@
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz",
"integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==",
"peer": true,
"requires": {
"@babel/types": "^7.18.6"
}
@@ -10134,7 +10137,6 @@
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
"integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",
"peer": true,
"requires": {
"@emotion/memoize": "0.7.4"
}
@@ -10142,20 +10144,17 @@
"@emotion/memoize": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"peer": true
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="
},
"@emotion/stylis": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz",
"integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==",
"peer": true
"integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ=="
},
"@emotion/unitless": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==",
"peer": true
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
},
"@eslint/eslintrc": {
"version": "1.3.0",
@@ -10627,14 +10626,40 @@
"glob": "^7.1.6",
"glob-promise": "^3.4.0",
"handlebars": "^4.7.6",
"mobx": "^6.0.4",
"portfinder": "^1.0.26",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"redoc": "~2.0.0",
"semver": "^7.5.2",
"simple-websocket": "^9.0.0",
"styled-components": "^5.1.1",
"typescript": "^4.0.3",
"yargs": "17.0.1"
},
"dependencies": {
"@redocly/openapi-core": {
"version": "1.0.0-beta.130",
"resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.130.tgz",
"integrity": "sha512-P24AcEw06s002JZsG6f79/oqEJm3vRj4RySPHjHiJA4JXugbI7Msx4shmIX2PaGsxCLo2aKK/QlDK/0TYDqkrA==",
"requires": {
"@redocly/ajv": "^8.11.0",
"@types/node": "^14.11.8",
"colorette": "^1.2.0",
"js-levenshtein": "^1.1.6",
"js-yaml": "^4.1.0",
"lodash.isequal": "^4.5.0",
"minimatch": "^5.0.1",
"node-fetch": "^2.6.1",
"pluralize": "^8.0.0",
"yaml-ast-parser": "0.0.43"
}
},
"@types/node": {
"version": "14.18.53",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.53.tgz",
"integrity": "sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A=="
},
"@types/yargs": {
"version": "17.0.5",
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.5.tgz",
@@ -11538,7 +11563,6 @@
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz",
"integrity": "sha512-i7YhvPgVqRKfoQ66toiZ06jPNA3p6ierpfUuEWxNF+fV27Uv5gxBkf8KZLHUCc1nFA9j6+80pYoIpqCeyW3/bA==",
"peer": true,
"requires": {
"@babel/helper-annotate-as-pure": "^7.16.0",
"@babel/helper-module-imports": "^7.16.0",
@@ -11550,8 +11574,7 @@
"babel-plugin-syntax-jsx": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
"integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==",
"peer": true
"integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw=="
},
"babel-preset-current-node-syntax": {
"version": "1.0.1",
@@ -11718,8 +11741,7 @@
"camelize": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",
"integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==",
"peer": true
"integrity": "sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg=="
},
"caniuse-lite": {
"version": "1.0.30001381",
@@ -12016,14 +12038,12 @@
"css-color-keywords": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",
"integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==",
"peer": true
"integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg=="
},
"css-to-react-native": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz",
"integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==",
"peer": true,
"requires": {
"camelize": "^1.0.0",
"css-color-keywords": "^1.0.0",
@@ -14488,8 +14508,7 @@
"mobx": {
"version": "6.6.2",
"resolved": "https://registry.npmjs.org/mobx/-/mobx-6.6.2.tgz",
"integrity": "sha512-IOpS0bf3+hXIhDIy+CmlNMBfFpAbHS0aVHcNC+xH/TFYEKIIVDKNYRh9eKlXuVfJ1iRKAp0cRVmO145CyJAMVQ==",
"peer": true
"integrity": "sha512-IOpS0bf3+hXIhDIy+CmlNMBfFpAbHS0aVHcNC+xH/TFYEKIIVDKNYRh9eKlXuVfJ1iRKAp0cRVmO145CyJAMVQ=="
},
"mobx-react": {
"version": "7.5.3",
@@ -15047,8 +15066,7 @@
"postcss-value-parser": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
"peer": true
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"prelude-ls": {
"version": "1.2.1",
@@ -15156,7 +15174,6 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"peer": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -15166,7 +15183,6 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"peer": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
@@ -15723,7 +15739,6 @@
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"peer": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -15802,8 +15817,7 @@
"shallowequal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
"peer": true
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
},
"shebang-command": {
"version": "2.0.0",
@@ -16322,7 +16336,6 @@
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.3.tgz",
"integrity": "sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==",
"peer": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/traverse": "^7.4.5",
@@ -16339,14 +16352,12 @@
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"peer": true
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"peer": true,
"requires": {
"has-flag": "^3.0.0"
}

View File

@@ -14,6 +14,7 @@
"scripts": {
"compile": "tsc",
"copy-assets": "cp src/commands/preview-docs/preview-server/default.hbs lib/commands/preview-docs/preview-server/default.hbs && cp src/commands/preview-docs/preview-server/hot.js lib/commands/preview-docs/preview-server/hot.js && cp src/commands/preview-docs/preview-server/oauth2-redirect.html lib/commands/preview-docs/preview-server/oauth2-redirect.html && cp src/commands/build-docs/template.hbs lib/commands/build-docs/template.hbs",
"prepack": "npm run copy-assets",
"prepublishOnly": "npm run copy-assets"
},
"repository": {
@@ -44,13 +45,11 @@
"redoc": "~2.0.0",
"semver": "^7.5.2",
"simple-websocket": "^9.0.0",
"yargs": "17.0.1"
},
"peerDependencies": {
"yargs": "17.0.1",
"mobx": "^6.0.4",
"react": "^16.8.4 || ^17.0.0",
"react-dom": "^16.8.4 || ^17.0.0",
"styled-components": "^4.1.1 || ^5.1.1"
"react": "^17.0.0",
"react-dom": "^17.0.0",
"styled-components": "^5.1.1"
},
"devDependencies": {
"@types/configstore": "^5.0.1",

22
scripts/prepare-smoke.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# For Workflows (Webpack)
npm run webpack-bundle
# For yarn (Doesn't support version changing)
(cd packages/cli && cli=$(npm pack | tail -n 1) && mv $cli ../../__tests__/smoke/redocly-cli-clean.tgz)
# For npm (Mutates packages/cli/package.json)
npm run pack:prepare
cp ./redocly-cli.tgz ./openapi-core.tgz ./dist/bundle.js ./__tests__/smoke/
echo "Current directory:"
pwd
echo
echo "Current directory content:"
ls -a
echo
echo "Target directory content:"
ls -a __tests__/smoke/
echo