mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
chore: update deps
This commit is contained in:
parent
f7dd658a01
commit
12e7394ea3
|
@ -38,7 +38,6 @@ const babelLoader = mode => ({
|
|||
['@babel/plugin-syntax-decorators', { legacy: true }],
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'@babel/plugin-syntax-jsx',
|
||||
mode !== 'production' ? 'react-hot-loader/babel' : undefined,
|
||||
[
|
||||
'babel-plugin-styled-components',
|
||||
{
|
||||
|
@ -50,6 +49,13 @@ const babelLoader = mode => ({
|
|||
},
|
||||
});
|
||||
|
||||
const babelHotLoader = {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
plugins: ['react-hot-loader/babel'],
|
||||
},
|
||||
};
|
||||
|
||||
export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) => ({
|
||||
entry: [
|
||||
root('../src/polyfills.ts'),
|
||||
|
@ -105,7 +111,11 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
|
|||
{ test: [/\.eot$/, /\.gif$/, /\.woff$/, /\.svg$/, /\.ttf$/], use: 'null-loader' },
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: [tsLoader(env), babelLoader(mode)],
|
||||
use: compact([
|
||||
mode !== 'production' ? babelHotLoader : undefined,
|
||||
tsLoader(env),
|
||||
babelLoader(mode),
|
||||
]),
|
||||
exclude: [/node_modules/],
|
||||
},
|
||||
{
|
||||
|
|
120
package.json
120
package.json
|
@ -52,110 +52,110 @@
|
|||
"docker:build": "docker build -f config/docker/Dockerfile -t redoc ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.3.4",
|
||||
"@babel/core": "7.5.5",
|
||||
"@babel/plugin-syntax-decorators": "7.2.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-syntax-jsx": "7.2.0",
|
||||
"@babel/plugin-syntax-typescript": "7.3.3",
|
||||
"@cypress/webpack-preprocessor": "4.0.3",
|
||||
"@hot-loader/react-dom": "^16.8.4",
|
||||
"@cypress/webpack-preprocessor": "4.1.0",
|
||||
"@hot-loader/react-dom": "^16.8.6",
|
||||
"@types/chai": "4.1.7",
|
||||
"@types/dompurify": "^0.0.32",
|
||||
"@types/enzyme": "^3.9.0",
|
||||
"@types/dompurify": "^0.0.33",
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/enzyme-to-json": "^1.5.3",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/jest": "^24.0.15",
|
||||
"@types/json-pointer": "^1.0.30",
|
||||
"@types/lodash": "^4.14.122",
|
||||
"@types/lodash": "^4.14.136",
|
||||
"@types/lunr": "^2.3.2",
|
||||
"@types/mark.js": "^8.11.3",
|
||||
"@types/marked": "^0.6.3",
|
||||
"@types/prismjs": "^1.9.1",
|
||||
"@types/prop-types": "^15.7.0",
|
||||
"@types/react": "^16.8.7",
|
||||
"@types/react-dom": "^16.8.2",
|
||||
"@types/mark.js": "^8.11.4",
|
||||
"@types/marked": "^0.6.5",
|
||||
"@types/prismjs": "^1.16.0",
|
||||
"@types/prop-types": "^15.7.1",
|
||||
"@types/react": "^16.8.23",
|
||||
"@types/react-dom": "^16.8.5",
|
||||
"@types/react-hot-loader": "^4.1.0",
|
||||
"@types/react-tabs": "^2.3.1",
|
||||
"@types/styled-components": "^4.1.12",
|
||||
"@types/styled-components": "^4.1.18",
|
||||
"@types/tapable": "1.0.4",
|
||||
"@types/webpack": "^4.4.25",
|
||||
"@types/webpack-env": "^1.13.9",
|
||||
"@types/yargs": "^12.0.9",
|
||||
"babel-loader": "8.0.5",
|
||||
"babel-plugin-styled-components": "^1.10.0",
|
||||
"@types/webpack": "^4.32.1",
|
||||
"@types/webpack-env": "^1.14.0",
|
||||
"@types/yargs": "^13.0.0",
|
||||
"babel-loader": "8.0.6",
|
||||
"babel-plugin-styled-components": "^1.10.6",
|
||||
"beautify-benchmark": "^0.2.4",
|
||||
"bundlesize": "^0.17.1",
|
||||
"conventional-changelog-cli": "^2.0.12",
|
||||
"copy-webpack-plugin": "^5.0.0",
|
||||
"core-js": "^2.6.5",
|
||||
"coveralls": "^3.0.3",
|
||||
"css-loader": "^2.1.1",
|
||||
"cypress": "~3.1.5",
|
||||
"deploy-to-gh-pages": "^1.3.6",
|
||||
"enzyme": "^3.9.0",
|
||||
"enzyme-adapter-react-16": "^1.10.0",
|
||||
"bundlesize": "^0.18.0",
|
||||
"conventional-changelog-cli": "^2.0.23",
|
||||
"copy-webpack-plugin": "^5.0.4",
|
||||
"core-js": "^3.1.4",
|
||||
"coveralls": "^3.0.5",
|
||||
"css-loader": "^3.1.0",
|
||||
"cypress": "~3.4.0",
|
||||
"deploy-to-gh-pages": "^1.3.7",
|
||||
"enzyme": "^3.10.0",
|
||||
"enzyme-adapter-react-16": "^1.14.0",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
"fork-ts-checker-webpack-plugin": "1.0.0",
|
||||
"fork-ts-checker-webpack-plugin": "1.4.3",
|
||||
"html-webpack-plugin": "^3.1.0",
|
||||
"jest": "^24.3.1",
|
||||
"jest": "^24.8.0",
|
||||
"license-checker": "^25.0.1",
|
||||
"lodash": "^4.17.11",
|
||||
"lodash": "^4.17.15",
|
||||
"mobx": "^4.3.1",
|
||||
"prettier": "^1.16.4",
|
||||
"prettier-eslint": "^8.8.2",
|
||||
"prettier": "^1.18.2",
|
||||
"prettier-eslint": "^9.0.0",
|
||||
"raf": "^3.4.1",
|
||||
"react": "^16.8.4",
|
||||
"react-dom": "^16.8.4",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6",
|
||||
"rimraf": "^2.6.3",
|
||||
"shelljs": "^0.8.3",
|
||||
"source-map-loader": "^0.2.4",
|
||||
"style-loader": "^0.23.1",
|
||||
"styled-components": "^4.1.3",
|
||||
"ts-jest": "24.0.0",
|
||||
"ts-loader": "5.3.3",
|
||||
"ts-node": "^8.0.3",
|
||||
"tslint": "^5.13.1",
|
||||
"tslint-react": "^3.4.0",
|
||||
"typescript": "^3.3.3333",
|
||||
"styled-components": "^4.3.2",
|
||||
"ts-jest": "24.0.2",
|
||||
"ts-loader": "6.0.4",
|
||||
"ts-node": "^8.3.0",
|
||||
"tslint": "^5.18.0",
|
||||
"tslint-react": "^4.0.0",
|
||||
"typescript": "^3.5.3",
|
||||
"unfetch": "^4.1.0",
|
||||
"url-polyfill": "^1.1.5",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-cli": "^3.2.3",
|
||||
"webpack-dev-server": "^3.2.1",
|
||||
"url-polyfill": "^1.1.7",
|
||||
"webpack": "^4.38.0",
|
||||
"webpack-cli": "^3.3.6",
|
||||
"webpack-dev-server": "^3.7.2",
|
||||
"webpack-node-externals": "^1.6.0",
|
||||
"workerize-loader": "^1.0.4",
|
||||
"yaml-js": "^0.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"core-js": "^2.6.5",
|
||||
"mobx": "^4.2.0 || ^5.0.0",
|
||||
"react": "^16.8.4",
|
||||
"react-dom": "^16.8.4",
|
||||
"styled-components": "^4.1.1",
|
||||
"core-js": "^2.6.5"
|
||||
"styled-components": "^4.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"classnames": "^2.2.6",
|
||||
"decko": "^1.2.0",
|
||||
"dompurify": "^1.0.10",
|
||||
"eventemitter3": "^3.0.0",
|
||||
"dompurify": "^1.0.11",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"json-pointer": "^0.6.0",
|
||||
"json-schema-ref-parser": "^6.1.0",
|
||||
"lunr": "2.3.6",
|
||||
"mark.js": "^8.11.1",
|
||||
"marked": "^0.6.1",
|
||||
"memoize-one": "^5.0.0",
|
||||
"mobx-react": "^5.4.3",
|
||||
"openapi-sampler": "1.0.0-beta.14",
|
||||
"marked": "^0.7.0",
|
||||
"memoize-one": "^5.0.5",
|
||||
"mobx-react": "^6.1.1",
|
||||
"openapi-sampler": "1.0.0-beta.15",
|
||||
"perfect-scrollbar": "^1.4.0",
|
||||
"polished": "^3.0.3",
|
||||
"prismjs": "^1.15.0",
|
||||
"polished": "^3.4.1",
|
||||
"prismjs": "^1.17.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-dropdown": "^1.6.4",
|
||||
"react-hot-loader": "^4.8.0",
|
||||
"react-hot-loader": "^4.12.10",
|
||||
"react-tabs": "^3.0.0",
|
||||
"slugify": "^1.3.4",
|
||||
"stickyfill": "^1.1.1",
|
||||
"swagger2openapi": "^5.2.3",
|
||||
"tslib": "^1.9.3",
|
||||
"swagger2openapi": "^5.3.1",
|
||||
"tslib": "^1.10.0",
|
||||
"uri-template-lite": "^19.4.0"
|
||||
},
|
||||
"bundlesize": [
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import 'core-js/es6/promise';
|
||||
import 'core-js/fn/array/find';
|
||||
import 'core-js/fn/object/assign';
|
||||
import 'core-js/fn/string/ends-with';
|
||||
import 'core-js/fn/string/starts-with';
|
||||
import 'core-js/fn/object/assign';
|
||||
import 'core-js/es/promise';
|
||||
|
||||
import 'core-js/es6/map';
|
||||
import 'core-js/es6/symbol';
|
||||
import 'core-js/es/array/find';
|
||||
import 'core-js/es/object/assign';
|
||||
import 'core-js/es/string/ends-with';
|
||||
import 'core-js/es/string/starts-with';
|
||||
|
||||
import 'core-js/es/map';
|
||||
import 'core-js/es/symbol';
|
||||
|
||||
import 'unfetch/polyfill/index';
|
||||
import 'url-polyfill';
|
||||
|
|
|
@ -28,7 +28,10 @@ export class ClipboardService {
|
|||
if ((document as any).selection) {
|
||||
(document as any).selection.empty();
|
||||
} else if (window.getSelection) {
|
||||
window.getSelection().removeAllRanges();
|
||||
const selection = window.getSelection();
|
||||
if (selection) {
|
||||
selection.removeAllRanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,5 +73,5 @@ export function highlight(source: string, lang: string = DEFAULT_LANG): string {
|
|||
if (!grammar) {
|
||||
grammar = Prism.languages[mapLang(lang)];
|
||||
}
|
||||
return Prism.highlight(source, grammar);
|
||||
return Prism.highlight(source, grammar, lang);
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ import { OpenAPISpec } from '../types';
|
|||
|
||||
export async function loadAndBundleSpec(specUrlOrObject: object | string): Promise<OpenAPISpec> {
|
||||
const parser = new JsonSchemaRefParser();
|
||||
const spec = await parser.bundle(specUrlOrObject, {
|
||||
const spec = (await parser.bundle(specUrlOrObject, {
|
||||
resolve: { http: { withCredentials: false } },
|
||||
} as object);
|
||||
} as object)) as any;
|
||||
|
||||
if (spec.swagger !== undefined) {
|
||||
return convertSwagger2OpenAPI(spec);
|
||||
|
|
Loading…
Reference in New Issue
Block a user