Skip to content

Commit e8e0e2b

Browse files
author
Daniel Del Core
committed
redirects and dep upgrades
1 parent 23dba1a commit e8e0e2b

File tree

9 files changed

+3667
-2585
lines changed

9 files changed

+3667
-2585
lines changed

.github/workflows/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v1
1515
- uses: actions/setup-node@v1
1616
with:
17-
node-version: '16.x'
17+
node-version: '18.x'
1818
- name: Generate docs
1919
run: |
2020
yarn install --frozen-lockfile
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@v1
3333
- uses: actions/setup-node@v1
3434
with:
35-
node-version: '16.x'
35+
node-version: '18.x'
3636
- uses: webfactory/ssh-agent@v0.5.0
3737
with:
3838
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
1717
fetch-depth: 0
1818

19-
- name: Setup Node.js 16.x
19+
- name: Setup Node.js 18.x
2020
uses: actions/setup-node@master
2121
with:
22-
node-version: 16.x
22+
node-version: 18.x
2323

2424
- name: Install Dependencies
2525
run: yarn

.github/workflows/test-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node-version: [16.x]
14+
node-version: [18.x]
1515

1616
steps:
1717
- uses: actions/checkout@v2

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [16.x]
15+
node-version: [18.x]
1616

1717
steps:
1818
- uses: actions/checkout@v2

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [16.x]
15+
node-version: [18.x]
1616

1717
steps:
1818
- uses: actions/checkout@v2

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.13.2
1+
v18

website/docusaurus.config.js

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/** @type {import('@docusaurus/types').DocusaurusConfig} */
2+
3+
const { themes } = require('prism-react-renderer');
4+
const lightTheme = themes.github;
5+
const darkTheme = themes.palenight;
6+
27
module.exports = {
38
title: 'Hypermod Community',
49
tagline: 'Codemods for everyone ✨',
@@ -11,6 +16,9 @@ module.exports = {
1116
projectName: 'hypermod-community',
1217
trailingSlash: false,
1318
themeConfig: {
19+
defaultMode: 'light',
20+
disableSwitch: true,
21+
respectPrefersColorScheme: false,
1422
image: 'img/TwitterBanner.png',
1523
metadata: [
1624
{
@@ -30,8 +38,8 @@ module.exports = {
3038
},
3139
],
3240
prism: {
33-
theme: require('prism-react-renderer/themes/github'),
34-
darkTheme: require('prism-react-renderer/themes/palenight'),
41+
theme: lightTheme,
42+
darkTheme: darkTheme,
3543
},
3644
navbar: {
3745
title: 'Hypermod Community',
@@ -164,4 +172,37 @@ module.exports = {
164172
async: true,
165173
},
166174
],
175+
plugins: [
176+
[
177+
'@docusaurus/plugin-client-redirects',
178+
{
179+
redirects: [
180+
{
181+
from: '/docs',
182+
to: 'https://www.hypermod.io/docs',
183+
},
184+
{
185+
from: '/docs/your-first-codemod',
186+
to: 'https://www.hypermod.io/docs/guides/your-first-codemod',
187+
},
188+
{
189+
from: '/docs/understanding-asts',
190+
to: 'https://www.hypermod.io/docs/guides/understanding-asts',
191+
},
192+
{
193+
from: '/docs/import-manipulation',
194+
to: 'https://www.hypermod.io/docs/guides/import-manipulation',
195+
},
196+
{
197+
from: '/docs/react',
198+
to: 'https://www.hypermod.io/docs/guides/react-jsx',
199+
},
200+
{
201+
from: '/docs/typescript',
202+
to: 'https://www.hypermod.io/docs/guides/typescript',
203+
},
204+
],
205+
},
206+
],
207+
],
167208
};

website/package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "2.4.1",
18-
"@docusaurus/preset-classic": "2.4.1",
19-
"@mdx-js/react": "^1.6.21",
17+
"@docusaurus/core": "^3.4.0",
18+
"@docusaurus/plugin-client-redirects": "^3.4.0",
19+
"@docusaurus/preset-classic": "^3.4.0",
20+
"@mdx-js/react": "^3.0.0",
2021
"clsx": "^1.1.1",
21-
"react": "^17.0.1",
22-
"react-dom": "^17.0.1"
22+
"prism-react-renderer": "^2.1.0",
23+
"react": "^18.2.0",
24+
"react-dom": "^18.2.0"
25+
},
26+
"devDependencies": {
27+
"@docusaurus/module-type-aliases": "^3.4.0",
28+
"@docusaurus/types": "^3.4.0"
2329
},
2430
"browserslist": {
2531
"production": [
@@ -32,5 +38,8 @@
3238
"last 1 firefox version",
3339
"last 1 safari version"
3440
]
41+
},
42+
"engines": {
43+
"node": ">=18.0"
3544
}
3645
}

0 commit comments

Comments
 (0)