Skip to content

Commit 7a7d75b

Browse files
committed
docs(update): deps and nextjs
1 parent f5f6c6f commit 7a7d75b

25 files changed

+1221
-6620
lines changed

.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ module.exports = {
99
modules: true,
1010
},
1111
},
12+
rules: {
13+
'turbo/no-undeclared-env-vars': 'off',
14+
},
1215
};

docs/next.config.js

+18-73
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,20 @@
1+
const webpack = require('webpack');
2+
const fs = require('fs');
13
const path = require('path');
2-
const dotenvLoad = require('dotenv-load');
3-
const optimizedImages = require('next-optimized-images');
4-
dotenvLoad();
4+
const visit = require('unist-util-visit');
5+
const remarkPlugins = require('./src/lib/docs/remark-plugins');
56

6-
const remarkPlugins = [
7-
require('remark-slug'),
8-
require('./src/lib/docs/remark-paragraph-alerts'),
9-
[
10-
require('remark-autolink-headings'),
11-
{
12-
behavior: 'append',
13-
linkProperties: {
14-
class: ['anchor'],
15-
title: 'Direct link to heading',
16-
},
17-
},
18-
],
19-
20-
require('remark-emoji'),
21-
require('remark-footnotes'),
22-
require('remark-images'),
23-
[
24-
require('remark-github'),
25-
{ repository: 'https://github.com/anymaniax/orval' },
26-
],
27-
require('remark-unwrap-images'),
28-
[
29-
require('remark-toc'),
30-
{
31-
skip: 'Reference',
32-
maxDepth: 6,
33-
},
34-
],
35-
];
36-
37-
module.exports = optimizedImages({
38-
pageExtensions: ['jsx', 'js', 'mdx', 'md'],
39-
async redirects() {
7+
module.exports = {
8+
pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'],
9+
rewrites() {
4010
return [
4111
{
42-
source: '/docs/:any*',
43-
destination: '/:any*', // Matched parameters can be used in the destination
44-
permanent: true,
12+
source: '/docs{/}?',
13+
destination: '/docs/overview',
4514
},
4615
];
4716
},
48-
experimental: {
49-
plugins: true,
50-
modern: true,
51-
},
5217
webpack: (config, { dev, isServer, ...options }) => {
53-
if (!isServer) {
54-
config.resolve.alias['@sentry/node'] = '@sentry/browser';
55-
}
56-
5718
config.module.rules.push({
5819
test: /.mdx?$/, // load both .md and .mdx files
5920
use: [
@@ -68,33 +29,17 @@ module.exports = optimizedImages({
6829
],
6930
});
7031

71-
// only compile build-rss in production server build
72-
if (dev || !isServer) {
73-
return config;
74-
}
75-
76-
// we're in build mode so enable shared caching for Notion data
77-
process.env.USE_CACHE = 'true';
32+
if (!dev && isServer) {
33+
// we're in build mode so enable shared caching for the GitHub API
34+
process.env.USE_CACHE = 'true';
35+
const originalEntry = config.entry;
7836

79-
const originalEntry = config.entry;
80-
config.entry = async () => {
81-
const entries = {
82-
...(await originalEntry()),
37+
config.entry = async () => {
38+
const entries = { ...(await originalEntry()) };
39+
return entries;
8340
};
84-
// entries['./scripts/build-rss.js'] = './src/lib/build-rss.js'
85-
return entries;
86-
};
41+
}
8742

8843
return config;
8944
},
90-
optimizeImages: {
91-
/* config for next-optimized-images */
92-
mozjpeg: {
93-
quality: 70,
94-
},
95-
optipng: {
96-
optimizationLevel: 3,
97-
},
98-
optimizeImagesInDev: true,
99-
},
100-
});
45+
};

docs/package.json

+14-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "fdocs3",
2+
"name": "docs",
33
"version": "1.0.0",
44
"main": "index.js",
55
"author": "Jared Palmer <[email protected]>",
@@ -11,22 +11,17 @@
1111
"sitemap": "node ./scripts/build-sitemap.js"
1212
},
1313
"dependencies": {
14-
"@babel/preset-typescript": "^7.10.4",
15-
"@docsearch/react": "1.0.0-alpha.14",
14+
"@docsearch/css": "1.0.0-alpha.27",
15+
"@docsearch/react": "1.0.0-alpha.27",
1616
"@mdx-js/loader": "^1.6.18",
1717
"@mdx-js/mdx": "^1.6.18",
1818
"@mdx-js/react": "^1.6.18",
1919
"@mdx-js/tag": "^0.20.3",
2020
"@monaco-editor/react": "^4.4.6",
21-
"@next/mdx": "^10.0.1",
21+
"@next/mdx": "13.4.4",
2222
"@octokit/graphql": "^5.0.4",
2323
"@reactions/component": "^2.0.2",
24-
"@sentry/browser": "^5.27.3",
25-
"@sentry/node": "^5.27.3",
2624
"@tanstack/react-query": "^4.22.0",
27-
"@zeit/fetch": "^6.0.0",
28-
"@zeit/react-jsx-parser": "^2.0.0",
29-
"async-sema": "^3.1.0",
3025
"axios": "^1.2.2",
3126
"body-scroll-lock": "^3.1.5",
3227
"classnames": "^2.2.6",
@@ -36,24 +31,16 @@
3631
"docsearch.js": "^2.6.3",
3732
"framer-motion": "^1.11.1",
3833
"gray-matter": "^4.0.2",
39-
"imagemin-mozjpeg": "^9.0.0",
40-
"imagemin-optipng": "^8.0.0",
4134
"intersection-observer": "^0.10.0",
42-
"isomorphic-unfetch": "^3.0.0",
43-
"next": "^10.0.1",
44-
"next-images": "^1.5.0",
45-
"next-optimized-images": "^2.6.2",
46-
"node-fetch": "^2.6.1",
35+
"next": "13.4.4",
4736
"orval": "^6.11.0",
4837
"prettier": "^2.8.3",
4938
"prismjs": "^1.21.0",
50-
"react": "^16.13.1",
51-
"react-dom": "^16.13.1",
39+
"react": "^18.2.0",
40+
"react-dom": "^18.2.0",
5241
"react-icons": "^3.11.0",
5342
"react-live": "^2.2.2",
5443
"react-select": "^5.7.0",
55-
"rehype-format": "^3.0.1",
56-
"rehype-stringify": "^7.0.0",
5744
"remark": "^12.0.1",
5845
"remark-autolink-headings": "^6.0.0",
5946
"remark-emoji": "^2.1.0",
@@ -63,34 +50,28 @@
6350
"remark-slug": "^6.0.0",
6451
"remark-toc": "^7.0.0",
6552
"remark-unwrap-images": "^2.0.0",
66-
"scroll-into-view-if-needed": "^2.2.26",
67-
"semver-regex": "^3.1.1",
6853
"unist-util-visit": "^2.0.3",
6954
"yaml": "^2.2.1"
7055
},
7156
"devDependencies": {
72-
"@babel/cli": "^7.11.6",
73-
"@babel/core": "^7.11.6",
74-
"@babel/plugin-transform-typescript": "^7.11.0",
75-
"@babel/preset-react": "^7.10.4",
76-
"@tailwindcss/ui": "^0.3.0",
57+
"@tailwindcss/forms": "^0.5.7",
58+
"@tailwindcss/ui": "^0.7.2",
7759
"algoliasearch": "3.35.1",
60+
"autoprefixer": "^10.4.16",
7861
"babel-preset-react-app": "^9.1.2",
7962
"dotenv-load": "^2.0.0",
8063
"github-slugger": "^1.3.0",
8164
"md5": "^2.3.0",
8265
"mdast-util-to-string": "^1.1.0",
8366
"nextjs-sitemap-generator": "^1.1.3",
84-
"postcss-preset-env": "^6.7.0",
67+
"postcss": "8.4.21",
8568
"remark-parse": "^8.0.3",
86-
"tailwindcss": "^1.8.10",
87-
"unified": "^9.2.0",
88-
"webp-loader": "^0.6.0"
69+
"tailwindcss": "^3.3.5"
8970
},
9071
"engines": {
91-
"node": "16.x"
72+
"node": "18.x"
9273
},
9374
"volta": {
94-
"node": "16.20.2"
75+
"node": "18.18.2"
9576
}
9677
}

docs/postcss.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// postcss.config.js
12
module.exports = {
2-
plugins: ['tailwindcss', 'postcss-preset-env'],
3+
plugins: {
4+
tailwindcss: {},
5+
autoprefixer: {},
6+
},
37
};
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/public/sitemap.xml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
3+
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
6+
xmlns:xhtml="http://www.w3.org/1999/xhtml">
7+
<url><loc>https://orval.dev/guides/angular</loc>
8+
9+
10+
11+
<lastmod>2023-11-14</lastmod>
12+
</url><url><loc>https://orval.dev/guides/basics</loc>
13+
14+
15+
16+
<lastmod>2023-11-14</lastmod>
17+
</url><url><loc>https://orval.dev/guides/custom-axios</loc>
18+
19+
20+
21+
<lastmod>2023-11-14</lastmod>
22+
</url><url><loc>https://orval.dev/guides/custom-client</loc>
23+
24+
25+
26+
<lastmod>2023-11-14</lastmod>
27+
</url><url><loc>https://orval.dev/guides/react-query</loc>
28+
29+
30+
31+
<lastmod>2023-11-14</lastmod>
32+
</url><url><loc>https://orval.dev/guides/set-base-url</loc>
33+
34+
35+
36+
<lastmod>2023-11-14</lastmod>
37+
</url><url><loc>https://orval.dev/guides/svelte-query</loc>
38+
39+
40+
41+
<lastmod>2023-11-14</lastmod>
42+
</url><url><loc>https://orval.dev/guides/swr</loc>
43+
44+
45+
46+
<lastmod>2023-11-14</lastmod>
47+
</url><url><loc>https://orval.dev/guides/vue-query</loc>
48+
49+
50+
51+
<lastmod>2023-11-14</lastmod>
52+
</url><url><loc>https://orval.dev/installation</loc>
53+
54+
55+
56+
<lastmod>2023-11-14</lastmod>
57+
</url><url><loc>https://orval.dev/overview</loc>
58+
59+
60+
61+
<lastmod>2023-11-14</lastmod>
62+
</url><url><loc>https://orval.dev/quick-start</loc>
63+
64+
65+
66+
<lastmod>2023-11-14</lastmod>
67+
</url><url><loc>https://orval.dev/reference/cli</loc>
68+
69+
70+
71+
<lastmod>2023-11-14</lastmod>
72+
</url><url><loc>https://orval.dev/reference/configuration/full-example</loc>
73+
74+
75+
76+
<lastmod>2023-11-14</lastmod>
77+
</url><url><loc>https://orval.dev/reference/configuration/hooks</loc>
78+
79+
80+
81+
<lastmod>2023-11-14</lastmod>
82+
</url><url><loc>https://orval.dev/reference/configuration/input</loc>
83+
84+
85+
86+
<lastmod>2023-11-14</lastmod>
87+
</url><url><loc>https://orval.dev/reference/configuration/output</loc>
88+
89+
90+
91+
<lastmod>2023-11-14</lastmod>
92+
</url><url><loc>https://orval.dev/reference/configuration/overview</loc>
93+
94+
95+
96+
<lastmod>2023-11-14</lastmod>
97+
</url><url><loc>https://orval.dev/reference/integration</loc>
98+
99+
100+
101+
<lastmod>2023-11-14</lastmod>
102+
</url></urlset>

docs/src/components/DocsPageFooter.js

+20-18
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,31 @@ export const DocsPageFooter = React.memo(({ route, prevRoute, nextRoute }) => {
2020
<div className="py-8">
2121
<div className="flex space-between items-center">
2222
{prevRoute && prevRoute.path ? (
23-
<NextLink href={removeFromLast(prevRoute.path, '.')}>
24-
<a className="flex-grow block">
25-
<span className="text-sm block text-gray-500 mb-1 font-semibold">
26-
← Prev
27-
</span>
28-
<span className="text-xl block text-blue-600 font-semibold">
29-
{prevRoute.title}
30-
</span>
31-
</a>
23+
<NextLink
24+
href={removeFromLast(prevRoute.path, '.')}
25+
className="flex-grow block"
26+
>
27+
<span className="text-sm block text-gray-500 mb-1 font-semibold">
28+
← Prev
29+
</span>
30+
<span className="text-xl block text-blue-600 font-semibold">
31+
{prevRoute.title}
32+
</span>
3233
</NextLink>
3334
) : (
3435
<div />
3536
)}
3637
{nextRoute && nextRoute.path && (
37-
<NextLink href={removeFromLast(nextRoute.path, '.')}>
38-
<a className="flex-grow text-right block">
39-
<span className="text-sm block text-gray-500 mb-1 font-semibold">
40-
Next →
41-
</span>
42-
<span className="text-xl block text-blue-600 font-semibold">
43-
{nextRoute.title}
44-
</span>
45-
</a>
38+
<NextLink
39+
href={removeFromLast(nextRoute.path, '.')}
40+
className="flex-grow text-right block"
41+
>
42+
<span className="text-sm block text-gray-500 mb-1 font-semibold">
43+
Next →
44+
</span>
45+
<span className="text-xl block text-blue-600 font-semibold">
46+
{nextRoute.title}
47+
</span>
4648
</NextLink>
4749
)}
4850
</div>

0 commit comments

Comments
 (0)