Skip to content

Commit facba25

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

File tree

10 files changed

+3671
-2588
lines changed

10 files changed

+3671
-2588
lines changed

Diff for: .github/workflows/documentation.yml

+2-2
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/[email protected]
3737
with:
3838
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}

Diff for: .github/workflows/release.yml

+2-2
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

Diff for: .github/workflows/test-integration.yml

+1-1
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

Diff for: .github/workflows/test.yml

+1-1
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

Diff for: .github/workflows/validate.yml

+1-1
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

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.13.2
1+
v18

Diff for: website/docs/faq.mdx

-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ slug: /faq
99
By default, CodeshiftCommunity uses JSCodeshift because it is the most commonly used AST transformation library in the community. Many codemods are already written with JSCodeshift, and our goal is to consolidate these codemods in one place.
1010

1111
However, we are compatible with any JS-based AST transformation library, such as **Babel**, **PostCSS**, and **esprima**. We also provide guides for using non-JSCodeshift libraries, and we aim to support the transformation of any target file, including but not limited to JS, TS, CSS, LESS, Sass, and JSON.
12-
13-
For guidance on writing codemods with postcss, please refer to our guide on [CSS codemods via PostCSS](docs/css-codemods).
14-

Diff for: website/docusaurus.config.js

+47-2
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,41 @@ module.exports = {
164172
async: true,
165173
},
166174
],
175+
plugins: [
176+
[
177+
'@docusaurus/plugin-client-redirects',
178+
{
179+
redirects: [
180+
{
181+
from: '/',
182+
to: 'https://www.hypermod.io/',
183+
},
184+
{
185+
from: '/docs',
186+
to: 'https://www.hypermod.io/docs',
187+
},
188+
{
189+
from: '/docs/your-first-codemod',
190+
to: 'https://www.hypermod.io/docs/guides/your-first-codemod',
191+
},
192+
{
193+
from: '/docs/understanding-asts',
194+
to: 'https://www.hypermod.io/docs/guides/understanding-asts',
195+
},
196+
{
197+
from: '/docs/import-manipulation',
198+
to: 'https://www.hypermod.io/docs/guides/import-manipulation',
199+
},
200+
{
201+
from: '/docs/react',
202+
to: 'https://www.hypermod.io/docs/guides/react-jsx',
203+
},
204+
{
205+
from: '/docs/typescript',
206+
to: 'https://www.hypermod.io/docs/guides/typescript',
207+
},
208+
],
209+
},
210+
],
211+
],
167212
};

Diff for: website/package.json

+14-5
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)