Skip to content

Commit ff0402a

Browse files
authored
chore: switch to pnpm, dependency updates, Node 20 (#350)
1 parent 7dac71e commit ff0402a

13 files changed

+11146
-17667
lines changed

.devcontainer/devcontainer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
},
1616
"extensions": ["esbenp.prettier-vscode"],
1717
"forwardPorts": [3000],
18-
"postCreateCommand": ["yarn", "install"],
18+
"postCreateCommand": ["pnpm", "install"],
1919
"waitFor": "postCreateCommand",
2020
"features": {
2121
"node": {
22-
"version": "18"
22+
"version": "20"
2323
}
2424
}
2525
}

.github/workflows/format.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ jobs:
1313
steps:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v3
1618
- name: Set up Node
1719
uses: actions/setup-node@v4
1820
with:
1921
node-version: 20
20-
cache: "yarn"
22+
cache: "pnpm"
2123
- name: Install dependencies
22-
uses: borales/actions-yarn@v5
23-
with:
24-
cmd: install
24+
run: pnpm install
2525
- name: Check format
26-
uses: borales/actions-yarn@v5
27-
with:
28-
cmd: format:check
26+
run: pnpm run format:check

.gitignore

-8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,5 @@
66
.cache-loader
77
.DS_Store
88
npm-debug.log*
9-
yarn-debug.log*
10-
yarn-error.log*
119
.pnp.*
12-
.yarn/*
13-
!.yarn/patches
14-
!.yarn/plugins
15-
!.yarn/releases
16-
!.yarn/sdks
17-
!.yarn/versions
1810
/.meta

.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.yarn
1+
pnpm-lock.yaml
22
docs/versioned
33
*.md
44
*.mdx

.yarn/releases/yarn-4.1.1.cjs

-893
This file was deleted.

.yarnrc.yml

-14
This file was deleted.

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ To maintain consistency and readability across the documentation, please adhere
9191

9292
7. **Images**: Include images if necessary to illustrate concepts. Ensure the images are clear and relevant to the content.
9393

94-
8. **Format Code**: After you've made changes, don't forget to run the formatting script with `yarn format`.
94+
8. **Format Code**: After you've made changes, don't forget to run the formatting script with `pnpm run format`.
9595

9696
9. **Keep It Concise**: Write clear and concise sentences. Avoid unnecessary jargon and explanations.
9797

@@ -151,10 +151,10 @@ of a few ways:
151151
````
152152

153153
When the major version of the software changes, the docs will still need to have a "snapshot" created to keep documentation
154-
for older versions. This is done by using yarn's docusaurus version command:
154+
for older versions. This is done by using Docusaurus's `version` command:
155155

156156
```bash
157-
yarn docusaurus docs:version:paper "1.20"
157+
pnpm docusaurus docs:version:paper "1.20"
158158
```
159159

160160
## Magic Value Handling

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ How to get docs running on your local machine for development.
1212
### Prerequisites
1313

1414
- [node](https://nodejs.org)
15-
- [yarn](https://yarnpkg.com/getting-started/install)
15+
- [pnpm](https://pnpm.io/installation)
1616

1717
### Local Development
1818

@@ -25,13 +25,13 @@ $ git clone https://github.com/PaperMC/docs
2525
2. Install all required dependencies.
2626

2727
```bash
28-
$ yarn
28+
$ pnpm install
2929
```
3030

31-
3. Start the development server
31+
3. Start the development server.
3232

3333
```bash
34-
$ yarn dev
34+
$ pnpm run dev
3535
```
3636

3737
This will start a local development server and open a browser window. The majority of changes will
@@ -41,7 +41,7 @@ your browser. Edit away!
4141
### Building
4242

4343
```bash
44-
$ yarn build
44+
$ pnpm run build
4545
```
4646

4747
This command builds a production-ready deployment into the `build` directory. These files are ready

docusaurus.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const config: Config = {
189189
},
190190
],
191191
"@docusaurus/plugin-debug",
192-
"@gracefullight/docusaurus-plugin-vercel-analytics",
192+
"@docusaurus/plugin-vercel-analytics",
193193
],
194194

195195
themeConfig: {

package.json

+23-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"dev": "docusaurus start --no-open --no-minify",
8-
"start": "yarn build && yarn serve",
8+
"start": "pnpm run build && pnpm run serve",
99
"build": "docusaurus build",
1010
"clear": "docusaurus clear",
1111
"serve": "docusaurus serve --no-open",
@@ -22,18 +22,18 @@
2222
"@docusaurus/plugin-debug": "3.2.1",
2323
"@docusaurus/plugin-pwa": "3.2.1",
2424
"@docusaurus/plugin-sitemap": "3.2.1",
25+
"@docusaurus/plugin-vercel-analytics": "3.2.1",
2526
"@docusaurus/theme-classic": "3.2.1",
2627
"@docusaurus/theme-common": "3.2.1",
2728
"@docusaurus/theme-mermaid": "3.2.1",
2829
"@docusaurus/theme-search-algolia": "3.2.1",
29-
"@fontsource/jetbrains-mono": "4.5.12",
30-
"@gracefullight/docusaurus-plugin-vercel-analytics": "1.0.0",
30+
"@fontsource/jetbrains-mono": "5.0.19",
3131
"@iconify/react": "4.1.1",
3232
"@mdx-js/react": "3.0.0",
33-
"axios": "1.6.3",
34-
"clsx": "1.2.1",
33+
"axios": "1.6.8",
34+
"clsx": "2.1.0",
3535
"js-yaml": "4.1.0",
36-
"prism-react-renderer": "2.0.3",
36+
"prism-react-renderer": "^2.3.0",
3737
"raw-loader": "4.0.2",
3838
"react": "^18.1.0",
3939
"react-dom": "^18.1.0",
@@ -42,17 +42,20 @@
4242
"devDependencies": {
4343
"@docusaurus/module-type-aliases": "3.2.1",
4444
"@docusaurus/types": "3.2.1",
45-
"@fec/remark-a11y-emoji": "3.1.0",
46-
"@tsconfig/docusaurus": "1.0.7",
47-
"@types/is-ci": "3.0.0",
48-
"@types/js-yaml": "^4",
49-
"@types/node": "17.0.45",
50-
"esbuild-loader": "3.0.1",
51-
"esbuild-register": "3.4.2",
45+
"@fec/remark-a11y-emoji": "4.0.2",
46+
"@tsconfig/docusaurus": "2.0.3",
47+
"@types/is-ci": "3.0.4",
48+
"@types/js-yaml": "^4.0.9",
49+
"@types/node": "20.12.7",
50+
"@types/react": "^18.1.0",
51+
"esbuild": "^0.20.0",
52+
"esbuild-loader": "4.1.0",
53+
"esbuild-register": "3.5.0",
5254
"is-ci": "3.0.1",
5355
"prettier": "3.2.5",
54-
"regenerator-runtime": "0.13.11",
55-
"typescript": "5.0.2"
56+
"regenerator-runtime": "0.14.1",
57+
"typescript": "5.4.5",
58+
"webpack": "^5.88.1"
5659
},
5760
"browserslist": {
5861
"production": [
@@ -67,8 +70,10 @@
6770
"last 1 safari version"
6871
]
6972
},
70-
"packageManager": "[email protected]",
71-
"resolutions": {
72-
"@docusaurus/[email protected]": "patch:@docusaurus/plugin-content-docs@npm%3A3.2.1#./.yarn/patches/@docusaurus-plugin-content-docs-npm-3.2.1-7bedb7ec1c.patch"
73+
"packageManager": "[email protected]+sha256.01c01eeb990e379b31ef19c03e9d06a14afa5250b82e81303f88721c99ff2e6f",
74+
"pnpm": {
75+
"patchedDependencies": {
76+
"@docusaurus/[email protected]": "patches/@[email protected]"
77+
}
7378
}
7479
}

0 commit comments

Comments
 (0)