Skip to content

Commit c5e534f

Browse files
authored
Upgrade dependencies (#335)
1 parent d48d8a5 commit c5e534f

File tree

18 files changed

+1325
-1500
lines changed

18 files changed

+1325
-1500
lines changed

.changeset/popular-brooms-care.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'docusaurus-plugin-redoc': patch
3+
'docusaurus-theme-redoc': patch
4+
'redocusaurus': patch
5+
---
6+
7+
Upgrade dependencies

.vscode/settings.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,31 @@
1414
"[javascript]": {
1515
"editor.formatOnSave": false,
1616
"editor.codeActionsOnSave": {
17-
"source.fixAll": true
17+
"source.fixAll": "explicit"
1818
}
1919
},
2020
"[javascriptreact]": {
2121
"editor.formatOnSave": false,
2222
"editor.codeActionsOnSave": {
23-
"source.fixAll": true
23+
"source.fixAll": "explicit"
2424
}
2525
},
2626
"[typescript]": {
2727
"editor.formatOnSave": false,
2828
"editor.codeActionsOnSave": {
29-
"source.fixAll": true
29+
"source.fixAll": "explicit"
3030
}
3131
},
3232
"[typescriptreact]": {
3333
"editor.formatOnSave": false,
3434
"editor.codeActionsOnSave": {
35-
"source.fixAll": true
35+
"source.fixAll": "explicit"
3636
}
3737
},
3838
"editor.tabCompletion": "on",
3939
"editor.tabSize": 2,
4040
"editor.rulers": [80, 120],
41-
"typescript.tsdk": "node_modules/typescript/lib",
42-
"cSpell.words": ["Redoc", "redocusaurus"]
41+
"typescript.tsdk": "./node_modules/typescript/lib",
42+
"typescript.enablePromptUseWorkspaceTsdk": true,
43+
"cSpell.words": ["openapi", "Redoc", "Redocly", "redocusaurus"]
4344
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Rohit Gohri
3+
Copyright (c) 2024 Rohit Gohri
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
![GitHub branch checks state](https://img.shields.io/github/checks-status/rohit-gohri/redocusaurus/main?logo=github)
99
[![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io/fef74697/redocusaurus)
1010

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

1313
## Usage
1414

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

5353
## License
5454

55-
[MIT License. Copyright (c) 2023 Rohit Gohri](./LICENSE)
55+
[MIT License. Copyright (c) 2024 Rohit Gohri](./LICENSE)

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "yarn build:packages && yarn build:website",
77
"build:packages": "yarn workspaces foreach --from redocusaurus -tpvR run build",
88
"build:website": "yarn workspace redocusaurus exec 'echo \\\"$npm_package_version\\\" > $PROJECT_CWD/website/version.json' && yarn workspace redocusaurus-website run build",
9-
"clean": "yarn workspaces foreach --all --exclude redocusaurus-monorepo -AtvR exec \"rm -rf build .docusaurus dist dist-jsx .tsbuild.info .tsbuild.jsx.info\"",
9+
"clean": "yarn workspaces foreach --all --exclude redocusaurus-monorepo -tv exec \"rm -rf build .docusaurus dist dist-jsx .tsbuild.info .tsbuild.jsx.info\"",
1010
"dev": "yarn build:packages && yarn workspaces foreach --from redocusaurus-website -pivR run dev",
1111
"dev:packages": "yarn workspaces foreach --from redocusaurus -pivR run dev",
1212
"dev:website": "yarn workspace redocusaurus-website run dev",
@@ -39,21 +39,21 @@
3939
"devDependencies": {
4040
"@changesets/changelog-github": "^0.4.8",
4141
"@changesets/cli": "^2.26.2",
42-
"@typescript-eslint/eslint-plugin": "^6.9.1",
43-
"@typescript-eslint/parser": "^6.9.1",
44-
"concurrently": "^7.6.0",
45-
"eslint": "^8.53.0",
42+
"@typescript-eslint/eslint-plugin": "^6.21.0",
43+
"@typescript-eslint/parser": "^6.21.0",
44+
"concurrently": "^8.2.2",
45+
"eslint": "^8.57.0",
4646
"eslint-config-airbnb-typescript": "^17.1.0",
47-
"eslint-config-prettier": "^9.0.0",
48-
"eslint-plugin-import": "^2.29.0",
47+
"eslint-config-prettier": "^9.1.0",
48+
"eslint-plugin-import": "^2.29.1",
4949
"eslint-plugin-jsx-a11y": "^6.8.0",
50-
"eslint-plugin-prettier": "^5.0.1",
51-
"eslint-plugin-react": "^7.33.2",
50+
"eslint-plugin-prettier": "^5.1.3",
51+
"eslint-plugin-react": "^7.34.0",
5252
"eslint-plugin-react-hooks": "^4.6.0",
53-
"husky": "^8.0.3",
54-
"lint-staged": "^13.1.1",
53+
"husky": "^9.0.11",
54+
"lint-staged": "^15.2.2",
5555
"prettier": "3.0.3",
56-
"typescript": "^5.2.2"
56+
"typescript": "5.3.3"
5757
},
5858
"engines": {
5959
"node": ">=18"

packages/docusaurus-plugin-redoc/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@
2929
},
3030
"homepage": "https://github.com/rohit-gohri/redocusaurus/tree/main/packages/docusaurus-plugin-redoc#readme",
3131
"dependencies": {
32-
"@redocly/openapi-core": "1.4.0",
32+
"@redocly/openapi-core": "1.10.3",
3333
"redoc": "2.1.3"
3434
},
3535
"devDependencies": {
36-
"@docusaurus/types": "^3.0.0",
37-
"@docusaurus/utils": "^3.0.0",
38-
"core-js": "^3.33.2",
39-
"mobx": "^6.10.2",
36+
"@docusaurus/types": "^3.1.1",
37+
"@docusaurus/utils": "^3.1.1",
38+
"core-js": "^3.36.0",
39+
"mobx": "^6.12.0",
4040
"react": "^18.2.0",
4141
"react-dom": "^18.2.0",
4242
"react-is": "^18.2.0",
43-
"styled-components": "^6.1.0",
44-
"typescript": "^5.2.2"
43+
"styled-components": "^6.1.8",
44+
"typescript": "^5.4.2"
4545
},
4646
"peerDependencies": {
4747
"@docusaurus/utils": "^3.0.0"

packages/docusaurus-theme-redoc/package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,31 @@
3232
},
3333
"homepage": "https://github.com/rohit-gohri/redocusaurus/tree/main/packages/docusaurus-theme-redoc#readme",
3434
"dependencies": {
35-
"@redocly/openapi-core": "1.4.0",
35+
"@redocly/openapi-core": "1.10.3",
3636
"clsx": "^1.2.1",
37-
"copyfiles": "^2.4.1",
3837
"lodash": "^4.17.21",
39-
"mobx": "^6.10.2",
38+
"mobx": "^6.0.4",
4039
"redoc": "2.1.3",
41-
"styled-components": "^6.1.0"
40+
"styled-components": "^6.0.5"
4241
},
4342
"devDependencies": {
44-
"@docusaurus/module-type-aliases": "^3.0.0",
45-
"@docusaurus/theme-classic": "^3.0.0",
46-
"@docusaurus/theme-common": "^3.0.0",
47-
"@docusaurus/types": "^3.0.0",
43+
"@docusaurus/module-type-aliases": "^3.1.1",
44+
"@docusaurus/theme-classic": "^3.1.1",
45+
"@docusaurus/theme-common": "^3.1.1",
46+
"@docusaurus/types": "^3.1.1",
4847
"@types/lodash": "^4.14.200",
49-
"@types/react": "^18.2.34",
50-
"@types/react-dom": "^18.2.14",
51-
"@types/react-is": "^18.2.3",
48+
"@types/react": "^18.2.64",
49+
"@types/react-dom": "^18.2.21",
50+
"@types/react-is": "^18.2.4",
5251
"@types/react-router-dom": "^5.3.3",
53-
"@types/styled-components": "^5.1.29",
54-
"core-js": "^3.33.2",
55-
"nodemon": "^2.0.20",
52+
"@types/styled-components": "^5.1.34",
53+
"copyfiles": "^2.4.1",
54+
"core-js": "^3.36.0",
55+
"nodemon": "^3.1.0",
5656
"react": "^18.2.0",
5757
"react-dom": "^18.2.0",
5858
"react-is": "^18.2.0",
59-
"typescript": "^5.2.2"
59+
"typescript": "^5.4.2"
6060
},
6161
"peerDependencies": {
6262
"@docusaurus/theme-common": "^3.0.0",

packages/docusaurus-theme-redoc/src/theme/Redoc/Redoc.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import ServerRedoc from './ServerRedoc';
1010
/*!
1111
* Redocusaurus
1212
* https://redocusaurus.vercel.app/
13-
* (c) 2023 Rohit Gohri
13+
* (c) 2024 Rohit Gohri
1414
* Released under the MIT License
1515
*/
1616
function Redoc(

packages/docusaurus-theme-redoc/src/theme/Redoc/ServerRedoc.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import './styles.css';
1010
/*!
1111
* Redocusaurus
1212
* https://redocusaurus.vercel.app/
13-
* (c) 2023 Rohit Gohri
13+
* (c) 2024 Rohit Gohri
1414
* Released under the MIT License
1515
*/
1616
function ServerRedoc(

packages/docusaurus-theme-redoc/src/utils/useSpec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let currentStore: AppStore | null = null;
1313
/**
1414
* Redocusaurus
1515
* https://redocusaurus.vercel.app/
16-
* (c) 2023 Rohit Gohri
16+
* (c) 2024 Rohit Gohri
1717
* Released under the MIT License
1818
*/
1919
export function useSpec(

packages/docusaurus-theme-redoc/src/utils/useSpecOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { GlobalData } from '../types/options';
1414
/**
1515
* Redocusaurus
1616
* https://redocusaurus.vercel.app/
17-
* (c) 2023 Rohit Gohri
17+
* (c) 2024 Rohit Gohri
1818
* Released under the MIT License
1919
*/
2020
export function useSpecOptions(

packages/redocusaurus/Readme.md

+59-71
Original file line numberDiff line numberDiff line change
@@ -2,85 +2,73 @@
22

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

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

77
## Usage
88

9+
1. Setup [docusaurus project](https://docusaurus.io/docs/installation)
10+
911
1. Install redocusaurus:
1012

11-
```sh
12-
npm i --save redocusaurus
13-
# OR
14-
yarn add redocusaurus
15-
```
13+
```sh
14+
yarn add redocusaurus
15+
# OR
16+
pnpm add redocusaurus
17+
# OR
18+
npm i --save redocusaurus
19+
```
1620

1721
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:
1822

19-
- Pass it a path to a local OpenAPI YAML file
20-
21-
```js
22-
// docusaurus.config.js
23-
24-
module.exports = {
25-
// ...
26-
presets: [
27-
// .. Your other presets' config
28-
'@docusaurus/preset-classic',
29-
// Redocusaurus config
30-
[
31-
'redocusaurus',
32-
{
33-
// Plugin Options for loading OpenAPI files
34-
specs: [
35-
{
36-
spec: 'openapi/openapi.yaml',
37-
route: '/api/',
38-
},
39-
],
40-
// Theme Options for modifying how redoc renders them
41-
theme: {
42-
// Change with your site colors
43-
primaryColor: '#1890ff',
44-
},
45-
},
46-
],
47-
],
48-
// ...
49-
};
50-
```
51-
52-
- OR Pass it a OpenAPI spec URL
53-
54-
```js
55-
// docusaurus.config.js
56-
57-
module.exports = {
58-
// ...
59-
presets: [
60-
// .. Your other presets' config
61-
'@docusaurus/preset-classic',
62-
// Redocusaurus config
63-
[
64-
'redocusaurus',
65-
{
66-
// Plugin Options for loading OpenAPI files
67-
specs: [
68-
{
69-
spec: 'https://redocly.github.io/redoc/openapi.yaml',
70-
route: '/api/',
71-
},
72-
],
73-
// Theme Options for modifying how redoc renders them
74-
theme: {
75-
// Change with your site colors
76-
primaryColor: '#1890ff',
77-
},
78-
},
79-
],
80-
],
81-
// ...
82-
};
83-
```
23+
```js
24+
// docusaurus.config.ts
25+
import type { Config } from '@docusaurus/types';
26+
import type * as Preset from '@docusaurus/preset-classic';
27+
import type * as Redocusaurus from 'redocusaurus';
28+
29+
const config: Config = {
30+
// ...
31+
presets: [
32+
// .. Your other presets' config
33+
[
34+
'@docusaurus/preset-classic',
35+
{
36+
googleAnalytics: {
37+
trackingID: 'XXXXXX',
38+
},
39+
} satisfies Preset.Options,
40+
]
41+
// Redocusaurus config
42+
[
43+
'redocusaurus',
44+
{
45+
// Plugin Options for loading OpenAPI files
46+
specs: [
47+
// Pass it a path to a local OpenAPI YAML file
48+
{
49+
// Redocusaurus will automatically bundle your spec into a single file during the build
50+
spec: 'openapi/index.yaml',
51+
route: '/api/',
52+
},
53+
// You can also pass it a OpenAPI spec URL
54+
{
55+
spec: 'https://redocly.github.io/redoc/openapi.yaml',
56+
route: '/openapi/',
57+
},
58+
],
59+
// Theme Options for modifying how redoc renders them
60+
theme: {
61+
// Change with your site colors
62+
primaryColor: '#1890ff',
63+
},
64+
},
65+
] satisfies Redocusaurus.PresetEntry,
66+
],
67+
// ... Rest of your config
68+
};
69+
70+
export default config;
71+
```
8472

8573
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).
8674

packages/redocusaurus/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"node": ">=14"
5353
},
5454
"devDependencies": {
55-
"typescript": "^5.2.2",
56-
"webpack": "^5.0.0"
55+
"typescript": "^5.4.2",
56+
"webpack": "^5.90.3"
5757
}
5858
}

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"module": "commonjs",
66
"allowJs": true,
77
"checkJs": true,
8+
"resolveJsonModule": true,
89
"jsx": "react",
910
"rootDir": "./",
1011
"moduleResolution": "node",

0 commit comments

Comments
 (0)