Skip to content

Commit

Permalink
Upgrade dependencies (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Mar 8, 2024
1 parent d48d8a5 commit c5e534f
Show file tree
Hide file tree
Showing 18 changed files with 1,325 additions and 1,500 deletions.
7 changes: 7 additions & 0 deletions .changeset/popular-brooms-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'docusaurus-plugin-redoc': patch
'docusaurus-theme-redoc': patch
'redocusaurus': patch
---

Upgrade dependencies
13 changes: 7 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,31 @@
"[javascript]": {
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
}
},
"[javascriptreact]": {
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
}
},
"[typescript]": {
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
}
},
"[typescriptreact]": {
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
}
},
"editor.tabCompletion": "on",
"editor.tabSize": 2,
"editor.rulers": [80, 120],
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": ["Redoc", "redocusaurus"]
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"cSpell.words": ["openapi", "Redoc", "Redocly", "redocusaurus"]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Rohit Gohri
Copyright (c) 2024 Rohit Gohri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
![GitHub branch checks state](https://img.shields.io/github/checks-status/rohit-gohri/redocusaurus/main?logo=github)
[![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/fef74697/redocusaurus)

[Redoc](https://github.com/redocly/redoc) for [Docusaurus v2](https://v2.docusaurus.io/).
[Redoc](https://github.com/redocly/redoc) for [Docusaurus](https://docusaurus.io/).

## Usage

Expand Down Expand Up @@ -52,4 +52,4 @@ See this issue, [https://github.com/facebook/docusaurus/issues/638](https://gith

## License

[MIT License. Copyright (c) 2023 Rohit Gohri](./LICENSE)
[MIT License. Copyright (c) 2024 Rohit Gohri](./LICENSE)
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": "yarn build:packages && yarn build:website",
"build:packages": "yarn workspaces foreach --from redocusaurus -tpvR run build",
"build:website": "yarn workspace redocusaurus exec 'echo \\\"$npm_package_version\\\" > $PROJECT_CWD/website/version.json' && yarn workspace redocusaurus-website run build",
"clean": "yarn workspaces foreach --all --exclude redocusaurus-monorepo -AtvR exec \"rm -rf build .docusaurus dist dist-jsx .tsbuild.info .tsbuild.jsx.info\"",
"clean": "yarn workspaces foreach --all --exclude redocusaurus-monorepo -tv exec \"rm -rf build .docusaurus dist dist-jsx .tsbuild.info .tsbuild.jsx.info\"",
"dev": "yarn build:packages && yarn workspaces foreach --from redocusaurus-website -pivR run dev",
"dev:packages": "yarn workspaces foreach --from redocusaurus -pivR run dev",
"dev:website": "yarn workspace redocusaurus-website run dev",
Expand Down Expand Up @@ -39,21 +39,21 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"concurrently": "^7.6.0",
"eslint": "^8.53.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"lint-staged": "^13.1.1",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "3.0.3",
"typescript": "^5.2.2"
"typescript": "5.3.3"
},
"engines": {
"node": ">=18"
Expand Down
14 changes: 7 additions & 7 deletions packages/docusaurus-plugin-redoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@
},
"homepage": "https://github.com/rohit-gohri/redocusaurus/tree/main/packages/docusaurus-plugin-redoc#readme",
"dependencies": {
"@redocly/openapi-core": "1.4.0",
"@redocly/openapi-core": "1.10.3",
"redoc": "2.1.3"
},
"devDependencies": {
"@docusaurus/types": "^3.0.0",
"@docusaurus/utils": "^3.0.0",
"core-js": "^3.33.2",
"mobx": "^6.10.2",
"@docusaurus/types": "^3.1.1",
"@docusaurus/utils": "^3.1.1",
"core-js": "^3.36.0",
"mobx": "^6.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"styled-components": "^6.1.0",
"typescript": "^5.2.2"
"styled-components": "^6.1.8",
"typescript": "^5.4.2"
},
"peerDependencies": {
"@docusaurus/utils": "^3.0.0"
Expand Down
30 changes: 15 additions & 15 deletions packages/docusaurus-theme-redoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@
},
"homepage": "https://github.com/rohit-gohri/redocusaurus/tree/main/packages/docusaurus-theme-redoc#readme",
"dependencies": {
"@redocly/openapi-core": "1.4.0",
"@redocly/openapi-core": "1.10.3",
"clsx": "^1.2.1",
"copyfiles": "^2.4.1",
"lodash": "^4.17.21",
"mobx": "^6.10.2",
"mobx": "^6.0.4",
"redoc": "2.1.3",
"styled-components": "^6.1.0"
"styled-components": "^6.0.5"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/theme-classic": "^3.0.0",
"@docusaurus/theme-common": "^3.0.0",
"@docusaurus/types": "^3.0.0",
"@docusaurus/module-type-aliases": "^3.1.1",
"@docusaurus/theme-classic": "^3.1.1",
"@docusaurus/theme-common": "^3.1.1",
"@docusaurus/types": "^3.1.1",
"@types/lodash": "^4.14.200",
"@types/react": "^18.2.34",
"@types/react-dom": "^18.2.14",
"@types/react-is": "^18.2.3",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@types/react-is": "^18.2.4",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.29",
"core-js": "^3.33.2",
"nodemon": "^2.0.20",
"@types/styled-components": "^5.1.34",
"copyfiles": "^2.4.1",
"core-js": "^3.36.0",
"nodemon": "^3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"typescript": "^5.2.2"
"typescript": "^5.4.2"
},
"peerDependencies": {
"@docusaurus/theme-common": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-redoc/src/theme/Redoc/Redoc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ServerRedoc from './ServerRedoc';
/*!
* Redocusaurus
* https://redocusaurus.vercel.app/
* (c) 2023 Rohit Gohri
* (c) 2024 Rohit Gohri
* Released under the MIT License
*/
function Redoc(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import './styles.css';
/*!
* Redocusaurus
* https://redocusaurus.vercel.app/
* (c) 2023 Rohit Gohri
* (c) 2024 Rohit Gohri
* Released under the MIT License
*/
function ServerRedoc(
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-redoc/src/utils/useSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let currentStore: AppStore | null = null;
/**
* Redocusaurus
* https://redocusaurus.vercel.app/
* (c) 2023 Rohit Gohri
* (c) 2024 Rohit Gohri
* Released under the MIT License
*/
export function useSpec(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { GlobalData } from '../types/options';
/**
* Redocusaurus
* https://redocusaurus.vercel.app/
* (c) 2023 Rohit Gohri
* (c) 2024 Rohit Gohri
* Released under the MIT License
*/
export function useSpecOptions(
Expand Down
130 changes: 59 additions & 71 deletions packages/redocusaurus/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,85 +2,73 @@

![npm](https://img.shields.io/npm/v/redocusaurus?style=flat-square)

[Redoc](https://github.com/redocly/redoc) for [Docusaurus v2](https://v2.docusaurus.io/).
[Redoc](https://github.com/redocly/redoc) for [Docusaurus](https://docusaurus.io/).

## Usage

1. Setup [docusaurus project](https://docusaurus.io/docs/installation)

1. Install redocusaurus:

```sh
npm i --save redocusaurus
# OR
yarn add redocusaurus
```
```sh
yarn add redocusaurus
# OR
pnpm add redocusaurus
# OR
npm i --save redocusaurus
```

1. Add it as a preset to your docusaurus config along with [@docusaurus/preset-classic](https://docusaurus.io/docs/using-plugins#docusauruspreset-classic) and pass options:

- Pass it a path to a local OpenAPI YAML file

```js
// docusaurus.config.js

module.exports = {
// ...
presets: [
// .. Your other presets' config
'@docusaurus/preset-classic',
// Redocusaurus config
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
{
spec: 'openapi/openapi.yaml',
route: '/api/',
},
],
// Theme Options for modifying how redoc renders them
theme: {
// Change with your site colors
primaryColor: '#1890ff',
},
},
],
],
// ...
};
```

- OR Pass it a OpenAPI spec URL

```js
// docusaurus.config.js

module.exports = {
// ...
presets: [
// .. Your other presets' config
'@docusaurus/preset-classic',
// Redocusaurus config
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
{
spec: 'https://redocly.github.io/redoc/openapi.yaml',
route: '/api/',
},
],
// Theme Options for modifying how redoc renders them
theme: {
// Change with your site colors
primaryColor: '#1890ff',
},
},
],
],
// ...
};
```
```js
// docusaurus.config.ts
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
import type * as Redocusaurus from 'redocusaurus';

const config: Config = {
// ...
presets: [
// .. Your other presets' config
[
'@docusaurus/preset-classic',
{
googleAnalytics: {
trackingID: 'XXXXXX',
},
} satisfies Preset.Options,
]
// Redocusaurus config
[
'redocusaurus',
{
// Plugin Options for loading OpenAPI files
specs: [
// Pass it a path to a local OpenAPI YAML file
{
// Redocusaurus will automatically bundle your spec into a single file during the build
spec: 'openapi/index.yaml',
route: '/api/',
},
// You can also pass it a OpenAPI spec URL
{
spec: 'https://redocly.github.io/redoc/openapi.yaml',
route: '/openapi/',
},
],
// Theme Options for modifying how redoc renders them
theme: {
// Change with your site colors
primaryColor: '#1890ff',
},
},
] satisfies Redocusaurus.PresetEntry,
],
// ... Rest of your config
};

export default config;
```

The API Doc will be available at the route specified (`/api/` in the example above). To customize it see [full plugin options](https://redocusaurus.vercel.app/docs/getting-started/plugin-options).

Expand Down
4 changes: 2 additions & 2 deletions packages/redocusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"node": ">=14"
},
"devDependencies": {
"typescript": "^5.2.2",
"webpack": "^5.0.0"
"typescript": "^5.4.2",
"webpack": "^5.90.3"
}
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"module": "commonjs",
"allowJs": true,
"checkJs": true,
"resolveJsonModule": true,
"jsx": "react",
"rootDir": "./",
"moduleResolution": "node",
Expand Down
Loading

0 comments on commit c5e534f

Please sign in to comment.